[NUI] TextField/TextEditor: Add SelectedTextStart, SelectedTextEnd properties (#2066)
authorAli-Alzyoud <ali198724@gmail.com>
Thu, 29 Oct 2020 07:00:12 +0000 (10:00 +0300)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 4 Nov 2020 08:17:17 +0000 (17:17 +0900)
Co-authored-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.TextEditor.cs
src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs

index 516d17f65e1b1365e19f66926278b38ab0327174..3bce2106c6b5b065fc5cde757c0cc34711bb4475 100755 (executable)
@@ -239,6 +239,12 @@ namespace Tizen.NUI
             //manual pinvoke for text-editor ScrollStateChangedSignal
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_ScrollStateChangedSignal")]
             public static extern global::System.IntPtr TextEditor_ScrollStateChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_SELECTED_TEXT_START_get")]
+            public static extern int TextEditor_Property_SELECTED_TEXT_START_get();
+
+            [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();
         }
     }
 }
\ No newline at end of file
index ea945212241f5aa9bf8cd9bffe7528cd8d608565..bbc62a55abaaeee57635f218fec37c00d39209dc 100755 (executable)
@@ -239,6 +239,12 @@ namespace Tizen.NUI
             [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_Property_SELECTED_TEXT_START_get")]
+            public static extern int TextField_Property_SELECTED_TEXT_START_get();
+
+            [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_SelectNone")]
             public static extern int TextField_SelectNone(global::System.Runtime.InteropServices.HandleRef jarg1);
         }
index 4e1f19054d620661a27e54a299d04cd89b5a6175..2ebf97951e57a4fca853733ff70c5957867885a1 100755 (executable)
@@ -983,6 +983,48 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// The start index for selection.
+        /// </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 int SelectedTextStart
+        {
+            get
+            {
+                int temp;
+                GetProperty(TextEditor.Property.SELECTED_TEXT_START).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextEditor.Property.SELECTED_TEXT_START, new PropertyValue(value));
+                NotifyPropertyChanged();
+            }
+        }
+
+        /// <summary>
+        /// The end index for selection.
+        /// </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 int SelectedTextEnd
+        {
+            get
+            {
+                int temp;
+                GetProperty(TextEditor.Property.SELECTED_TEXT_END).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextEditor.Property.SELECTED_TEXT_END, new PropertyValue(value));
+                NotifyPropertyChanged();
+            }
+        }
+
         /// <summary>
         /// The Placeholder property.
         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
@@ -1271,6 +1313,8 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextEditor.TextEditor_Property_ENABLE_SHIFT_SELECTION_get();
             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextEditor.TextEditor_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
             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 class InputStyle
index 7dd7f9464f5919604d957c34b2408307c674d5d9..872b8a6d84365914ad2b07a41f57252dd4893ef1 100755 (executable)
@@ -1126,6 +1126,48 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// The start index for selection.
+        /// </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 int SelectedTextStart
+        {
+            get
+            {
+                int temp;
+                GetProperty(TextField.Property.SELECTED_TEXT_START).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextField.Property.SELECTED_TEXT_START, new PropertyValue(value));
+                NotifyPropertyChanged();
+            }
+        }
+
+        /// <summary>
+        /// The end index for selection.
+        /// </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 int SelectedTextEnd
+        {
+            get
+            {
+                int temp;
+                GetProperty(TextField.Property.SELECTED_TEXT_END).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextField.Property.SELECTED_TEXT_END, new PropertyValue(value));
+                NotifyPropertyChanged();
+            }
+        }
+
         /// <summary>
         /// The Placeholder property.
         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
@@ -1441,6 +1483,8 @@ namespace Tizen.NUI.BaseComponents
             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 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 class InputStyle