From 22dfb0a30c31b7c422ddacb7be2443beca1006f9 Mon Sep 17 00:00:00 2001 From: Ali-Alzyoud Date: Fri, 30 Oct 2020 03:26:54 +0200 Subject: [PATCH] [NUI] TextField/TextEditor: Add enableEditing properties (#2071) --- .../src/internal/Interop/Interop.TextEditor.cs | 4 ++++ .../src/internal/Interop/Interop.TextField.cs | 3 +++ .../src/public/BaseComponents/TextEditor.cs | 21 +++++++++++++++++++++ .../src/public/BaseComponents/TextField.cs | 21 +++++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextEditor.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextEditor.cs index 3bce210..c29f652 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextEditor.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextEditor.cs @@ -245,6 +245,10 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_SELECTED_TEXT_END_get")] public static extern int TextEditor_Property_SELECTED_TEXT_END_get(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_ENABLE_EDITING_get")] + public static extern int TextEditor_Property_ENABLE_EDITING_get(); + } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs index bbc62a5..d66ca70 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs @@ -245,6 +245,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_SELECTED_TEXT_END_get")] public static extern int TextField_Property_SELECTED_TEXT_END_get(); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_ENABLE_EDITING_get")] + public static extern int TextField_Property_ENABLE_EDITING_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); } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 2ebf979..c664e09 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -1025,6 +1025,26 @@ namespace Tizen.NUI.BaseComponents } } + /// Enable editing in text control. + /// + /// 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 bool EnableEditing + { + get + { + bool temp; + GetProperty(TextEditor.Property.ENABLE_EDITING).Get(out temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.ENABLE_EDITING, new PropertyValue(value)); + NotifyPropertyChanged(); + } + } + /// /// The Placeholder property. /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size. @@ -1315,6 +1335,7 @@ namespace Tizen.NUI.BaseComponents internal static readonly int MAX_LENGTH = Interop.TextEditor.TextEditor_Property_MAX_LENGTH_get(); internal static readonly int SELECTED_TEXT_START = Interop.TextEditor.TextEditor_Property_SELECTED_TEXT_START_get(); internal static readonly int SELECTED_TEXT_END = Interop.TextEditor.TextEditor_Property_SELECTED_TEXT_END_get(); + internal static readonly int ENABLE_EDITING = Interop.TextEditor.TextEditor_Property_ENABLE_EDITING_get(); } internal class InputStyle diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 872b8a6..d74b284 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -1168,6 +1168,26 @@ namespace Tizen.NUI.BaseComponents } } + /// Enable editing in text control. + /// + /// 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 bool EnableEditing + { + get + { + bool temp; + GetProperty(TextField.Property.ENABLE_EDITING).Get(out temp); + return temp; + } + set + { + SetProperty(TextField.Property.ENABLE_EDITING, new PropertyValue(value)); + NotifyPropertyChanged(); + } + } + /// /// The Placeholder property. /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size. @@ -1485,6 +1505,7 @@ namespace Tizen.NUI.BaseComponents internal static readonly int SELECTED_TEXT = Interop.TextField.TextField_Property_SELECTED_TEXT_get(); internal static readonly int SELECTED_TEXT_START = Interop.TextField.TextField_Property_SELECTED_TEXT_START_get(); internal static readonly int SELECTED_TEXT_END = Interop.TextField.TextField_Property_SELECTED_TEXT_END_get(); + internal static readonly int ENABLE_EDITING = Interop.TextField.TextField_Property_ENABLE_EDITING_get(); } internal class InputStyle -- 2.7.4