Add SelectText to TextField, TextEditor 51/261951/3
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 29 Jul 2021 10:58:41 +0000 (19:58 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Mon, 9 Aug 2021 03:28:48 +0000 (12:28 +0900)
relative patch:
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/261509/

Change-Id: I1e0fd07401c9d39acd99d099b893b219031dda97
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-csharp-binder/src/text-editor-wrap.cpp
dali-csharp-binder/src/text-field-wrap.cpp

index d90857f..6b5a182 100755 (executable)
@@ -1207,6 +1207,36 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextEditor_SelectWholeText(void * jarg1)
   }
 }
 
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextEditor_SelectText(void * pTextEditor, unsigned int start, unsigned int end) {
+  Dali::Toolkit::TextEditor *textEditor = (Dali::Toolkit::TextEditor *) 0;
+
+  textEditor = (Dali::Toolkit::TextEditor *)pTextEditor;
+  {
+    try {
+      Dali::Toolkit::DevelTextEditor::SelectText( *textEditor, start, end );
+    }
+    catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
+      };
+    }
+    catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
+      };
+    }
+    catch (Dali::DaliException e) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, e.condition);
+      };
+    }
+    catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error");
+      };
+    }
+  }
+}
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextEditor_SelectNone(void * jarg1) {
   Dali::Toolkit::TextEditor *arg1 = (Dali::Toolkit::TextEditor *) 0;
index a661b33..2a40ff1 100755 (executable)
@@ -1089,7 +1089,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_AnchorClickedSignal(void * j
   return jresult;
 }
 
-
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_InputFilteredSignal(void * pTextField) {
   void * jresult ;
   Dali::Toolkit::TextField *textField = (Dali::Toolkit::TextField *) 0 ;
@@ -1122,7 +1121,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_InputFilteredSignal(void * p
   return jresult;
 }
 
-
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextField_SelectWholeText(void * jarg1) {
   Dali::Toolkit::TextField *arg1 = (Dali::Toolkit::TextField *) 0;
 
@@ -1154,6 +1152,36 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextField_SelectWholeText(void * jarg1)
   }
 }
 
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextField_SelectText(void * pTextField, unsigned int start, unsigned int end) {
+  Dali::Toolkit::TextField *textField = (Dali::Toolkit::TextField *) 0;
+
+  textField = (Dali::Toolkit::TextField *)pTextField;
+  {
+    try {
+      Dali::Toolkit::DevelTextField::SelectText( *textField, start, end );
+    }
+    catch (std::out_of_range& e) {
+      {
+        SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
+      };
+    }
+    catch (std::exception& e) {
+      {
+        SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
+      };
+    }
+    catch (Dali::DaliException e) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, e.condition);
+      };
+    }
+    catch (...) {
+      {
+        SWIG_CSharpException(SWIG_UnknownError, "unknown error");
+      };
+    }
+  }
+}
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextField_SelectNone(void * jarg1) {
   Dali::Toolkit::TextField *arg1 = (Dali::Toolkit::TextField *) 0;