[NUI]TextField: SelectNone and SelectedText (#1611)
authorAli-Alzyoud <ali198724@gmail.com>
Thu, 4 Jun 2020 02:24:33 +0000 (05:24 +0300)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 02:24:33 +0000 (11:24 +0900)
* TextField: SelectNone and SelectedText

* Update NDalicPINVOKE.cs

* Update NDalicPINVOKE.cs

src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs
src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs

index cbadbb4..fd6b8a0 100755 (executable)
@@ -238,6 +238,12 @@ namespace Tizen.NUI
     
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get")]
             public static extern int TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_SELECTED_TEXT_get")]
+            public static extern int TextField_Property_SELECTED_TEXT_get();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_SelectNone")]
+            public static extern int TextField_SelectNone(global::System.Runtime.InteropServices.HandleRef jarg1);
         }
     }
 }
\ No newline at end of file
index b718808..265de21 100755 (executable)
@@ -271,4 +271,4 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_LowMemorySignal")]
         public static extern global::System.IntPtr Application_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
     }
-}
\ No newline at end of file
+}
index 8dbd269..af29c21 100755 (executable)
@@ -1102,6 +1102,22 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// The Selected Text property.
+        /// </summary>
+        /// <since_tizen> 8 </since_tizen>
+        /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string SelectedText
+        {
+            get
+            {
+                string temp;
+                GetProperty(TextField.Property.SELECTED_TEXT).Get(out temp);
+                return (string)temp;
+            }
+        }
+
+        /// <summary>
         /// The Placeholder property.
         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
         /// </summary>
@@ -1244,6 +1260,18 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Clear selection of the text.
+        /// </summary>
+        /// <since_tizen> 8 </since_tizen>
+        /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void TextField_SelectNone()
+        {
+            Interop.TextField.TextField_SelectNone(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
         {
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
@@ -1384,6 +1412,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextField.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
             internal static readonly int ENABLE_GRAB_HANDLE = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_get();
             internal static readonly int ENABLE_GRAB_HANDLE_POPUP = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
+            internal static readonly int SELECTED_TEXT = Interop.TextField.TextField_Property_SELECTED_TEXT_get();
         }
 
         internal class InputStyle