From: Ali-Alzyoud Date: Thu, 4 Jun 2020 02:24:33 +0000 (+0300) Subject: [NUI]TextField: SelectNone and SelectedText (#1611) X-Git-Tag: accepted/tizen/unified/20210219.040944~710 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a50c933512257fd854f3b173356802566f016f5c;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI]TextField: SelectNone and SelectedText (#1611) * TextField: SelectNone and SelectedText * Update NDalicPINVOKE.cs * Update NDalicPINVOKE.cs --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs index cbadbb4..fd6b8a0 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs @@ -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 diff --git a/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs index b718808..265de21 100755 --- a/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs @@ -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 +} diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 8dbd269..af29c21 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -1102,6 +1102,22 @@ namespace Tizen.NUI.BaseComponents } /// + /// The Selected Text property. + /// + /// 8 + /// 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; + } + } + + /// /// The Placeholder property. /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size. /// @@ -1244,6 +1260,18 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Clear selection of the text. + /// + /// 8 + /// 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