Open the existing GetTextBoundingRectangle API 42/284842/4
authorsarajammal <s.al-jammal@partner.samsung.com>
Mon, 28 Nov 2022 13:20:22 +0000 (16:20 +0300)
committerSara AlJammal <s.al-jammal@partner.samsung.com>
Tue, 13 Dec 2022 09:09:25 +0000 (09:09 +0000)
Change-Id: Ie79225262cedf906fac35e3f62bd2a2320ac010c

dali-csharp-binder/src/text-editor-wrap.cpp
dali-csharp-binder/src/text-field-wrap.cpp
dali-csharp-binder/src/text-label-wrap.cpp

index 13f4d1a36dd005026c6ce60f72e59cedee620ebb..e1299ba600a2979a59ae662e9bedce5dc88aecff 100755 (executable)
@@ -1044,6 +1044,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextEditor_GetTextPosition(void * pTex
   return sizeList;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_TextGeometry_TextEditor_GetTextBoundingRectangle(void * pTextEditor, uint32_t startIndex, uint32_t endIndex)
+{
+  Dali::Toolkit::TextEditor *textEditor = (Dali::Toolkit::TextEditor *) 0;
+  void* boundingRect;
+
+  textEditor = (Dali::Toolkit::TextEditor *)pTextEditor;
+  {
+    try {
+      boundingRect = new Dali::Rect<>
+      ((const Dali::Rect<> &)(Dali::Toolkit::DevelTextEditor::GetTextBoundingRectangle( *textEditor, startIndex, endIndex)));
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  return boundingRect;
+}
+
 SWIGEXPORT char* SWIGSTDCALL CSharp_Dali_TextEditor_CopyText(void *pTextEditor)
 {
   char *csCopiedText;
index 2cff05d3d1e9d11f8ed270e7bee1f68bc037ee7c..945444225c38275c69d90354f98925850387edb2 100755 (executable)
@@ -996,6 +996,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_GetTextPosition(void * pText
   return sizeList;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_TextGeometry_TextField_GetTextBoundingRectangle(void * pTextField, uint32_t startIndex, uint32_t endIndex)
+{
+  Dali::Toolkit::TextField *textField = (Dali::Toolkit::TextField *) 0;
+  void* boundingRect;
+
+  textField = (Dali::Toolkit::TextField *)pTextField;
+  {
+    try {
+      boundingRect = new Dali::Rect<>
+      ((const Dali::Rect<> &)(Dali::Toolkit::DevelTextField::GetTextBoundingRectangle( *textField,  startIndex, endIndex)));
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  return boundingRect;
+}
+
 SWIGEXPORT char* SWIGSTDCALL CSharp_Dali_TextField_CopyText(void *pTextField)
 {
   char *csCopiedText;
index 9a5d471225f2181713d00fbcdd5d186e73f144a2..d7346cc22bff8e3c0040c5ab8844318735e24278 100755 (executable)
@@ -106,6 +106,23 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextLabel_GetTextPosition(void * pText
   return sizeList;
 }
 
+SWIGEXPORT void * SWIGSTDCALL CSharp_TextGeometry_TextLabel_GetTextBoundingRectangle(void * pTextLabel, uint32_t startIndex, uint32_t endIndex)
+{
+  Dali::Toolkit::TextLabel *textLabel = (Dali::Toolkit::TextLabel *) 0;
+  void* boundingRect;
+
+  textLabel = (Dali::Toolkit::TextLabel *)pTextLabel;
+  {
+    try {
+      boundingRect = new Dali::Rect<>
+      ((const Dali::Rect<> &)(Dali::Toolkit::DevelTextLabel::GetTextBoundingRectangle( *textLabel,  startIndex, endIndex)));
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  return boundingRect;
+}
+
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextLabel_AnchorClickedSignal(void * jarg1) {
   void * jresult ;
   Dali::Toolkit::TextLabel *arg1 = (Dali::Toolkit::TextLabel *) 0 ;