X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FTextField.cs;h=a7d5a8104502fd7c9dead87c12a23800c85acc98;hb=3b4a334136ed858316ffd4c1941dd5b2c8269b45;hp=a2849eaeee8abeeb026599f8ae82ebaf231649fd;hpb=4389bdc8eb5a4ad3852956870d0dfe119d8e04ef;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index a2849ea..a7d5a81 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2019 Samsung Electronics Co., Ltd. + * Copyright(c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ using System; using System.Globalization; using System.ComponentModel; using Tizen.NUI.Binding; +using Tizen.NUI.Text; namespace Tizen.NUI.BaseComponents { @@ -32,21 +33,20 @@ namespace Tizen.NUI.BaseComponents { private string textFieldTextSid = null; private string textFieldPlaceHolderTextSid = null; + private string textFieldPlaceHolderTextFocusedSid = null; private bool systemlangTextFlag = false; private InputMethodContext inputMethodCotext = null; - private TextFieldSelectorData selectorData; + private float fontSizeScale = 1.0f; + private bool hasFontSizeChangedCallback = false; + private bool isSettingTextInCSharp = false; static TextField() { } - /// 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 new TextFieldStyle Style => new TextFieldStyle(this); - /// /// Creates the TextField control. /// /// 3 - public TextField() : this(Interop.TextField.TextField_New(), true) + public TextField() : this(Interop.TextField.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -57,40 +57,42 @@ namespace Tizen.NUI.BaseComponents /// false : Not displayed (hidden), true : displayed (shown) /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI). [EditorBrowsable(EditorBrowsableState.Never)] - public TextField(bool shown) : this(Interop.TextField.TextField_New(), true) + public TextField(bool shown) : this(Interop.TextField.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); SetVisible(shown); } /// - /// Get attribues, it is abstract function and must be override. + /// Get attributes, it is abstract function and must be override. /// - /// 6 - /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected override ViewStyle GetViewStyle() + protected override ViewStyle CreateViewStyle() { return new TextFieldStyle(); } - internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn, viewStyle) + internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle) { if (!shown) { SetVisible(false); } + + TextChanged += TextEditorTextChanged; } - internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn) + internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null) { if (!shown) { SetVisible(false); } + + TextChanged += TextEditorTextChanged; } - internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.new_TextField__SWIG_1(TextField.getCPtr(handle)), true) + internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.NewTextField(TextField.getCPtr(handle)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -98,6 +100,8 @@ namespace Tizen.NUI.BaseComponents { SetVisible(false); } + + TextChanged += TextEditorTextChanged; } internal enum ExceedPolicyType @@ -122,7 +126,6 @@ namespace Tizen.NUI.BaseComponents } set { - selectorData?.TranslatableText.UpdateIfNeeds(this, value); SetValue(TranslatableTextProperty, value); } } @@ -136,7 +139,7 @@ namespace Tizen.NUI.BaseComponents { if (NUIApplication.MultilingualResourceManager == null) { - throw new ArgumentNullException("ResourceManager about multilingual is null"); + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); } textFieldTextSid = value; Text = SetTranslatable(textFieldTextSid); @@ -161,7 +164,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(TranslatablePlaceholderTextProperty, value); - selectorData?.TranslatablePlaceholderText.UpdateIfNeeds(this, value); } } private string translatablePlaceholderText @@ -174,7 +176,7 @@ namespace Tizen.NUI.BaseComponents { if (NUIApplication.MultilingualResourceManager == null) { - throw new ArgumentNullException("ResourceManager about multilingual is null"); + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); } textFieldPlaceHolderTextSid = value; PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid); @@ -183,6 +185,44 @@ namespace Tizen.NUI.BaseComponents } /// + /// The TranslatablePlaceholderTextFocused property.
+ /// The text can set the SID value.
+ ///
+ /// + /// ResourceManager about multilingual is null. + /// + /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public string TranslatablePlaceholderTextFocused + { + get + { + return (string)GetValue(TranslatablePlaceholderTextFocusedProperty); + } + set + { + SetValue(TranslatablePlaceholderTextFocusedProperty, value); + } + } + private string translatablePlaceholderTextFocused + { + get + { + return textFieldPlaceHolderTextFocusedSid; + } + set + { + if (NUIApplication.MultilingualResourceManager == null) + { + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); + } + textFieldPlaceHolderTextFocusedSid = value; + PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid); + NotifyPropertyChanged(); + } + } + + /// /// The Text property. /// /// 3 @@ -194,8 +234,7 @@ namespace Tizen.NUI.BaseComponents } set { - SetValueAndForceSendChangeSignal(TextProperty, value); - selectorData?.Text.UpdateIfNeeds(this, value); + SetValue(TextProperty, value); NotifyPropertyChanged(); } } @@ -247,15 +286,21 @@ namespace Tizen.NUI.BaseComponents set { SetValue(FontFamilyProperty, value); - selectorData?.FontFamily.UpdateIfNeeds(this, value); NotifyPropertyChanged(); } } /// /// The FontStyle property. + /// The fontStyle map contains the following keys :
+ /// + /// width (string)The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded) + /// weight (string)The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack) + /// slant (string)The slant key defines whether to use italics. (values: normal, roman, italic, oblique) + /// ///
/// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public PropertyMap FontStyle { get @@ -270,6 +315,42 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set FontStyle to TextField.
+ ///
+ /// The FontStyle + /// + /// SetFontStyle specifies the requested font style through .
+ ///
+ /// + /// The following example demonstrates how to use the SetFontStyle method. + /// + /// var fontStyle = new Tizen.NUI.Text.FontStyle(); + /// fontStyle.Width = FontWidthType.Expanded; + /// fontStyle.Weight = FontWeightType.Bold; + /// fontStyle.Slant = FontSlantType.Italic; + /// field.SetFontStyle(fontStyle); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetFontStyle(FontStyle fontStyle) + { + SetValue(FontStyleProperty, TextUtils.GetFontStyleMap(fontStyle)); + } + + /// + /// Get FontStyle from TextField.
+ ///
+ /// The FontStyle + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public FontStyle GetFontStyle() + { + return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty)); + } + + /// /// The PointSize property. /// /// 3 @@ -282,7 +363,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(PointSizeProperty, value); - selectorData?.PointSize.UpdateIfNeeds(this, value); NotifyPropertyChanged(); } } @@ -373,7 +453,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(TextColorProperty, value); - selectorData?.TextColor.UpdateIfNeeds(this, value); NotifyPropertyChanged(); } } @@ -395,7 +474,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(PlaceholderTextColorProperty, value); - selectorData?.PlaceholderTextColor.UpdateIfNeeds(this, value); NotifyPropertyChanged(); } } @@ -473,7 +551,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(PrimaryCursorColorProperty, value); - selectorData?.PrimaryCursorColor.UpdateIfNeeds(this, value); NotifyPropertyChanged(); } } @@ -637,6 +714,10 @@ namespace Tizen.NUI.BaseComponents /// /// The SelectionHandleImageLeft property. + /// The selectionHandleImageLeft map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandleImageLeft @@ -654,6 +735,10 @@ namespace Tizen.NUI.BaseComponents /// /// The SelectionHandleImageRight property. + /// The selectionHandleImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandleImageRight @@ -670,7 +755,54 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set SelectionHandleImage to TextField.
+ ///
+ /// The SelectionHandleImage + /// + /// SetSelectionHandleImage specifies the display image used for the selection handle through .
+ ///
+ /// + /// The following example demonstrates how to use the SetSelectionHandleImage method. + /// + /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage(); + /// selectionHandleImage.LeftImageUrl = "handle_downleft.png"; + /// selectionHandleImage.RightImageUrl = "handle_downright.png"; + /// field.SetSelectionHandleImage(selectionHandleImage); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage) + { + if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl)) + { + SetValue(SelectionHandleImageLeftProperty, TextUtils.GetFileNameMap(selectionHandleImage.LeftImageUrl)); + } + + if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl)) + { + SetValue(SelectionHandleImageRightProperty, TextUtils.GetFileNameMap(selectionHandleImage.RightImageUrl)); + } + } + + /// + /// Get SelectionHandleImage from TextField.
+ ///
+ /// The SelectionHandleImage + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public SelectionHandleImage GetSelectionHandleImage() + { + return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleImageLeftProperty), (PropertyMap)GetValue(SelectionHandleImageRightProperty)); + } + + /// /// The SelectionHandlePressedImageLeft property. + /// The selectionHandlePressedImageLeft map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandlePressedImageLeft @@ -688,6 +820,10 @@ namespace Tizen.NUI.BaseComponents /// /// The SelectionHandlePressedImageRight property. + /// The selectionHandlePressedImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandlePressedImageRight @@ -704,7 +840,54 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set SelectionHandlePressedImage to TextField.
+ ///
+ /// The SelectionHandleImage + /// + /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through .
+ ///
+ /// + /// The following example demonstrates how to use the SetSelectionHandlePressedImage method. + /// + /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage(); + /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png"; + /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png"; + /// field.SetSelectionHandlePressedImage(selectionHandlePressedImage); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandlePressedImage) + { + if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl)) + { + SetValue(SelectionHandlePressedImageLeftProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl)); + } + + if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl)) + { + SetValue(SelectionHandlePressedImageRightProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.RightImageUrl)); + } + } + + /// + /// Get SelectionHandlePressedImage from TextField.
+ ///
+ /// The SelectionHandlePressedImage + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public SelectionHandleImage GetSelectionHandlePressedImage() + { + return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty), (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty)); + } + + /// /// The SelectionHandleMarkerImageLeft property. + /// The selectionHandleMarkerImageLeft map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandleMarkerImageLeft @@ -722,6 +905,10 @@ namespace Tizen.NUI.BaseComponents /// /// The SelectionHandleMarkerImageRight property. + /// The selectionHandleMarkerImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 public PropertyMap SelectionHandleMarkerImageRight @@ -738,6 +925,49 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set SelectionHandleMarkerImage to TextField.
+ ///
+ /// The SelectionHandleImage + /// + /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through .
+ ///
+ /// + /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method. + /// + /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage(); + /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png"; + /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png"; + /// field.SetSelectionHandleMarkerImage(selectionHandleMarkerImage); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMarkerImage) + { + if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl)) + { + SetValue(SelectionHandleMarkerImageLeftProperty, TextUtils.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl)); + } + + if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl)) + { + SetValue(SelectionHandleMarkerImageRightProperty, TextUtils.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl)); + } + } + + /// + /// Get SelectionHandleMarkerImage from TextField.
+ ///
+ /// The SelectionHandleMarkerImage + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public SelectionHandleImage GetSelectionHandleMarkerImage() + { + return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty), (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty)); + } + + /// /// The SelectionHighlightColor property. /// /// @@ -782,6 +1012,20 @@ namespace Tizen.NUI.BaseComponents /// /// The InputMethodSettings property. /// + /// + /// is a class encapsulating the input method map. Please use the class for this property. + /// + /// + /// The following example demonstrates how to set the InputMethodSettings property. + /// + /// InputMethod method = new InputMethod(); + /// method.PanelLayout = InputMethod.PanelLayoutType.Normal; + /// method.ActionButton = InputMethod.ActionButtonTitleType.Default; + /// method.AutoCapital = InputMethod.AutoCapitalType.Word; + /// method.Variation = 1; + /// textField.InputMethodSettings = method.OutputMap; + /// + /// /// 3 public PropertyMap InputMethodSettings { @@ -853,8 +1097,15 @@ namespace Tizen.NUI.BaseComponents /// /// The InputFontStyle property. + /// The inputFontStyle map contains the following keys :
+ /// + /// width (string)The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded) + /// weight (string)The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack) + /// slant (string)The slant key defines whether to use italics. (values: normal, roman, italic, oblique) + /// ///
/// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public PropertyMap InputFontStyle { get @@ -869,6 +1120,42 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set InputFontStyle to TextField.
+ ///
+ /// The FontStyle + /// + /// SetInputFontStyle specifies the requested font style for new input text through .
+ ///
+ /// + /// The following example demonstrates how to use the SetInputFontStyle method. + /// + /// var fontStyle = new Tizen.NUI.Text.FontStyle(); + /// fontStyle.Width = FontWidthType.Expanded; + /// fontStyle.Weight = FontWeightType.Bold; + /// fontStyle.Slant = FontSlantType.Italic; + /// field.SetInputFontStyle(fontStyle); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetInputFontStyle(FontStyle fontStyle) + { + SetValue(InputFontStyleProperty, TextUtils.GetFontStyleMap(fontStyle)); + } + + /// + /// Get InputFontStyle from TextField.
+ ///
+ /// The FontStyle + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public FontStyle GetInputFontStyle() + { + return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty)); + } + + /// /// The InputPointSize property. /// /// 3 @@ -887,8 +1174,15 @@ namespace Tizen.NUI.BaseComponents /// /// The Underline property. + /// The underline map contains the following keys :
+ /// + /// enable (bool)Whether the underline is enabled (the default value is false) + /// color (Color)The color of the underline (If not provided then the color of the text is used) + /// height (float)The height in pixels of the underline (the default value is 1.f) + /// ///
/// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public PropertyMap Underline { get @@ -903,6 +1197,42 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set Underline to TextField.
+ ///
+ /// The Underline + /// + /// SetUnderline specifies the underline of the text through .
+ ///
+ /// + /// The following example demonstrates how to use the SetUnderline method. + /// + /// var underline = new Tizen.NUI.Text.Underline(); + /// underline.Enable = true; + /// underline.Color = new Color("#3498DB"); + /// underline.Height = 2.0f; + /// field.SetUnderline(underline); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetUnderline(Underline underline) + { + SetValue(UnderlineProperty, TextUtils.GetUnderlineMap(underline)); + } + + /// + /// Get Underline from TextField.
+ ///
+ /// The Underline + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Underline GetUnderline() + { + return TextUtils.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty)); + } + + /// /// The InputUnderline property. /// /// 3 @@ -921,8 +1251,15 @@ namespace Tizen.NUI.BaseComponents /// /// The Shadow property. + /// The shadow map contains the following keys :
+ /// + /// color (Color)The color of the shadow (the default color is Color.Black) + /// offset (Vector2)The offset in pixels of the shadow (If not provided then the shadow is not enabled) + /// blurRadius (float)The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled) + /// ///
/// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public PropertyMap Shadow { get @@ -937,6 +1274,41 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set Shadow to TextField.
+ ///
+ /// The Shadow + /// + /// SetShadow specifies the shadow of the text through .
+ ///
+ /// + /// The following example demonstrates how to use the SetShadow method. + /// + /// var shadow = new Tizen.NUI.Text.Shadow(); + /// shadow.Offset = new Vector2(3, 3); + /// shadow.Color = new Color("#F1C40F"); + /// field.SetShadow(shadow); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetShadow(Tizen.NUI.Text.Shadow shadow) + { + SetValue(ShadowProperty, TextUtils.GetShadowMap(shadow)); + } + + /// + /// Get Shadow from TextField.
+ ///
+ /// The Shadow + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Tizen.NUI.Text.Shadow GetShadow() + { + return TextUtils.GetShadowStruct((PropertyMap)GetValue(ShadowProperty)); + } + + /// /// The InputShadow property. /// /// 3 @@ -989,8 +1361,14 @@ namespace Tizen.NUI.BaseComponents /// /// The Outline property. + /// The outline map contains the following keys :
+ /// + /// color (Color)The color of the outline (the default color is Color.White) + /// width (float)The width in pixels of the outline (If not provided then the outline is not enabled) + /// ///
/// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public PropertyMap Outline { get @@ -1005,6 +1383,41 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set Outline to TextField.
+ ///
+ /// The Outline + /// + /// SetOutline specifies the outline of the text through .
+ ///
+ /// + /// The following example demonstrates how to use the SetOutline method. + /// + /// var outline = new Tizen.NUI.Text.Outline(); + /// outline.Width = 2.0f; + /// outline.Color = new Color("#45B39D"); + /// field.SetOutline(outline); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetOutline(Outline outline) + { + SetValue(OutlineProperty, TextUtils.GetOutlineMap(outline)); + } + + /// + /// Get Outline from TextField.
+ ///
+ /// The Outline + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Outline GetOutline() + { + return TextUtils.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty)); + } + + /// /// The InputOutline property. /// /// 3 @@ -1023,7 +1436,27 @@ namespace Tizen.NUI.BaseComponents /// /// The HiddenInputSettings property. + /// The hiddenInputSettings map contains the following keys :
+ /// + /// HiddenInputProperty.Mode (int)The mode for input text display (Use HiddenInputModeType) + /// HiddenInputProperty.SubstituteCharacter (int)All input characters are substituted by this character + /// HiddenInputProperty.SubstituteCount (int)Length of text to show or hide, available when HideCount/ShowCount mode is used + /// HiddenInputProperty.ShowLastCharacterDuration (int)Hide last character after this duration, available when ShowLastCharacter mode + /// ///
+ /// + /// See and for a detailed description. + /// + /// + /// The following example demonstrates how to set the HiddenInputSettings property. + /// + /// PropertyMap map = new PropertyMap(); + /// map.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter)); + /// map.Add(HiddenInputProperty.ShowLastCharacterDuration, new PropertyValue(500)); + /// map.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x2A)); + /// textField.HiddenInputSettings = map; + /// + /// /// 3 public Tizen.NUI.PropertyMap HiddenInputSettings { @@ -1039,6 +1472,43 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set HiddenInput to TextField.
+ ///
+ /// The HiddenInput + /// + /// SetHiddenInput specifies the requested font style through .
+ ///
+ /// + /// The following example demonstrates how to use the SetHiddenInput method. + /// + /// var hiddenInput = new Tizen.NUI.Text.HiddenInput(); + /// hiddenInput.Mode = HiddenInputModeType.ShowLastCharacter; + /// hiddenInput.SubstituteCharacter = '★'; + /// hiddenInput.SubstituteCount = 0; + /// hiddenInput.ShowLastCharacterDuration = 1000; + /// field.SetHiddenInput(hiddenInput); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetHiddenInput(HiddenInput hiddenInput) + { + SetValue(HiddenInputSettingsProperty, TextUtils.GetHiddenInputMap(hiddenInput)); + } + + /// + /// Get HiddenInput from TextField.
+ ///
+ /// The HiddenInput + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public HiddenInput GetHiddenInput() + { + return TextUtils.GetHiddenInputStruct((PropertyMap)GetValue(HiddenInputSettingsProperty)); + } + + /// /// The PixelSize property. /// /// 3 @@ -1111,24 +1581,193 @@ namespace Tizen.NUI.BaseComponents } /// - /// The Selected Text property. + /// The portion of the text that has been selected by the user. + /// + /// + /// Empty string when nothing is selected. + /// + /// 9 + public string SelectedText + { + get + { + string temp; + GetProperty(TextField.Property.SelectedText).Get(out temp); + return temp; + } + } + + /// + /// The start index for selection. + /// + /// + /// When there is no selection, the index is current cursor position. + /// + /// 9 + public int SelectedTextStart + { + get + { + int temp; + GetProperty(TextField.Property.SelectedTextStart).Get(out temp); + return temp; + } + } + + /// + /// The end index for selection. + /// + /// + /// When there is no selection, the index is current cursor position. + /// + /// 9 + public int SelectedTextEnd + { + get + { + int temp; + GetProperty(TextField.Property.SelectedTextEnd).Get(out temp); + return temp; + } + } + + /// + /// 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 string SelectedText + public bool EnableEditing { get { - string temp; - GetProperty(TextField.Property.SELECTED_TEXT).Get(out temp); + bool temp; + GetProperty(TextField.Property.EnableEditing).Get(out temp); return temp; } + set + { + SetProperty(TextField.Property.EnableEditing, new PropertyValue(value)); + NotifyPropertyChanged(); + } + } + + /// + /// Specify primary cursor (caret) position in text control. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int PrimaryCursorPosition + { + get + { + int temp; + using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition)) + { + propertyValue.Get(out temp); + } + return temp; + } + set + { + using (PropertyValue propertyValue = new PropertyValue(value)) + { + SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue); + NotifyPropertyChanged(); + } + } + } + + /// + /// The GrabHandleColor property. + /// + /// + /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Color GrabHandleColor + { + get + { + Color temp = (Color)GetValue(GrabHandleColorProperty); + return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A); + } + set + { + SetValue(GrabHandleColorProperty, value); + NotifyPropertyChanged(); + } + } + + /// + /// The ellipsis position of the text. + /// Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.
+ ///
+ /// 9 + public EllipsisPosition EllipsisPosition + { + get + { + return (EllipsisPosition)GetValue(EllipsisPositionProperty); + } + set + { + SetValue(EllipsisPositionProperty, value); + NotifyPropertyChanged(); + } + } + + /// + /// Set InputFilter to TextField. + /// + /// The InputFilter + /// + /// filters input based on regular expressions.
+ /// InputFiltered signal is emitted when the input is filtered by InputFilter
+ /// See , and for a detailed description. + ///
+ /// + /// The following example demonstrates how to use the SetInputFilter method. + /// + /// var inputFilter = new Tizen.NUI.Text.InputFilter(); + /// inputFilter.Accepted = @"[\d]"; // accept whole digits + /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3 + /// field.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9 + /// + /// + /// 9 + public void SetInputFilter(InputFilter inputFilter) + { + SetProperty(TextField.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter))); + } + + /// + /// Get InputFilter from TextField. + /// + /// The InputFilter + /// + /// + /// + /// 9 + public InputFilter GetInputFilter() + { + var map = new PropertyMap(); + GetProperty(TextField.Property.InputFilter).Get(map); + return TextUtils.GetInputFilterStruct(map); } /// /// The Placeholder property. - /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size. + /// The placeholder map contains the following keys :
+ /// + /// text (string)The text to display when the TextField is empty and inactive + /// textFocused (string)The text to display when the placeholder has focus + /// color (Color)The color of the placeholder text + /// fontFamily (string)The fontFamily of the placeholder text + /// fontStyle (PropertyMap)The fontStyle of the placeholder text + /// pointSize (float)The pointSize of the placeholder text + /// pixelSize (float)The pixelSize of the placeholder text + /// ellipsis (bool)The ellipsis of the placeholder text + /// ///
/// /// The following example demonstrates how to set the Placeholder property. @@ -1151,11 +1790,81 @@ namespace Tizen.NUI.BaseComponents /// /// /// 3 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] public Tizen.NUI.PropertyMap Placeholder { get { - return (PropertyMap)GetValue(PlaceholderProperty); + PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty); + PropertyValue value = null; + + // text + value = map.Find(0); + if (null != value) + { + value.Get(out string text); + map.Add("text", new PropertyValue(text)); + } + + // textFocused + value = map.Find(1); + if (null != value) + { + value.Get(out string textFocused); + map.Add("textFocused", new PropertyValue(textFocused)); + } + + // color + value = map.Find(2); + if (null != value) + { + Color color = new Color(); + value.Get(color); + map.Add("color", new PropertyValue(color)); + } + + // fontFamily + value = map.Find(3); + if (null != value) + { + value.Get(out string fontFamily); + map.Add("fontFamily", new PropertyValue(fontFamily)); + } + + // fontStyle + value = map.Find(4); + if (null != value) + { + PropertyMap fontStyle = new PropertyMap(); + value.Get(fontStyle); + map.Add("fontStyle", new PropertyValue(fontStyle)); + } + + // pointSize + value = map.Find(5); + if (null != value) + { + value.Get(out float pointSize); + map.Add("pointSize", new PropertyValue(pointSize)); + } + + // pixelSize + value = map.Find(6); + if (null != value) + { + value.Get(out float pixelSize); + map.Add("pixelSize", new PropertyValue(pixelSize)); + } + + // ellipsis + value = map.Find(7); + if (null != value) + { + value.Get(out bool ellipsis); + map.Add("ellipsis", new PropertyValue(ellipsis)); + } + + return map; } set { @@ -1165,6 +1874,52 @@ namespace Tizen.NUI.BaseComponents } /// + /// Set Placeholder to TextField.
+ ///
+ /// The Placeholder + /// + /// SetPlaceholder specifies the attributes of the placeholder property through .
+ ///
+ /// + /// The following example demonstrates how to use the SetPlaceholder method. + /// + /// var placeholder = new Tizen.NUI.Text.Placeholder(); + /// placeholder.Text = "placeholder text"; + /// placeholder.TextFocused = "placeholder textFocused"; + /// placeholder.Color = new Color("#45B39D"); + /// placeholder.FontFamily = "BreezeSans"; + /// placeholder.FontStyle = new Tizen.NUI.Text.FontStyle() + /// { + /// Width = FontWidthType.Expanded, + /// Weight = FontWeightType.ExtraLight, + /// Slant = FontSlantType.Italic, + /// }; + /// placeholder.PointSize = 25.0f; + /// //placeholder.PixelSize = 50.0f; + /// placeholder.Ellipsis = true; + /// field.SetPlaceholder(placeholder); + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetPlaceholder(Placeholder placeholder) + { + SetValue(PlaceholderProperty, TextUtils.GetPlaceholderMap(placeholder)); + } + + /// + /// Get Placeholder from TextField.
+ ///
+ /// The Placeholder + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Placeholder GetPlaceholder() + { + return TextUtils.GetPlaceholderStruct((PropertyMap)GetValue(PlaceholderProperty)); + } + + /// /// The Ellipsis property.
/// Enable or disable the ellipsis.
/// Placeholder PropertyMap is used to add ellipsis to placeholder text. @@ -1219,37 +1974,49 @@ namespace Tizen.NUI.BaseComponents } } - /// Only used by the IL of xaml, will never changed to not hidden. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool IsCreateByXaml + /// + /// The FontSizeScale property.
+ /// The default value is 1.0.
+ /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally.
+ ///
+ /// 9 + public float FontSizeScale { get { - return base.IsCreateByXaml; + return fontSizeScale; } set { - base.IsCreateByXaml = value; + float newFontSizeScale; + + if (fontSizeScale == value) return; - if (value == true) + fontSizeScale = value; + if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting) { - this.TextChanged += (obj, e) => + SystemSettingsFontSize systemSettingsFontSize; + + try + { + systemSettingsFontSize = SystemSettings.FontSize; + } + catch (Exception e) { - this.Text = this.Text; - }; + Console.WriteLine("{0} Exception caught.", e); + systemSettingsFontSize = SystemSettingsFontSize.Normal; + } + newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize); + addFontSizeChangedCallback(); } - } - } - - private TextFieldSelectorData SelectorData - { - get - { - if (selectorData == null) + else { - selectorData = new TextFieldSelectorData(); + newFontSizeScale = fontSizeScale; + removeFontSizeChangedCallback(); } - return selectorData; + + SetValue(FontSizeScaleProperty, newFontSizeScale); + NotifyPropertyChanged(); } } @@ -1263,7 +2030,7 @@ namespace Tizen.NUI.BaseComponents if (inputMethodCotext == null) { /*Avoid raising InputMethodContext reference count.*/ - inputMethodCotext = new InputMethodContext(Interop.TextField.TextField_GetInputMethodContext(swigCPtr), true); + inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return inputMethodCotext; @@ -1272,35 +2039,48 @@ namespace Tizen.NUI.BaseComponents /// /// Select the whole text. /// - /// 6 - /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 9 public void SelectWholeText() { - Interop.TextField.TextField_SelectWholeText(swigCPtr); + Interop.TextField.SelectWholeText(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// - /// Clear selection of the text. + /// Select text from start to end index.
+ /// The index is valid when 0 or positive. ///
- /// 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 SelectNone() + /// The start index for selection. + /// The end index for selection. + /// + /// If the end index exceeds the maximum value, it is set to the length of the text. + /// + /// 9 + public void SelectText(int start, int end) { - Interop.TextField.TextField_SelectNone(swigCPtr); + if (start < 0) + throw new global::System.ArgumentOutOfRangeException(nameof(start), "Value is less than zero"); + if (end < 0) + throw new global::System.ArgumentOutOfRangeException(nameof(end), "Value is less than zero"); + + Interop.TextField.SelectText(SwigCPtr, (uint)start, (uint)end); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj) + /// + /// Clear selection of the text.
+ /// Valid when selection is activate. + ///
+ /// 9 + public void SelectNone() { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + _ = Interop.TextField.SelectNone(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(Interop.TextField.TextField_InputStyleChangedSignal(swigCPtr), false); + SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(Interop.TextField.InputStyleChangedSignal(SwigCPtr)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -1317,12 +2097,18 @@ namespace Tizen.NUI.BaseComponents return; } + if (systemlangTextFlag) + { + SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged; + } + + removeFontSizeChangedCallback(); + if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. - selectorData?.Reset(this); } //Release your own unmanaged resources here. @@ -1330,17 +2116,34 @@ namespace Tizen.NUI.BaseComponents //because the execution order of Finalizes is non-deterministic. if (this.HasBody()) { - if (_textFieldMaxLengthReachedCallbackDelegate != null) + if (textFieldCursorPositionChangedCallbackDelegate != null) + { + this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate); + } + + if (textFieldMaxLengthReachedCallbackDelegate != null) + { + this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate); + } + + if (textFieldSelectionClearedCallbackDelegate != null) + { + this.SelectionClearedSignal().Disconnect(textFieldSelectionClearedCallbackDelegate); + } + + if (textFieldSelectionChangedCallbackDelegate != null) { - this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate); + this.SelectionChangedSignal().Disconnect(textFieldSelectionChangedCallbackDelegate); } - if (_textFieldTextChangedCallbackDelegate != null) + if (textFieldTextChangedCallbackDelegate != null) { - TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate); + TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate); } } + TextChanged -= TextEditorTextChanged; + base.Dispose(type); } @@ -1350,7 +2153,7 @@ namespace Tizen.NUI.BaseComponents { // In order to speed up IME hide, temporarily add GetInputMethodContext()?.DestroyContext(); - Interop.TextField.delete_TextField(swigCPtr); + Interop.TextField.DeleteTextField(swigCPtr); } private string SetTranslatable(string textFieldSid) @@ -1361,7 +2164,7 @@ namespace Tizen.NUI.BaseComponents { if (systemlangTextFlag == false) { - SystemSettings.LocaleLanguageChanged += new WeakEventHandler(SystemSettings_LocaleLanguageChanged).Handler; + SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged; systemlangTextFlag = true; } return translatableText; @@ -1383,64 +2186,125 @@ namespace Tizen.NUI.BaseComponents { PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-"))); } + if (textFieldPlaceHolderTextFocusedSid != null) + { + PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-"))); + } + } + + private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e) + { + float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value); + SetValue(FontSizeScaleProperty, newFontSizeScale); + NotifyPropertyChanged(); + } + + private void addFontSizeChangedCallback() + { + if (hasFontSizeChangedCallback != true) + { + try + { + SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged; + hasFontSizeChangedCallback = true; + } + catch (Exception e) + { + Console.WriteLine("{0} Exception caught.", e); + hasFontSizeChangedCallback = false; + } + } + } + + private void removeFontSizeChangedCallback() + { + if (hasFontSizeChangedCallback == true) + { + try + { + SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged; + hasFontSizeChangedCallback = false; + } + catch (Exception e) + { + Console.WriteLine("{0} Exception caught.", e); + hasFontSizeChangedCallback = true; + } + } + } + + private void TextEditorTextChanged(object sender, TextChangedEventArgs e) + { + if (!isSettingTextInCSharp) + { + EnforceNotifyBindedInstance(TextProperty); + } } internal new class Property { - internal static readonly int TEXT = Interop.TextField.TextField_Property_TEXT_get(); - internal static readonly int PLACEHOLDER_TEXT = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_get(); - internal static readonly int PLACEHOLDER_TEXT_FOCUSED = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get(); - internal static readonly int FONT_FAMILY = Interop.TextField.TextField_Property_FONT_FAMILY_get(); - internal static readonly int FONT_STYLE = Interop.TextField.TextField_Property_FONT_STYLE_get(); - internal static readonly int POINT_SIZE = Interop.TextField.TextField_Property_POINT_SIZE_get(); - internal static readonly int MAX_LENGTH = Interop.TextField.TextField_Property_MAX_LENGTH_get(); - internal static readonly int EXCEED_POLICY = Interop.TextField.TextField_Property_EXCEED_POLICY_get(); - internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextField.TextField_Property_HORIZONTAL_ALIGNMENT_get(); - internal static readonly int VERTICAL_ALIGNMENT = Interop.TextField.TextField_Property_VERTICAL_ALIGNMENT_get(); - internal static readonly int TEXT_COLOR = Interop.TextField.TextField_Property_TEXT_COLOR_get(); - internal static readonly int PLACEHOLDER_TEXT_COLOR = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_COLOR_get(); - internal static readonly int PRIMARY_CURSOR_COLOR = Interop.TextField.TextField_Property_PRIMARY_CURSOR_COLOR_get(); - internal static readonly int SECONDARY_CURSOR_COLOR = Interop.TextField.TextField_Property_SECONDARY_CURSOR_COLOR_get(); - internal static readonly int ENABLE_CURSOR_BLINK = Interop.TextField.TextField_Property_ENABLE_CURSOR_BLINK_get(); - internal static readonly int CURSOR_BLINK_INTERVAL = Interop.TextField.TextField_Property_CURSOR_BLINK_INTERVAL_get(); - internal static readonly int CURSOR_BLINK_DURATION = Interop.TextField.TextField_Property_CURSOR_BLINK_DURATION_get(); - internal static readonly int CURSOR_WIDTH = Interop.TextField.TextField_Property_CURSOR_WIDTH_get(); - internal static readonly int GRAB_HANDLE_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_IMAGE_get(); - internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get(); - internal static readonly int SCROLL_THRESHOLD = Interop.TextField.TextField_Property_SCROLL_THRESHOLD_get(); - internal static readonly int SCROLL_SPEED = Interop.TextField.TextField_Property_SCROLL_SPEED_get(); - internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HIGHLIGHT_COLOR = Interop.TextField.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get(); - internal static readonly int DECORATION_BOUNDING_BOX = Interop.TextField.TextField_Property_DECORATION_BOUNDING_BOX_get(); - internal static readonly int INPUT_METHOD_SETTINGS = Interop.TextField.TextField_Property_INPUT_METHOD_SETTINGS_get(); - internal static readonly int INPUT_COLOR = Interop.TextField.TextField_Property_INPUT_COLOR_get(); - internal static readonly int ENABLE_MARKUP = Interop.TextField.TextField_Property_ENABLE_MARKUP_get(); - internal static readonly int INPUT_FONT_FAMILY = Interop.TextField.TextField_Property_INPUT_FONT_FAMILY_get(); - internal static readonly int INPUT_FONT_STYLE = Interop.TextField.TextField_Property_INPUT_FONT_STYLE_get(); - internal static readonly int INPUT_POINT_SIZE = Interop.TextField.TextField_Property_INPUT_POINT_SIZE_get(); - internal static readonly int UNDERLINE = Interop.TextField.TextField_Property_UNDERLINE_get(); - internal static readonly int INPUT_UNDERLINE = Interop.TextField.TextField_Property_INPUT_UNDERLINE_get(); - internal static readonly int SHADOW = Interop.TextField.TextField_Property_SHADOW_get(); - internal static readonly int INPUT_SHADOW = Interop.TextField.TextField_Property_INPUT_SHADOW_get(); - internal static readonly int EMBOSS = Interop.TextField.TextField_Property_EMBOSS_get(); - internal static readonly int INPUT_EMBOSS = Interop.TextField.TextField_Property_INPUT_EMBOSS_get(); - internal static readonly int OUTLINE = Interop.TextField.TextField_Property_OUTLINE_get(); - internal static readonly int INPUT_OUTLINE = Interop.TextField.TextField_Property_INPUT_OUTLINE_get(); - internal static readonly int HIDDEN_INPUT_SETTINGS = Interop.TextField.TextField_Property_HIDDEN_INPUT_SETTINGS_get(); - internal static readonly int PIXEL_SIZE = Interop.TextField.TextField_Property_PIXEL_SIZE_get(); - internal static readonly int ENABLE_SELECTION = Interop.TextField.TextField_Property_ENABLE_SELECTION_get(); - internal static readonly int PLACEHOLDER = Interop.TextField.TextField_Property_PLACEHOLDER_get(); - internal static readonly int ELLIPSIS = Interop.TextField.TextField_Property_ELLIPSIS_get(); - internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextField.TextField_Property_ENABLE_SHIFT_SELECTION_get(); - 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 static readonly int TEXT = Interop.TextField.TextGet(); + internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet(); + internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet(); + internal static readonly int FontFamily = Interop.TextField.FontFamilyGet(); + internal static readonly int FontStyle = Interop.TextField.FontStyleGet(); + internal static readonly int PointSize = Interop.TextField.PointSizeGet(); + internal static readonly int MaxLength = Interop.TextField.MaxLengthGet(); + internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet(); + internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet(); + internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet(); + internal static readonly int TextColor = Interop.TextField.TextColorGet(); + internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet(); + internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet(); + internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet(); + internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet(); + internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet(); + internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet(); + internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet(); + internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet(); + internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet(); + internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet(); + internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet(); + internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet(); + internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet(); + internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet(); + internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet(); + internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet(); + internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet(); + internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet(); + internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet(); + internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet(); + internal static readonly int InputColor = Interop.TextField.InputColorGet(); + internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet(); + internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet(); + internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet(); + internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet(); + internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet(); + internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet(); + internal static readonly int SHADOW = Interop.TextField.ShadowGet(); + internal static readonly int InputShadow = Interop.TextField.InputShadowGet(); + internal static readonly int EMBOSS = Interop.TextField.EmbossGet(); + internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet(); + internal static readonly int OUTLINE = Interop.TextField.OutlineGet(); + internal static readonly int InputOutline = Interop.TextField.InputOutlineGet(); + internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet(); + internal static readonly int PixelSize = Interop.TextField.PixelSizeGet(); + internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet(); + internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet(); + internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet(); + internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet(); + internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet(); + internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet(); + internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet(); + internal static readonly int SelectedText = Interop.TextField.SelectedTextGet(); + internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet(); + internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet(); + internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet(); + internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet(); + internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet(); + internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet(); + internal static readonly int EllipsisPosition = Interop.TextField.EllipsisPositionGet(); + internal static readonly int InputFilter = Interop.TextField.InputFilterGet(); } internal class InputStyle @@ -1495,5 +2359,9 @@ namespace Tizen.NUI.BaseComponents { TextColor = new Color(r, g, b, a); } + private void OnGrabHandleColorChanged(float r, float g, float b, float a) + { + GrabHandleColor = new Color(r, g, b, a); + } } }