[dali-csharp] add texteditor scrolling functions 48/246548/1
authorali198724 <ali198724@gmail.com>
Sun, 1 Nov 2020 10:57:47 +0000 (12:57 +0200)
committerali198724 <ali198724@gmail.com>
Sun, 1 Nov 2020 10:57:47 +0000 (12:57 +0200)
1- add HORIZONTAL_SCROLL_POSITION property
2- add VERTICAL_SCROLL_POSITION property
3- add ScrollBy function

Change-Id: I1b0cb6eb0665d820e58089bc43915cc15c9f7be6

dali-csharp-binder/src/text-editor.cpp

index 2f30b82..15260ee 100755 (executable)
@@ -588,6 +588,63 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_TextEditor_Property_SELECTED_TEXT_END_get
   return jresult;
 }
 
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_TextEditor_Property_HORIZONTAL_SCROLL_POSITION_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelTextEditor::Property::HORIZONTAL_SCROLL_POSITION;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_TextEditor_Property_VERTICAL_SCROLL_POSITION_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelTextEditor::Property::VERTICAL_SCROLL_POSITION;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextEditor_ScrollBy(void * jarg1, void * jarg2) {
+  Dali::Toolkit::TextEditor *arg1 = (Dali::Toolkit::TextEditor *) 0;
+  Dali::Vector2 *arg2 = 0 ;
+
+  arg1 = (Dali::Toolkit::TextEditor *)jarg1;
+  arg2 = (Dali::Vector2 *)jarg2;
+
+  if (!arg2) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector2 type is null", 0);
+    return ;
+  }
+
+  {
+    try {
+      Dali::Toolkit::DevelTextEditor::ScrollBy( *arg1 , *arg2);
+    }
+    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 int SWIGSTDCALL CSharp_Dali_TextEditor_Property_ENABLE_EDITING_get() {
   int jresult ;
   int result;