X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FTextField.cs;h=1d4d1ae5b90432d3535d8b19df7025a80f5784f8;hb=163d8156dc99b571242d87dcf63e772e4a91bb21;hp=6aebe10b11fcc264532589bc8b0f2ec40a001865;hpb=63b29ed78f0eca3a24ff249c44a0f0e92c00b39e;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 6aebe10..1d4d1ae 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. @@ -18,10 +18,10 @@ extern alias TizenSystemSettings; using TizenSystemSettings.Tizen.System; using System; -using System.Runtime.InteropServices; using System.Globalization; using System.ComponentModel; using Tizen.NUI.Binding; +using Tizen.NUI.Text; namespace Tizen.NUI.BaseComponents { @@ -29,1897 +29,1752 @@ namespace Tizen.NUI.BaseComponents /// A control which provides a single line editable text field. /// /// 3 - public class TextField : View + public partial class TextField : View { - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.TEXT).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue((string)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue((string)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.FONT_FAMILY).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.FONT_STYLE).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.POINT_SIZE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue((int)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - int temp = 0; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.MAX_LENGTH).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue((int)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - int temp = 0; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.EXCEED_POLICY).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextField), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - if (Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false) - { - NUILog.Error("HorizontalAlignment get error!"); - } + private string textFieldTextSid = null; + private string textFieldPlaceHolderTextSid = null; + private string textFieldPlaceHolderTextFocusedSid = null; + private bool systemlangTextFlag = false; + private InputMethodContext inputMethodCotext = null; + private float fontSizeScale = 1.0f; + private bool hasFontSizeChangedCallback = false; + private bool isSettingTextInCSharp = false; - switch (temp) - { - case "BEGIN": return HorizontalAlignment.Begin; - case "CENTER": return HorizontalAlignment.Center; - case "END": return HorizontalAlignment.End; - default: return HorizontalAlignment.Begin; - } - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(TextField.VerticalAlignment), typeof(VerticalAlignment), typeof(TextField), VerticalAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - if (Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false) - { - NUILog.Error("VerticalAlignment get error!"); - } + static TextField() { } - switch (temp) - { - case "TOP": return VerticalAlignment.Top; - case "CENTER": return VerticalAlignment.Center; - case "BOTTOM": return VerticalAlignment.Bottom; - default: return VerticalAlignment.Bottom; - } - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextField.TextColor), typeof(Color), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.TEXT_COLOR).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PlaceholderTextColorProperty = BindableProperty.Create(nameof(TextField.PlaceholderTextColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue)); - } - }, - defaultValueCreator: (bindable) => + /// + /// Creates the TextField control. + /// + /// 3 + public TextField() : this(Interop.TextField.New(), true) { - var textField = (TextField)bindable; - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp); - return temp; - }); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PrimaryCursorColorProperty = BindableProperty.Create(nameof(TextField.PrimaryCursorColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(TextField.SecondaryCursorColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + /// + /// Creates the TextField with setting the status of shown or hidden. + /// + /// 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 static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(TextField.EnableCursorBlink), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => + public TextField(bool shown) : this(Interop.TextField.New(), true) { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue((bool)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + SetVisible(shown); + } + + /// + /// Get attributes, it is abstract function and must be override. + /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(TextField.CursorBlinkInterval), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue((float)newValue)); - } - }, - defaultValueCreator: (bindable) => + protected override ViewStyle CreateViewStyle() { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(TextField.CursorBlinkDuration), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => + return new TextFieldStyle(); + } + + internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle) { - var textField = (TextField)bindable; - if (newValue != null) + if (!shown) { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue((float)newValue)); + SetVisible(false); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_DURATION).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(TextField.CursorWidth), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) => + + TextChanged += TextEditorTextChanged; + } + + internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null) { - var textField = (TextField)bindable; - if (newValue != null) + if (!shown) { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue((int)newValue)); + SetVisible(false); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - int temp = 0; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_WIDTH).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(TextField.GrabHandleImage), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + + TextChanged += TextEditorTextChanged; + } + + internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.NewTextField(TextField.getCPtr(handle)), true) { - var textField = (TextField)bindable; - if (newValue != null) + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if (!shown) { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue((string)newValue)); + SetVisible(false); } - }, - defaultValueCreator: (bindable) => + + TextChanged += TextEditorTextChanged; + } + + internal enum ExceedPolicyType { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(TextField.GrabHandlePressedImage), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + ExceedPolicyOriginal, + ExceedPolicyClip + } + + /// + /// The TranslatableText property.
+ /// The text can set the SID value.
+ ///
+ /// + /// ResourceManager about multilingual is null. + /// + /// 4 + public string TranslatableText { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue((string)newValue)); + return (string)GetValue(TranslatableTextProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(TextField.ScrollThreshold), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue((float)newValue)); + SetValue(TranslatableTextProperty, value); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SCROLL_THRESHOLD).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(TextField.ScrollSpeed), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => + } + private string translatableText { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue((float)newValue)); + return textFieldTextSid; } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SCROLL_SPEED).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHandleImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + if (NUIApplication.MultilingualResourceManager == null) + { + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); + } + textFieldTextSid = value; + Text = SetTranslatable(textFieldTextSid); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHandleImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The TranslatablePlaceholderText property.
+ /// The text can set the SID value.
+ ///
+ /// + /// ResourceManager about multilingual is null. + /// + /// 4 + public string TranslatablePlaceholderText { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + return (string)GetValue(TranslatablePlaceholderTextProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHandlePressedImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandlePressedImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + SetValue(TranslatablePlaceholderTextProperty, value); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHandlePressedImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandlePressedImageRight), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + } + private string translatablePlaceholderText { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + return textFieldPlaceHolderTextSid; } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHandleMarkerImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandleMarkerImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + if (NUIApplication.MultilingualResourceManager == null) + { + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); + } + textFieldPlaceHolderTextSid = value; + PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + } + + /// + /// 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 static readonly BindableProperty SelectionHandleMarkerImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandleMarkerImageRight), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + public string TranslatablePlaceholderTextFocused { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + return (string)GetValue(TranslatablePlaceholderTextFocusedProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(TextField.SelectionHighlightColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue)); + SetValue(TranslatablePlaceholderTextFocusedProperty, value); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(TextField.DecorationBoundingBox), typeof(Rectangle), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + } + private string translatablePlaceholderTextFocused { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue((Rectangle)newValue)); + return textFieldPlaceHolderTextFocusedSid; } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Rectangle temp = new Rectangle(0, 0, 0, 0); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.DECORATION_BOUNDING_BOX).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputMethodSettingsProperty = BindableProperty.Create(nameof(TextField.InputMethodSettings), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + if (NUIApplication.MultilingualResourceManager == null) + { + throw new ArgumentNullException(null, "ResourceManager about multilingual is null"); + } + textFieldPlaceHolderTextFocusedSid = value; + PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_METHOD_SETTINGS).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(TextField.InputColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The Text property. + /// + /// 3 + public string Text { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue)); + return (string)GetValue(TextProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_COLOR).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(TextField.EnableMarkup), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue)); + SetValue(TextProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_MARKUP).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(TextField.InputFontFamily), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The PlaceholderText property. + /// + /// 3 + public string PlaceholderText { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue)); + return (string)GetValue(PlaceholderTextProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_FAMILY).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputFontStyleProperty = BindableProperty.Create(nameof(TextField.InputFontStyle), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + SetValue(PlaceholderTextProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_STYLE).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(TextField.InputPointSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The PlaceholderTextFocused property. + /// + /// 3 + public string PlaceholderTextFocused { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue)); + return (string)GetValue(PlaceholderTextFocusedProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_POINT_SIZE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(TextField.Underline), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + SetValue(PlaceholderTextFocusedProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.UNDERLINE).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(TextField.InputUnderline), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The FontFamily property. + /// + /// 3 + public string FontFamily { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue((string)newValue)); + return (string)GetValue(FontFamilyProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_UNDERLINE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(TextField.Shadow), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + SetValue(FontFamilyProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SHADOW).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(TextField.InputShadow), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// 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 { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue((string)newValue)); + return (PropertyMap)GetValue(FontStyleProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_SHADOW).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(TextField.Emboss), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue)); + SetValue(FontStyleProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.EMBOSS).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + } + + /// + /// 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 static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(TextField.InputEmboss), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + public void SetFontStyle(FontStyle fontStyle) { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue((string)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_EMBOSS).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + SetValue(FontStyleProperty, TextUtils.GetFontStyleMap(fontStyle)); + } + + /// + /// Get FontStyle from TextField.
+ ///
+ /// The FontStyle + /// + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(TextField.Outline), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + public FontStyle GetFontStyle() { - var textField = (TextField)bindable; - if (newValue != null) - { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); - } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - PropertyMap temp = new PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.OUTLINE).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(TextField.InputOutline), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty)); + } + + /// + /// The PointSize property. + /// + /// 3 + public float PointSize { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue((string)newValue)); + return (float)GetValue(PointSizeProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - string temp; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_OUTLINE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty HiddenInputSettingsProperty = BindableProperty.Create(nameof(TextField.HiddenInputSettings), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + SetValue(PointSizeProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(TextField.PixelSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The MaxLength property. + /// + /// 3 + public int MaxLength { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue)); + return (int)GetValue(MaxLengthProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - float temp = 0.0f; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PIXEL_SIZE).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(TextField.EnableSelection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue)); + SetValue(MaxLengthProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_SELECTION).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(TextField.Placeholder), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The ExceedPolicy property. + /// + /// 3 + public int ExceedPolicy { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue((PropertyMap)newValue)); + return (int)GetValue(ExceedPolicyProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER).Get(temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(TextField.Ellipsis), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue)); + SetValue(ExceedPolicyProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ELLIPSIS).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty EnableShiftSelectionProperty = BindableProperty.Create(nameof(TextField.EnableShiftSelection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => + } + + /// + /// The HorizontalAlignment property. + /// + /// 3 + public HorizontalAlignment HorizontalAlignment { - var textField = (TextField)bindable; - if (newValue != null) + get { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue)); + return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_SHIFT_SELECTION).Get(out temp); - return temp; - }); - /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(TextField.MatchSystemLanguageDirection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) => - { - var textField = (TextField)bindable; - if (newValue != null) + set { - Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue)); + SetValue(HorizontalAlignmentProperty, value); + NotifyPropertyChanged(); } - }, - defaultValueCreator: (bindable) => - { - var textField = (TextField)bindable; - bool temp = false; - Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp); - return (bool)temp; - }); - - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - private string textFieldTextSid = null; - private string textFieldPlaceHolderTextSid = null; - private bool systemlangTextFlag = false; - private InputMethodContext inputMethodCotext = null; - private EventHandler _textFieldTextChangedEventHandler; - private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate; - private EventHandler _textFieldMaxLengthReachedEventHandler; - private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate; + } /// - /// Creates the TextField control. + /// The VerticalAlignment property. /// /// 3 - public TextField() : this(NDalicPINVOKE.TextField_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true) + public VerticalAlignment VerticalAlignment { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + get + { + return (VerticalAlignment)GetValue(VerticalAlignmentProperty); + } + set + { + SetValue(VerticalAlignmentProperty, value); + NotifyPropertyChanged(); + NotifyPropertyChanged(); + } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void TextChangedCallbackDelegate(IntPtr textField); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField); - /// - /// The TextChanged event. + /// The TextColor property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible. + /// /// 3 - public event EventHandler TextChanged + public Color TextColor { - add + get { - if (_textFieldTextChangedEventHandler == null) - { - _textFieldTextChangedCallbackDelegate = (OnTextChanged); - TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate); - } - _textFieldTextChangedEventHandler += value; + Color temp = (Color)GetValue(TextColorProperty); + return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A); } - remove + set { - _textFieldTextChangedEventHandler -= value; - if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false) - { - TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate); - } + SetValue(TextColorProperty, value); + NotifyPropertyChanged(); } } /// - /// The MaxLengthReached event. + /// The PlaceholderTextColor property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible. + /// /// 3 - public event EventHandler MaxLengthReached + public Vector4 PlaceholderTextColor { - add + get { - if (_textFieldMaxLengthReachedEventHandler == null) - { - _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached); - MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate); - } - _textFieldMaxLengthReachedEventHandler += value; + Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty); + return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W); } - remove + set { - if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false) - { - this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate); - } - _textFieldMaxLengthReachedEventHandler -= value; + SetValue(PlaceholderTextColorProperty, value); + NotifyPropertyChanged(); } } - internal enum ExceedPolicyType - { - ExceedPolicyOriginal, - ExceedPolicyClip - } - /// - /// The TranslatableText property.
- /// The text can set the SID value.
+ /// The ShadowOffset property. ///
- /// - /// ResourceManager about multilingual is null. - /// - /// 4 - public string TranslatableText + /// 3 + /// + /// Deprecated.(API Level 6) Use Shadow instead. + /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible. + /// + [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")] + public Vector2 ShadowOffset { get { - return textFieldTextSid; + PropertyMap map = new PropertyMap(); + GetProperty(TextField.Property.SHADOW).Get(map); + Vector2 shadowOffset = new Vector2(); + map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset); + return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y); } set { - if (NUIApplication.MultilingualResourceManager == null) - { - throw new ArgumentNullException("ResourceManager about multilingual is null"); - } - textFieldTextSid = value; - Text = SetTranslatable(textFieldTextSid); + PropertyMap temp = new PropertyMap(); + temp.Insert("offset", new PropertyValue(value)); + SetValue(ShadowProperty, temp); NotifyPropertyChanged(); } } /// - /// The TranslatablePlaceholderText property.
- /// The text can set the SID value.
+ /// The ShadowColor property. ///
- /// - /// ResourceManager about multilingual is null. - /// - /// 4 - public string TranslatablePlaceholderText + /// 3 + /// + /// Deprecated.(API Level 6) Use Shadow instead. + /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible. + /// + [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")] + public Vector4 ShadowColor { get { - return textFieldPlaceHolderTextSid; + PropertyMap map = new PropertyMap(); + GetProperty(TextField.Property.SHADOW).Get(map); + Vector4 shadowColor = new Vector4(); + map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor); + return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W); } set { - if (NUIApplication.MultilingualResourceManager == null) - { - throw new ArgumentNullException("ResourceManager about multilingual is null"); - } - textFieldPlaceHolderTextSid = value; - PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid); + PropertyMap temp = new PropertyMap(); + temp.Insert("color", new PropertyValue(value)); + SetValue(ShadowProperty, temp); NotifyPropertyChanged(); } } /// - /// The Text property. + /// The PrimaryCursorColor property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible. + /// /// 3 - public string Text + public Vector4 PrimaryCursorColor { get { - return (string)GetValue(TextProperty); + Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty); + return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W); } set { - SetValueAndForceSendChangeSignal(TextProperty, value); + SetValue(PrimaryCursorColorProperty, value); NotifyPropertyChanged(); } } /// - /// The PlaceholderText property. + /// The SecondaryCursorColor property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible. + /// /// 3 - public string PlaceholderText + public Vector4 SecondaryCursorColor { get { - return (string)GetValue(PlaceholderTextProperty); + Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty); + return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W); } set { - SetValue(PlaceholderTextProperty, value); + SetValue(SecondaryCursorColorProperty, value); NotifyPropertyChanged(); } } /// - /// The PlaceholderTextFocused property. + /// The EnableCursorBlink property. /// /// 3 - public string PlaceholderTextFocused + public bool EnableCursorBlink { get { - return (string)GetValue(PlaceholderTextFocusedProperty); + return (bool)GetValue(EnableCursorBlinkProperty); } set { - SetValue(PlaceholderTextFocusedProperty, value); + SetValue(EnableCursorBlinkProperty, value); NotifyPropertyChanged(); } } /// - /// The FontFamily property. + /// The CursorBlinkInterval property. /// /// 3 - public string FontFamily + public float CursorBlinkInterval { get { - return (string)GetValue(FontFamilyProperty); + return (float)GetValue(CursorBlinkIntervalProperty); } set { - SetValue(FontFamilyProperty, value); + SetValue(CursorBlinkIntervalProperty, value); NotifyPropertyChanged(); } } /// - /// The FontStyle property. + /// The CursorBlinkDuration property. /// /// 3 - public PropertyMap FontStyle + public float CursorBlinkDuration { get { - return (PropertyMap)GetValue(FontStyleProperty); + return (float)GetValue(CursorBlinkDurationProperty); } set { - SetValue(FontStyleProperty, value); + SetValue(CursorBlinkDurationProperty, value); NotifyPropertyChanged(); } } /// - /// The PointSize property. + /// The CursorWidth property. /// /// 3 - public float PointSize + public int CursorWidth { get { - return (float)GetValue(PointSizeProperty); + return (int)GetValue(CursorWidthProperty); } set { - SetValue(PointSizeProperty, value); + SetValue(CursorWidthProperty, value); NotifyPropertyChanged(); } } /// - /// The MaxLength property. + /// The GrabHandleImage property. /// /// 3 - public int MaxLength + public string GrabHandleImage { get { - return (int)GetValue(MaxLengthProperty); + return (string)GetValue(GrabHandleImageProperty); } set { - SetValue(MaxLengthProperty, value); + SetValue(GrabHandleImageProperty, value); NotifyPropertyChanged(); } } /// - /// The ExceedPolicy property. + /// The GrabHandlePressedImage property. /// /// 3 - public int ExceedPolicy + public string GrabHandlePressedImage { get { - return (int)GetValue(ExceedPolicyProperty); + return (string)GetValue(GrabHandlePressedImageProperty); } set { - SetValue(ExceedPolicyProperty, value); + SetValue(GrabHandlePressedImageProperty, value); NotifyPropertyChanged(); } } /// - /// The HorizontalAlignment property. + /// The ScrollThreshold property. /// /// 3 - public HorizontalAlignment HorizontalAlignment + public float ScrollThreshold { get { - return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty); + return (float)GetValue(ScrollThresholdProperty); } set { - SetValue(HorizontalAlignmentProperty, value); + SetValue(ScrollThresholdProperty, value); NotifyPropertyChanged(); } } /// - /// The VerticalAlignment property. + /// The ScrollSpeed property. /// /// 3 - public VerticalAlignment VerticalAlignment + public float ScrollSpeed { get { - return (VerticalAlignment)GetValue(VerticalAlignmentProperty); + return (float)GetValue(ScrollSpeedProperty); } set { - SetValue(VerticalAlignmentProperty, value); - NotifyPropertyChanged(); + SetValue(ScrollSpeedProperty, value); NotifyPropertyChanged(); } } /// - /// The TextColor property. + /// The SelectionHandleImageLeft property. + /// The selectionHandleImageLeft map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 - public Color TextColor + public PropertyMap SelectionHandleImageLeft { get { - return (Color)GetValue(TextColorProperty); + return (PropertyMap)GetValue(SelectionHandleImageLeftProperty); } set { - SetValue(TextColorProperty, value); + SetValue(SelectionHandleImageLeftProperty, value); NotifyPropertyChanged(); } } /// - /// The PlaceholderTextColor property. + /// The SelectionHandleImageRight property. + /// The selectionHandleImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 - public Vector4 PlaceholderTextColor + public PropertyMap SelectionHandleImageRight { get { - return (Vector4)GetValue(PlaceholderTextColorProperty); + return (PropertyMap)GetValue(SelectionHandleImageRightProperty); } set { - SetValue(PlaceholderTextColorProperty, value); + SetValue(SelectionHandleImageRightProperty, value); NotifyPropertyChanged(); } } /// - /// The ShadowOffset property. + /// Set SelectionHandleImage to TextField.
///
- /// 3 + /// The SelectionHandleImage /// - /// Deprecated.(API Level 6) Use Shadow instead. + /// SetSelectionHandleImage specifies the display image used for the selection handle through .
///
- [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")] - public Vector2 ShadowOffset + /// + /// 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) { - get + if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl)) { - PropertyMap map = new PropertyMap(); - GetProperty(TextField.Property.SHADOW).Get(map); - Vector2 shadowOffset = new Vector2(); - map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset); - return shadowOffset; + SetValue(SelectionHandleImageLeftProperty, TextUtils.GetFileNameMap(selectionHandleImage.LeftImageUrl)); } - set + + if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl)) { - PropertyMap temp = new PropertyMap(); - temp.Insert("offset", new PropertyValue(value)); - SetValue(ShadowProperty, temp); - NotifyPropertyChanged(); + SetValue(SelectionHandleImageRightProperty, TextUtils.GetFileNameMap(selectionHandleImage.RightImageUrl)); } } /// - /// The ShadowColor property. + /// Get SelectionHandleImage from TextField.
///
- /// 3 + /// The SelectionHandleImage /// - /// Deprecated.(API Level 6) Use Shadow instead. + /// /// - [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")] - public Vector4 ShadowColor + [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 { get { - PropertyMap map = new PropertyMap(); - GetProperty(TextField.Property.SHADOW).Get(map); - Vector4 shadowColor = new Vector4(); - map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor); - return shadowColor; + return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty); } set { - PropertyMap temp = new PropertyMap(); - temp.Insert("color", new PropertyValue(value)); - SetValue(ShadowProperty, temp); + SetValue(SelectionHandlePressedImageLeftProperty, value); NotifyPropertyChanged(); } } /// - /// The PrimaryCursorColor property. + /// The SelectionHandlePressedImageRight property. + /// The selectionHandlePressedImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 - public Vector4 PrimaryCursorColor + public PropertyMap SelectionHandlePressedImageRight { get { - return (Vector4)GetValue(PrimaryCursorColorProperty); + return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty); } set { - SetValue(PrimaryCursorColorProperty, value); + SetValue(SelectionHandlePressedImageRightProperty, value); NotifyPropertyChanged(); } } /// - /// The SecondaryCursorColor property. + /// Set SelectionHandlePressedImage to TextField.
///
- /// 3 - public Vector4 SecondaryCursorColor + /// 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) { - get + if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl)) { - return (Vector4)GetValue(SecondaryCursorColorProperty); + SetValue(SelectionHandlePressedImageLeftProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl)); } - set + + if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl)) { - SetValue(SecondaryCursorColorProperty, value); - NotifyPropertyChanged(); + SetValue(SelectionHandlePressedImageRightProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.RightImageUrl)); } } /// - /// The EnableCursorBlink property. + /// 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 bool EnableCursorBlink + public PropertyMap SelectionHandleMarkerImageLeft { get { - return (bool)GetValue(EnableCursorBlinkProperty); + return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty); } set { - SetValue(EnableCursorBlinkProperty, value); + SetValue(SelectionHandleMarkerImageLeftProperty, value); NotifyPropertyChanged(); } } /// - /// The CursorBlinkInterval property. + /// The SelectionHandleMarkerImageRight property. + /// The selectionHandleMarkerImageRight map contains the following key :
+ /// + /// filename (string)The path of image file + /// ///
/// 3 - public float CursorBlinkInterval + public PropertyMap SelectionHandleMarkerImageRight { get { - return (float)GetValue(CursorBlinkIntervalProperty); + return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty); } set { - SetValue(CursorBlinkIntervalProperty, value); + SetValue(SelectionHandleMarkerImageRightProperty, value); NotifyPropertyChanged(); } } /// - /// The CursorBlinkDuration property. + /// 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. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible. + /// /// 3 - public float CursorBlinkDuration + public Vector4 SelectionHighlightColor { get { - return (float)GetValue(CursorBlinkDurationProperty); + Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty); + return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W); } set { - SetValue(CursorBlinkDurationProperty, value); + SetValue(SelectionHighlightColorProperty, value); NotifyPropertyChanged(); } } /// - /// The CursorWidth property. + /// The DecorationBoundingBox property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible. + /// /// 3 - public int CursorWidth + public Rectangle DecorationBoundingBox { get { - return (int)GetValue(CursorWidthProperty); + Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty); + return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height); } set { - SetValue(CursorWidthProperty, value); + SetValue(DecorationBoundingBoxProperty, value); NotifyPropertyChanged(); } } /// - /// The GrabHandleImage property. + /// 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 string GrabHandleImage + public PropertyMap InputMethodSettings { get { - return (string)GetValue(GrabHandleImageProperty); + return (PropertyMap)GetValue(InputMethodSettingsProperty); } set { - SetValue(GrabHandleImageProperty, value); + SetValue(InputMethodSettingsProperty, value); NotifyPropertyChanged(); } } /// - /// The GrabHandlePressedImage property. + /// The InputColor property. /// + /// + /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible. + /// /// 3 - public string GrabHandlePressedImage + public Vector4 InputColor { get { - return (string)GetValue(GrabHandlePressedImageProperty); + Vector4 temp = (Vector4)GetValue(InputColorProperty); + return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W); } set { - SetValue(GrabHandlePressedImageProperty, value); + SetValue(InputColorProperty, value); NotifyPropertyChanged(); } } /// - /// The ScrollThreshold property. + /// The EnableMarkup property. /// /// 3 - public float ScrollThreshold + public bool EnableMarkup { get { - return (float)GetValue(ScrollThresholdProperty); + return (bool)GetValue(EnableMarkupProperty); } set { - SetValue(ScrollThresholdProperty, value); + SetValue(EnableMarkupProperty, value); NotifyPropertyChanged(); } } /// - /// The ScrollSpeed property. + /// The InputFontFamily property. /// /// 3 - public float ScrollSpeed + public string InputFontFamily { get { - return (float)GetValue(ScrollSpeedProperty); + return (string)GetValue(InputFontFamilyProperty); } set { - SetValue(ScrollSpeedProperty, value); + SetValue(InputFontFamilyProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHandleImageLeft property. + /// 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 - public PropertyMap SelectionHandleImageLeft + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] + public PropertyMap InputFontStyle { get { - return (PropertyMap)GetValue(SelectionHandleImageLeftProperty); + return (PropertyMap)GetValue(InputFontStyleProperty); } set { - SetValue(SelectionHandleImageLeftProperty, value); + SetValue(InputFontStyleProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHandleImageRight property. + /// Set InputFontStyle to TextField.
///
- /// 3 - public PropertyMap SelectionHandleImageRight + /// 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) { - get - { - return (PropertyMap)GetValue(SelectionHandleImageRightProperty); - } - set - { - SetValue(SelectionHandleImageRightProperty, value); - NotifyPropertyChanged(); - } + SetValue(InputFontStyleProperty, TextUtils.GetFontStyleMap(fontStyle)); } /// - /// The SelectionHandlePressedImageLeft property. + /// Get InputFontStyle from TextField.
+ ///
+ /// The FontStyle + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public FontStyle GetInputFontStyle() + { + return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty)); + } + + /// + /// The InputPointSize property. /// /// 3 - public PropertyMap SelectionHandlePressedImageLeft + public float InputPointSize { get { - return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty); + return (float)GetValue(InputPointSizeProperty); } set { - SetValue(SelectionHandlePressedImageLeftProperty, value); + SetValue(InputPointSizeProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHandlePressedImageRight property. + /// 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 - public PropertyMap SelectionHandlePressedImageRight + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] + public PropertyMap Underline { get { - return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty); + return (PropertyMap)GetValue(UnderlineProperty); } set { - SetValue(SelectionHandlePressedImageRightProperty, value); + SetValue(UnderlineProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHandleMarkerImageLeft property. + /// 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 - public PropertyMap SelectionHandleMarkerImageLeft + public string InputUnderline { get { - return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty); + return (string)GetValue(InputUnderlineProperty); } set { - SetValue(SelectionHandleMarkerImageLeftProperty, value); + SetValue(InputUnderlineProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHandleMarkerImageRight property. + /// 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 - public PropertyMap SelectionHandleMarkerImageRight + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] + public PropertyMap Shadow { get { - return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty); + return (PropertyMap)GetValue(ShadowProperty); } set { - SetValue(SelectionHandleMarkerImageRightProperty, value); + SetValue(ShadowProperty, value); NotifyPropertyChanged(); } } /// - /// The SelectionHighlightColor property. + /// 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 - public Vector4 SelectionHighlightColor + public string InputShadow { get { - return (Vector4)GetValue(SelectionHighlightColorProperty); + return (string)GetValue(InputShadowProperty); } set { - SetValue(SelectionHighlightColorProperty, value); + SetValue(InputShadowProperty, value); NotifyPropertyChanged(); } } /// - /// The DecorationBoundingBox property. + /// The Emboss property. /// /// 3 - public Rectangle DecorationBoundingBox + public string Emboss { get { - return (Rectangle)GetValue(DecorationBoundingBoxProperty); + return (string)GetValue(EmbossProperty); } set { - SetValue(DecorationBoundingBoxProperty, value); + SetValue(EmbossProperty, value); NotifyPropertyChanged(); } } /// - /// The InputMethodSettings property. + /// The InputEmboss property. /// /// 3 - public PropertyMap InputMethodSettings + public string InputEmboss { get { - return (PropertyMap)GetValue(InputMethodSettingsProperty); + return (string)GetValue(InputEmbossProperty); } set { - SetValue(InputMethodSettingsProperty, value); + SetValue(InputEmbossProperty, value); NotifyPropertyChanged(); } } /// - /// The InputColor property. + /// 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 - public Vector4 InputColor + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")] + public PropertyMap Outline { get { - return (Vector4)GetValue(InputColorProperty); + return (PropertyMap)GetValue(OutlineProperty); } set { - SetValue(InputColorProperty, value); + SetValue(OutlineProperty, value); NotifyPropertyChanged(); } } /// - /// The EnableMarkup property. + /// 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 - public bool EnableMarkup + public string InputOutline { get { - return (bool)GetValue(EnableMarkupProperty); + return (string)GetValue(InputOutlineProperty); } set { - SetValue(EnableMarkupProperty, value); + SetValue(InputOutlineProperty, value); NotifyPropertyChanged(); } } /// - /// The InputFontFamily property. + /// 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 string InputFontFamily + public Tizen.NUI.PropertyMap HiddenInputSettings { get { - return (string)GetValue(InputFontFamilyProperty); + return (PropertyMap)GetValue(HiddenInputSettingsProperty); } set { - SetValue(InputFontFamilyProperty, value); + SetValue(HiddenInputSettingsProperty, value); NotifyPropertyChanged(); } } /// - /// The InputFontStyle property. + /// 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 - public PropertyMap InputFontStyle + public float PixelSize { get { - return (PropertyMap)GetValue(InputFontStyleProperty); + return (float)GetValue(PixelSizeProperty); } set { - SetValue(InputFontStyleProperty, value); + SetValue(PixelSizeProperty, value); NotifyPropertyChanged(); } } /// - /// The InputPointSize property. + /// The Enable selection property. /// /// 3 - public float InputPointSize + public bool EnableSelection { get { - return (float)GetValue(InputPointSizeProperty); + return (bool)GetValue(EnableSelectionProperty); } set { - SetValue(InputPointSizeProperty, value); + SetValue(EnableSelectionProperty, value); NotifyPropertyChanged(); } } /// - /// The Underline property. + /// The Enable selection property. /// - /// 3 - public PropertyMap Underline + /// 6 + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool EnableGrabHandle { get { - return (PropertyMap)GetValue(UnderlineProperty); + return (bool)GetValue(EnableGrabHandleProperty); } set { - SetValue(UnderlineProperty, value); + SetValue(EnableGrabHandleProperty, value); NotifyPropertyChanged(); } } /// - /// The InputUnderline property. + /// The Enable selection property. /// - /// 3 - public string InputUnderline + /// 6 + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool EnableGrabHandlePopup { get { - return (string)GetValue(InputUnderlineProperty); + return (bool)GetValue(EnableGrabHandlePopupProperty); } set { - SetValue(InputUnderlineProperty, value); + SetValue(EnableGrabHandlePopupProperty, value); NotifyPropertyChanged(); } } /// - /// The Shadow property. + /// The portion of the text that has been selected by the user. /// - /// 3 - public PropertyMap Shadow + /// + /// Empty string when nothing is selected. + /// + /// 9 + public string SelectedText { get { - return (PropertyMap)GetValue(ShadowProperty); - } - set - { - SetValue(ShadowProperty, value); - NotifyPropertyChanged(); + string temp; + GetProperty(TextField.Property.SelectedText).Get(out temp); + return temp; } } /// - /// The InputShadow property. + /// The start index for selection. /// - /// 3 - public string InputShadow + /// + /// When there is no selection, the index is current cursor position. + /// + /// 9 + public int SelectedTextStart { get { - return (string)GetValue(InputShadowProperty); - } - set - { - SetValue(InputShadowProperty, value); - NotifyPropertyChanged(); + int temp; + GetProperty(TextField.Property.SelectedTextStart).Get(out temp); + return temp; } } /// - /// The Emboss property. + /// The end index for selection. /// - /// 3 - public string Emboss + /// + /// When there is no selection, the index is current cursor position. + /// + /// 9 + public int SelectedTextEnd { get { - return (string)GetValue(EmbossProperty); - } - set - { - SetValue(EmbossProperty, value); - NotifyPropertyChanged(); + int temp; + GetProperty(TextField.Property.SelectedTextEnd).Get(out temp); + return temp; } } /// - /// The InputEmboss property. + /// Enable editing in text control. /// - /// 3 - public string InputEmboss + /// 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 { - return (string)GetValue(InputEmbossProperty); + bool temp; + GetProperty(TextField.Property.EnableEditing).Get(out temp); + return temp; } set { - SetValue(InputEmbossProperty, value); + SetProperty(TextField.Property.EnableEditing, new PropertyValue(value)); NotifyPropertyChanged(); } } /// - /// The Outline property. + /// Specify primary cursor (caret) position in text control. /// - /// 3 - public PropertyMap Outline + [EditorBrowsable(EditorBrowsableState.Never)] + public int PrimaryCursorPosition { get { - return (PropertyMap)GetValue(OutlineProperty); + int temp; + using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition)) + { + propertyValue.Get(out temp); + } + return temp; } set { - SetValue(OutlineProperty, value); - NotifyPropertyChanged(); + using (PropertyValue propertyValue = new PropertyValue(value)) + { + SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue); + NotifyPropertyChanged(); + } } } /// - /// The InputOutline property. + /// The GrabHandleColor property. /// - /// 3 - public string InputOutline + /// + /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Color GrabHandleColor { get { - return (string)GetValue(InputOutlineProperty); + Color temp = (Color)GetValue(GrabHandleColorProperty); + return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A); } set { - SetValue(InputOutlineProperty, value); + SetValue(GrabHandleColorProperty, value); NotifyPropertyChanged(); } } /// - /// The HiddenInputSettings property. + /// 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.
///
- /// 3 - public Tizen.NUI.PropertyMap HiddenInputSettings + /// 9 + public EllipsisPosition EllipsisPosition { get { - return (PropertyMap)GetValue(HiddenInputSettingsProperty); + return (EllipsisPosition)GetValue(EllipsisPositionProperty); } set { - SetValue(HiddenInputSettingsProperty, value); + SetValue(EllipsisPositionProperty, value); NotifyPropertyChanged(); } } /// - /// The PixelSize property. + /// Set InputFilter to TextField.
///
- /// 3 - public float PixelSize + /// The InputFilter + /// + /// filters input based on regular expressions.
+ /// Users can set the Accepted or Rejected regular expression set, or both.
+ /// If both are used, Rejected has higher priority.
+ /// The character set must follow the regular expression rules.
+ /// Behaviour can not be guaranteed for incorrect grammars.
+ /// Refer the link below for detailed rules.
+ /// The functions in std::regex library use the ECMAScript grammar:
+ /// http://cplusplus.com/reference/regex/ECMAScript/
+ /// 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 + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetInputFilter(InputFilter inputFilter) { - get - { - return (float)GetValue(PixelSizeProperty); - } - set - { - SetValue(PixelSizeProperty, value); - NotifyPropertyChanged(); - } + SetProperty(TextField.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter))); } /// - /// The Enable selection property. + /// Get InputFilter from TextField.
///
- /// 3 - public bool EnableSelection + /// The InputFilter + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public InputFilter GetInputFilter() { - get - { - return (bool)GetValue(EnableSelectionProperty); - } - set - { - SetValue(EnableSelectionProperty, value); - NotifyPropertyChanged(); - } + 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. @@ -1942,11 +1797,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 { @@ -1956,6 +1881,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. @@ -2010,23 +1981,49 @@ namespace Tizen.NUI.BaseComponents } } - internal 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(); } + else + { + newFontSizeScale = fontSizeScale; + removeFontSizeChangedCallback(); + } + + SetValue(FontSizeScaleProperty, newFontSizeScale); + NotifyPropertyChanged(); } } @@ -2040,34 +2037,57 @@ namespace Tizen.NUI.BaseComponents if (inputMethodCotext == null) { /*Avoid raising InputMethodContext reference count.*/ - inputMethodCotext = new InputMethodContext(NDalicPINVOKE.TextField_GetInputMethodContext(swigCPtr), true); + inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return inputMethodCotext; } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj) + /// + /// Select the whole text. + /// + /// 9 + public void SelectWholeText() { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + Interop.TextField.SelectWholeText(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal TextFieldSignal TextChangedSignal() + /// + /// Select text from start to end index.
+ /// The index is valid when 0 or positive. + ///
+ /// 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) { - TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false); + 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(); - return ret; } - internal TextFieldSignal MaxLengthReachedSignal() + /// + /// Clear selection of the text.
+ /// Valid when selection is activate. + ///
+ /// 9 + public void SelectNone() { - TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false); + _ = Interop.TextField.SelectNone(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } 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(NDalicPINVOKE.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; } @@ -2084,6 +2104,13 @@ namespace Tizen.NUI.BaseComponents return; } + if (systemlangTextFlag) + { + SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged; + } + + removeFontSizeChangedCallback(); + if (type == DisposeTypes.Explicit) { //Called by User @@ -2096,58 +2123,44 @@ namespace Tizen.NUI.BaseComponents //because the execution order of Finalizes is non-deterministic. if (this.HasBody()) { - if (_textFieldMaxLengthReachedCallbackDelegate != null) + if (textFieldCursorPositionChangedCallbackDelegate != null) { - this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate); + this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate); } - if (_textFieldTextChangedCallbackDelegate != null) + if (textFieldMaxLengthReachedCallbackDelegate != null) { - TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate); + this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate); } - } - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) + if (textFieldSelectionClearedCallbackDelegate != null) { - swigCMemOwn = false; - // In order to speed up IME hide, temporarily add - GetInputMethodContext()?.DestroyContext(); - NDalicPINVOKE.delete_TextField(swigCPtr); + this.SelectionClearedSignal().Disconnect(textFieldSelectionClearedCallbackDelegate); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - base.Dispose(type); - } + if (textFieldSelectionChangedCallbackDelegate != null) + { + this.SelectionChangedSignal().Disconnect(textFieldSelectionChangedCallbackDelegate); + } - private void OnTextChanged(IntPtr textField) - { - TextChangedEventArgs e = new TextChangedEventArgs(); + if (textFieldTextChangedCallbackDelegate != null) + { + TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate); + } + } - // Populate all members of "e" (TextChangedEventArgs) with real data - e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField; + TextChanged -= TextEditorTextChanged; - if (_textFieldTextChangedEventHandler != null) - { - //here we send all data to user event handlers - _textFieldTextChangedEventHandler(this, e); - } + base.Dispose(type); } - private void OnMaxLengthReached(IntPtr textField) + /// This will not be public opened. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { - MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs(); - - // Populate all members of "e" (MaxLengthReachedEventArgs) with real data - e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField; - - if (_textFieldMaxLengthReachedEventHandler != null) - { - //here we send all data to user event handlers - _textFieldMaxLengthReachedEventHandler(this, e); - } + // In order to speed up IME hide, temporarily add + GetInputMethodContext()?.DestroyContext(); + Interop.TextField.DeleteTextField(swigCPtr); } private string SetTranslatable(string textFieldSid) @@ -2158,7 +2171,7 @@ namespace Tizen.NUI.BaseComponents { if (systemlangTextFlag == false) { - SystemSettings.LocaleLanguageChanged += new WeakEventHandler(SystemSettings_LocaleLanguageChanged).Handler; + SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged; systemlangTextFlag = true; } return translatableText; @@ -2180,112 +2193,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("_", "-"))); + } } - /// - /// The TextChanged event arguments. - /// - /// 3 - public class TextChangedEventArgs : EventArgs + private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e) { - private TextField _textField; + float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value); + SetValue(FontSizeScaleProperty, newFontSizeScale); + NotifyPropertyChanged(); + } - /// - /// TextField. - /// - /// 3 - public TextField TextField + private void addFontSizeChangedCallback() + { + if (hasFontSizeChangedCallback != true) { - get + try { - return _textField; + SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged; + hasFontSizeChangedCallback = true; } - set + catch (Exception e) { - _textField = value; + Console.WriteLine("{0} Exception caught.", e); + hasFontSizeChangedCallback = false; } } } - /// - /// The MaxLengthReached event arguments. - /// - /// 3 - public class MaxLengthReachedEventArgs : EventArgs + private void removeFontSizeChangedCallback() { - private TextField _textField; - - /// - /// TextField. - /// - /// 3 - public TextField TextField + if (hasFontSizeChangedCallback == true) { - get + try { - return _textField; + SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged; + hasFontSizeChangedCallback = false; } - set + catch (Exception e) { - _textField = value; + 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 RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get(); - internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get(); - internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get(); - internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get(); - internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get(); - internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get(); - internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get(); - internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get(); - internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get(); - internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get(); - internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get(); - internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get(); - internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get(); - internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get(); - internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get(); - internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get(); - internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get(); - internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get(); - internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get(); - internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get(); - internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get(); - internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get(); - internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get(); - internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get(); - internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get(); - internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get(); - internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get(); - internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get(); - internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get(); - internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get(); - internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get(); - internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get(); - internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get(); - internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get(); - internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get(); - internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get(); - internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get(); - internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get(); - internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get(); - internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get(); - internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get(); - internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get(); - internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get(); - internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get(); - internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get(); - internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get(); - internal static readonly int ENABLE_SHIFT_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SHIFT_SELECTION_get(); - internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = NDalicManualPINVOKE.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_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 @@ -2303,5 +2329,46 @@ namespace Tizen.NUI.BaseComponents Outline = 0x0080 } } + + private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height) + { + DecorationBoundingBox = new Rectangle(x, y, width, height); + } + private void OnInputColorChanged(float x, float y, float z, float w) + { + InputColor = new Vector4(x, y, z, w); + } + private void OnPlaceholderTextColorChanged(float r, float g, float b, float a) + { + PlaceholderTextColor = new Vector4(r, g, b, a); + } + private void OnPrimaryCursorColorChanged(float x, float y, float z, float w) + { + PrimaryCursorColor = new Vector4(x, y, z, w); + } + private void OnSecondaryCursorColorChanged(float x, float y, float z, float w) + { + SecondaryCursorColor = new Vector4(x, y, z, w); + } + private void OnSelectionHighlightColorChanged(float x, float y, float z, float w) + { + SelectionHighlightColor = new Vector4(x, y, z, w); + } + private void OnShadowColorChanged(float x, float y, float z, float w) + { + ShadowColor = new Vector4(x, y, z, w); + } + private void OnShadowOffsetChanged(float x, float y) + { + ShadowOffset = new Vector2(x, y); + } + private void OnTextColorChanged(float r, float g, float b, float a) + { + 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); + } } }