/*
- * 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.
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
{
/// A control which provides a single line editable text field.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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) =>
+ /// <summary>
+ /// Creates the TextField control.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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.
+ /// <summary>
+ /// Creates the TextField with setting the status of shown or hidden.
+ /// </summary>
+ /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
+ /// 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);
+ }
+
+ /// <summary>
+ /// Get attributes, it is abstract function and must be override.
+ /// </summary>
[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
+ }
+
+ /// <summary>
+ /// The TranslatableText property.<br />
+ /// The text can set the SID value.<br />
+ /// </summary>
+ /// <exception cref='ArgumentNullException'>
+ /// ResourceManager about multilingual is null.
+ /// </exception>
+ /// <since_tizen> 4 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The TranslatablePlaceholderText property.<br />
+ /// The text can set the SID value.<br />
+ /// </summary>
+ /// <exception cref='ArgumentNullException'>
+ /// ResourceManager about multilingual is null.
+ /// </exception>
+ /// <since_tizen> 4 </since_tizen>
+ 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.
+ }
+
+ /// <summary>
+ /// The TranslatablePlaceholderTextFocused property.<br />
+ /// The text can set the SID value.<br />
+ /// </summary>
+ /// <exception cref='ArgumentNullException'>
+ /// ResourceManager about multilingual is null.
+ /// </exception>
+ /// 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) =>
+ }
+
+ /// <summary>
+ /// The Text property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The PlaceholderText property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The PlaceholderTextFocused property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The FontFamily property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The FontStyle property.
+ /// The fontStyle map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
+ /// <item><term>weight (string)</term><description>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)</description></item>
+ /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
+ /// </list>
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ [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.
+ }
+
+ /// <summary>
+ /// Set FontStyle to TextField. <br />
+ /// </summary>
+ /// <param name="fontStyle">The FontStyle</param>
+ /// <remarks>
+ /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetFontStyle method.
+ /// <code>
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// field.SetFontStyle(fontStyle);
+ /// </code>
+ /// </example>
[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));
+ }
+
+ /// <summary>
+ /// Get FontStyle from TextField. <br />
+ /// </summary>
+ /// <returns>The FontStyle</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.FontStyle"/>
+ /// </remarks>
[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));
+ }
+
+ /// <summary>
+ /// The PointSize property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The MaxLength property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The ExceedPolicy property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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) =>
+ }
+
+ /// <summary>
+ /// The HorizontalAlignment property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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<TextChangedEventArgs> _textFieldTextChangedEventHandler;
- private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
- private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
- private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
+ }
/// <summary>
- /// Creates the TextField control.
+ /// The VerticalAlignment property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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);
-
/// <summary>
- /// The TextChanged event.
+ /// The TextColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- public event EventHandler<TextChangedEventArgs> 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();
}
}
/// <summary>
- /// The MaxLengthReached event.
+ /// The PlaceholderTextColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- public event EventHandler<MaxLengthReachedEventArgs> 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
- }
-
/// <summary>
- /// The TranslatableText property.<br />
- /// The text can set the SID value.<br />
- /// </summary>
- /// <exception cref='ArgumentNullException'>
- /// ResourceManager about multilingual is null.
- /// </exception>
- /// <since_tizen> 4 </since_tizen>
- public string TranslatableText
+ /// The ShadowOffset property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <remarks>
+ /// Deprecated.(API Level 6) Use Shadow instead.
+ /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
+ /// </remarks>
+ [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();
}
}
/// <summary>
- /// The TranslatablePlaceholderText property.<br />
- /// The text can set the SID value.<br />
+ /// The ShadowColor property.
/// </summary>
- /// <exception cref='ArgumentNullException'>
- /// ResourceManager about multilingual is null.
- /// </exception>
- /// <since_tizen> 4 </since_tizen>
- public string TranslatablePlaceholderText
+ /// <since_tizen> 3 </since_tizen>
+ /// <remarks>
+ /// Deprecated.(API Level 6) Use Shadow instead.
+ /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [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();
}
}
/// <summary>
- /// The Text property.
+ /// The PrimaryCursorColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The PlaceholderText property.
+ /// The SecondaryCursorColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The PlaceholderTextFocused property.
+ /// The EnableCursorBlink property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public string PlaceholderTextFocused
+ public bool EnableCursorBlink
{
get
{
- return (string)GetValue(PlaceholderTextFocusedProperty);
+ return (bool)GetValue(EnableCursorBlinkProperty);
}
set
{
- SetValue(PlaceholderTextFocusedProperty, value);
+ SetValue(EnableCursorBlinkProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The FontFamily property.
+ /// The CursorBlinkInterval property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public string FontFamily
+ public float CursorBlinkInterval
{
get
{
- return (string)GetValue(FontFamilyProperty);
+ return (float)GetValue(CursorBlinkIntervalProperty);
}
set
{
- SetValue(FontFamilyProperty, value);
+ SetValue(CursorBlinkIntervalProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The FontStyle property.
+ /// The CursorBlinkDuration property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PropertyMap FontStyle
+ public float CursorBlinkDuration
{
get
{
- return (PropertyMap)GetValue(FontStyleProperty);
+ return (float)GetValue(CursorBlinkDurationProperty);
}
set
{
- SetValue(FontStyleProperty, value);
+ SetValue(CursorBlinkDurationProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The PointSize property.
+ /// The CursorWidth property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public float PointSize
+ public int CursorWidth
{
get
{
- return (float)GetValue(PointSizeProperty);
+ return (int)GetValue(CursorWidthProperty);
}
set
{
- SetValue(PointSizeProperty, value);
+ SetValue(CursorWidthProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The MaxLength property.
+ /// The GrabHandleImage property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public int MaxLength
+ public string GrabHandleImage
{
get
{
- return (int)GetValue(MaxLengthProperty);
+ return (string)GetValue(GrabHandleImageProperty);
}
set
{
- SetValue(MaxLengthProperty, value);
+ SetValue(GrabHandleImageProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The ExceedPolicy property.
+ /// The GrabHandlePressedImage property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public int ExceedPolicy
+ public string GrabHandlePressedImage
{
get
{
- return (int)GetValue(ExceedPolicyProperty);
+ return (string)GetValue(GrabHandlePressedImageProperty);
}
set
{
- SetValue(ExceedPolicyProperty, value);
+ SetValue(GrabHandlePressedImageProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The HorizontalAlignment property.
+ /// The ScrollThreshold property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public HorizontalAlignment HorizontalAlignment
+ public float ScrollThreshold
{
get
{
- return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
+ return (float)GetValue(ScrollThresholdProperty);
}
set
{
- SetValue(HorizontalAlignmentProperty, value);
+ SetValue(ScrollThresholdProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The VerticalAlignment property.
+ /// The ScrollSpeed property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public VerticalAlignment VerticalAlignment
+ public float ScrollSpeed
{
get
{
- return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
+ return (float)GetValue(ScrollSpeedProperty);
}
set
{
- SetValue(VerticalAlignmentProperty, value);
- NotifyPropertyChanged();
+ SetValue(ScrollSpeedProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The TextColor property.
+ /// The SelectionHandleImageLeft property.
+ /// The selectionHandleImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Color TextColor
+ public PropertyMap SelectionHandleImageLeft
{
get
{
- return (Color)GetValue(TextColorProperty);
+ return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
}
set
{
- SetValue(TextColorProperty, value);
+ SetValue(SelectionHandleImageLeftProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The PlaceholderTextColor property.
+ /// The SelectionHandleImageRight property.
+ /// The selectionHandleImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Vector4 PlaceholderTextColor
+ public PropertyMap SelectionHandleImageRight
{
get
{
- return (Vector4)GetValue(PlaceholderTextColorProperty);
+ return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
}
set
{
- SetValue(PlaceholderTextColorProperty, value);
+ SetValue(SelectionHandleImageRightProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The ShadowOffset property.
+ /// Set SelectionHandleImage to TextField. <br />
/// </summary>
- /// <since_tizen> 3 </since_tizen>
+ /// <param name="selectionHandleImage">The SelectionHandleImage</param>
/// <remarks>
- /// Deprecated.(API Level 6) Use Shadow instead.
+ /// SetSelectionHandleImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
/// </remarks>
- [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
- public Vector2 ShadowOffset
+ /// <example>
+ /// The following example demonstrates how to use the SetSelectionHandleImage method.
+ /// <code>
+ /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
+ /// selectionHandleImage.LeftImageUrl = "handle_downleft.png";
+ /// selectionHandleImage.RightImageUrl = "handle_downright.png";
+ /// field.SetSelectionHandleImage(selectionHandleImage);
+ /// </code>
+ /// </example>
+ [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));
}
}
/// <summary>
- /// The ShadowColor property.
+ /// Get SelectionHandleImage from TextField. <br />
/// </summary>
- /// <since_tizen> 3 </since_tizen>
+ /// <returns>The SelectionHandleImage</returns>
/// <remarks>
- /// Deprecated.(API Level 6) Use Shadow instead.
+ /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
/// </remarks>
- [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));
+ }
+
+ /// <summary>
+ /// The SelectionHandlePressedImageLeft property.
+ /// The selectionHandlePressedImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ 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();
}
}
/// <summary>
- /// The PrimaryCursorColor property.
+ /// The SelectionHandlePressedImageRight property.
+ /// The selectionHandlePressedImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Vector4 PrimaryCursorColor
+ public PropertyMap SelectionHandlePressedImageRight
{
get
{
- return (Vector4)GetValue(PrimaryCursorColorProperty);
+ return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
}
set
{
- SetValue(PrimaryCursorColorProperty, value);
+ SetValue(SelectionHandlePressedImageRightProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The SecondaryCursorColor property.
+ /// Set SelectionHandlePressedImage to TextField. <br />
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public Vector4 SecondaryCursorColor
+ /// <param name="selectionHandlePressedImage">The SelectionHandleImage</param>
+ /// <remarks>
+ /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetSelectionHandlePressedImage method.
+ /// <code>
+ /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage();
+ /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png";
+ /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png";
+ /// field.SetSelectionHandlePressedImage(selectionHandlePressedImage);
+ /// </code>
+ /// </example>
+ [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));
}
}
/// <summary>
- /// The EnableCursorBlink property.
+ /// Get SelectionHandlePressedImage from TextField. <br />
+ /// </summary>
+ /// <returns>The SelectionHandlePressedImage</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SelectionHandleImage GetSelectionHandlePressedImage()
+ {
+ return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty), (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty));
+ }
+
+ /// <summary>
+ /// The SelectionHandleMarkerImageLeft property.
+ /// The selectionHandleMarkerImageLeft map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public bool EnableCursorBlink
+ public PropertyMap SelectionHandleMarkerImageLeft
{
get
{
- return (bool)GetValue(EnableCursorBlinkProperty);
+ return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
}
set
{
- SetValue(EnableCursorBlinkProperty, value);
+ SetValue(SelectionHandleMarkerImageLeftProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The CursorBlinkInterval property.
+ /// The SelectionHandleMarkerImageRight property.
+ /// The selectionHandleMarkerImageRight map contains the following key :<br />
+ /// <list type="table">
+ /// <item><term>filename (string)</term><description>The path of image file</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public float CursorBlinkInterval
+ public PropertyMap SelectionHandleMarkerImageRight
{
get
{
- return (float)GetValue(CursorBlinkIntervalProperty);
+ return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
}
set
{
- SetValue(CursorBlinkIntervalProperty, value);
+ SetValue(SelectionHandleMarkerImageRightProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The CursorBlinkDuration property.
+ /// Set SelectionHandleMarkerImage to TextField. <br />
+ /// </summary>
+ /// <param name="selectionHandleMarkerImage">The SelectionHandleImage</param>
+ /// <remarks>
+ /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method.
+ /// <code>
+ /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage();
+ /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png";
+ /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png";
+ /// field.SetSelectionHandleMarkerImage(selectionHandleMarkerImage);
+ /// </code>
+ /// </example>
+ [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));
+ }
+ }
+
+ /// <summary>
+ /// Get SelectionHandleMarkerImage from TextField. <br />
+ /// </summary>
+ /// <returns>The SelectionHandleMarkerImage</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SelectionHandleImage GetSelectionHandleMarkerImage()
+ {
+ return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty), (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty));
+ }
+
+ /// <summary>
+ /// The SelectionHighlightColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The CursorWidth property.
+ /// The DecorationBoundingBox property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The GrabHandleImage property.
+ /// The InputMethodSettings property.
/// </summary>
+ /// <remarks>
+ /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to set the InputMethodSettings property.
+ /// <code>
+ /// 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;
+ /// </code>
+ /// </example>
/// <since_tizen> 3 </since_tizen>
- public string GrabHandleImage
+ public PropertyMap InputMethodSettings
{
get
{
- return (string)GetValue(GrabHandleImageProperty);
+ return (PropertyMap)GetValue(InputMethodSettingsProperty);
}
set
{
- SetValue(GrabHandleImageProperty, value);
+ SetValue(InputMethodSettingsProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The GrabHandlePressedImage property.
+ /// The InputColor property.
/// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The ScrollThreshold property.
+ /// The EnableMarkup property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public float ScrollThreshold
+ public bool EnableMarkup
{
get
{
- return (float)GetValue(ScrollThresholdProperty);
+ return (bool)GetValue(EnableMarkupProperty);
}
set
{
- SetValue(ScrollThresholdProperty, value);
+ SetValue(EnableMarkupProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The ScrollSpeed property.
+ /// The InputFontFamily property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public float ScrollSpeed
+ public string InputFontFamily
{
get
{
- return (float)GetValue(ScrollSpeedProperty);
+ return (string)GetValue(InputFontFamilyProperty);
}
set
{
- SetValue(ScrollSpeedProperty, value);
+ SetValue(InputFontFamilyProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The SelectionHandleImageLeft property.
+ /// The InputFontStyle property.
+ /// The inputFontStyle map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
+ /// <item><term>weight (string)</term><description>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)</description></item>
+ /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The SelectionHandleImageRight property.
+ /// Set InputFontStyle to TextField. <br />
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public PropertyMap SelectionHandleImageRight
+ /// <param name="fontStyle">The FontStyle</param>
+ /// <remarks>
+ /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetInputFontStyle method.
+ /// <code>
+ /// var fontStyle = new Tizen.NUI.Text.FontStyle();
+ /// fontStyle.Width = FontWidthType.Expanded;
+ /// fontStyle.Weight = FontWeightType.Bold;
+ /// fontStyle.Slant = FontSlantType.Italic;
+ /// field.SetInputFontStyle(fontStyle);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetInputFontStyle(FontStyle fontStyle)
{
- get
- {
- return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
- }
- set
- {
- SetValue(SelectionHandleImageRightProperty, value);
- NotifyPropertyChanged();
- }
+ SetValue(InputFontStyleProperty, TextUtils.GetFontStyleMap(fontStyle));
}
/// <summary>
- /// The SelectionHandlePressedImageLeft property.
+ /// Get InputFontStyle from TextField. <br />
+ /// </summary>
+ /// <returns>The FontStyle</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.FontStyle"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FontStyle GetInputFontStyle()
+ {
+ return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty));
+ }
+
+ /// <summary>
+ /// The InputPointSize property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PropertyMap SelectionHandlePressedImageLeft
+ public float InputPointSize
{
get
{
- return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
+ return (float)GetValue(InputPointSizeProperty);
}
set
{
- SetValue(SelectionHandlePressedImageLeftProperty, value);
+ SetValue(InputPointSizeProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The SelectionHandlePressedImageRight property.
+ /// The Underline property.
+ /// The underline map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
+ /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
+ /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The SelectionHandleMarkerImageLeft property.
+ /// Set Underline to TextField. <br />
+ /// </summary>
+ /// <param name="underline">The Underline</param>
+ /// <remarks>
+ /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetUnderline method.
+ /// <code>
+ /// var underline = new Tizen.NUI.Text.Underline();
+ /// underline.Enable = true;
+ /// underline.Color = new Color("#3498DB");
+ /// underline.Height = 2.0f;
+ /// field.SetUnderline(underline);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetUnderline(Underline underline)
+ {
+ SetValue(UnderlineProperty, TextUtils.GetUnderlineMap(underline));
+ }
+
+ /// <summary>
+ /// Get Underline from TextField. <br />
+ /// </summary>
+ /// <returns>The Underline</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Underline"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Underline GetUnderline()
+ {
+ return TextUtils.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty));
+ }
+
+ /// <summary>
+ /// The InputUnderline property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PropertyMap SelectionHandleMarkerImageLeft
+ public string InputUnderline
{
get
{
- return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
+ return (string)GetValue(InputUnderlineProperty);
}
set
{
- SetValue(SelectionHandleMarkerImageLeftProperty, value);
+ SetValue(InputUnderlineProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The SelectionHandleMarkerImageRight property.
+ /// The Shadow property.
+ /// The shadow map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
+ /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
+ /// <item><term>blurRadius (float)</term><description>The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The SelectionHighlightColor property.
+ /// Set Shadow to TextField. <br />
+ /// </summary>
+ /// <param name="shadow">The Shadow</param>
+ /// <remarks>
+ /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetShadow method.
+ /// <code>
+ /// var shadow = new Tizen.NUI.Text.Shadow();
+ /// shadow.Offset = new Vector2(3, 3);
+ /// shadow.Color = new Color("#F1C40F");
+ /// field.SetShadow(shadow);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
+ {
+ SetValue(ShadowProperty, TextUtils.GetShadowMap(shadow));
+ }
+
+ /// <summary>
+ /// Get Shadow from TextField. <br />
+ /// </summary>
+ /// <returns>The Shadow</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Shadow"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Tizen.NUI.Text.Shadow GetShadow()
+ {
+ return TextUtils.GetShadowStruct((PropertyMap)GetValue(ShadowProperty));
+ }
+
+ /// <summary>
+ /// The InputShadow property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Vector4 SelectionHighlightColor
+ public string InputShadow
{
get
{
- return (Vector4)GetValue(SelectionHighlightColorProperty);
+ return (string)GetValue(InputShadowProperty);
}
set
{
- SetValue(SelectionHighlightColorProperty, value);
+ SetValue(InputShadowProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The DecorationBoundingBox property.
+ /// The Emboss property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Rectangle DecorationBoundingBox
+ public string Emboss
{
get
{
- return (Rectangle)GetValue(DecorationBoundingBoxProperty);
+ return (string)GetValue(EmbossProperty);
}
set
{
- SetValue(DecorationBoundingBoxProperty, value);
+ SetValue(EmbossProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The InputMethodSettings property.
+ /// The InputEmboss property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PropertyMap InputMethodSettings
+ public string InputEmboss
{
get
{
- return (PropertyMap)GetValue(InputMethodSettingsProperty);
+ return (string)GetValue(InputEmbossProperty);
}
set
{
- SetValue(InputMethodSettingsProperty, value);
+ SetValue(InputEmbossProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The InputColor property.
+ /// The Outline property.
+ /// The outline map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
+ /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
+ /// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The EnableMarkup property.
+ /// Set Outline to TextField. <br />
+ /// </summary>
+ /// <param name="outline">The Outline</param>
+ /// <remarks>
+ /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetOutline method.
+ /// <code>
+ /// var outline = new Tizen.NUI.Text.Outline();
+ /// outline.Width = 2.0f;
+ /// outline.Color = new Color("#45B39D");
+ /// field.SetOutline(outline);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetOutline(Outline outline)
+ {
+ SetValue(OutlineProperty, TextUtils.GetOutlineMap(outline));
+ }
+
+ /// <summary>
+ /// Get Outline from TextField. <br />
+ /// </summary>
+ /// <returns>The Outline</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Outline"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Outline GetOutline()
+ {
+ return TextUtils.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty));
+ }
+
+ /// <summary>
+ /// The InputOutline property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public bool EnableMarkup
+ public string InputOutline
{
get
{
- return (bool)GetValue(EnableMarkupProperty);
+ return (string)GetValue(InputOutlineProperty);
}
set
{
- SetValue(EnableMarkupProperty, value);
+ SetValue(InputOutlineProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The InputFontFamily property.
+ /// The HiddenInputSettings property.
+ /// The hiddenInputSettings map contains the following keys :<br />
+ /// <list type="table">
+ /// <item><term>HiddenInputProperty.Mode (int)</term><description>The mode for input text display (Use HiddenInputModeType)</description></item>
+ /// <item><term>HiddenInputProperty.SubstituteCharacter (int)</term><description>All input characters are substituted by this character</description></item>
+ /// <item><term>HiddenInputProperty.SubstituteCount (int)</term><description>Length of text to show or hide, available when HideCount/ShowCount mode is used</description></item>
+ /// <item><term>HiddenInputProperty.ShowLastCharacterDuration (int)</term><description>Hide last character after this duration, available when ShowLastCharacter mode</description></item>
+ /// </list>
/// </summary>
+ /// <remarks>
+ /// See <see cref="HiddenInputProperty"/> and <see cref="HiddenInputModeType"/> for a detailed description.
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to set the HiddenInputSettings property.
+ /// <code>
+ /// 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;
+ /// </code>
+ /// </example>
/// <since_tizen> 3 </since_tizen>
- 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();
}
}
/// <summary>
- /// The InputFontStyle property.
+ /// Set HiddenInput to TextField. <br />
+ /// </summary>
+ /// <param name="hiddenInput">The HiddenInput</param>
+ /// <remarks>
+ /// SetHiddenInput specifies the requested font style through <see cref="Tizen.NUI.Text.HiddenInput"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetHiddenInput method.
+ /// <code>
+ /// var hiddenInput = new Tizen.NUI.Text.HiddenInput();
+ /// hiddenInput.Mode = HiddenInputModeType.ShowLastCharacter;
+ /// hiddenInput.SubstituteCharacter = '★';
+ /// hiddenInput.SubstituteCount = 0;
+ /// hiddenInput.ShowLastCharacterDuration = 1000;
+ /// field.SetHiddenInput(hiddenInput);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetHiddenInput(HiddenInput hiddenInput)
+ {
+ SetValue(HiddenInputSettingsProperty, TextUtils.GetHiddenInputMap(hiddenInput));
+ }
+
+ /// <summary>
+ /// Get HiddenInput from TextField. <br />
+ /// </summary>
+ /// <returns>The HiddenInput</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.HiddenInput"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public HiddenInput GetHiddenInput()
+ {
+ return TextUtils.GetHiddenInputStruct((PropertyMap)GetValue(HiddenInputSettingsProperty));
+ }
+
+ /// <summary>
+ /// The PixelSize property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PropertyMap InputFontStyle
+ public float PixelSize
{
get
{
- return (PropertyMap)GetValue(InputFontStyleProperty);
+ return (float)GetValue(PixelSizeProperty);
}
set
{
- SetValue(InputFontStyleProperty, value);
+ SetValue(PixelSizeProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The InputPointSize property.
+ /// The Enable selection property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public float InputPointSize
+ public bool EnableSelection
{
get
{
- return (float)GetValue(InputPointSizeProperty);
+ return (bool)GetValue(EnableSelectionProperty);
}
set
{
- SetValue(InputPointSizeProperty, value);
+ SetValue(EnableSelectionProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The Underline property.
+ /// The Enable selection property.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public PropertyMap Underline
+ /// <since_tizen> 6 </since_tizen>
+ /// 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();
}
}
/// <summary>
- /// The InputUnderline property.
+ /// The Enable selection property.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string InputUnderline
+ /// <since_tizen> 6 </since_tizen>
+ /// 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();
}
}
/// <summary>
- /// The Shadow property.
+ /// The portion of the text that has been selected by the user.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public PropertyMap Shadow
+ /// <remarks>
+ /// Empty string when nothing is selected.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ public string SelectedText
{
get
{
- return (PropertyMap)GetValue(ShadowProperty);
- }
- set
- {
- SetValue(ShadowProperty, value);
- NotifyPropertyChanged();
+ string temp;
+ GetProperty(TextField.Property.SelectedText).Get(out temp);
+ return temp;
}
}
/// <summary>
- /// The InputShadow property.
+ /// The start index for selection.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string InputShadow
+ /// <remarks>
+ /// When there is no selection, the index is current cursor position.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ public int SelectedTextStart
{
get
{
- return (string)GetValue(InputShadowProperty);
- }
- set
- {
- SetValue(InputShadowProperty, value);
- NotifyPropertyChanged();
+ int temp;
+ GetProperty(TextField.Property.SelectedTextStart).Get(out temp);
+ return temp;
}
}
/// <summary>
- /// The Emboss property.
+ /// The end index for selection.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string Emboss
+ /// <remarks>
+ /// When there is no selection, the index is current cursor position.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ public int SelectedTextEnd
{
get
{
- return (string)GetValue(EmbossProperty);
- }
- set
- {
- SetValue(EmbossProperty, value);
- NotifyPropertyChanged();
+ int temp;
+ GetProperty(TextField.Property.SelectedTextEnd).Get(out temp);
+ return temp;
}
}
/// <summary>
- /// The InputEmboss property.
+ /// Enable editing in text control.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string InputEmboss
+ /// <since_tizen> 8 </since_tizen>
+ /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public 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();
}
}
/// <summary>
- /// The Outline property.
+ /// Specify primary cursor (caret) position in text control.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- 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();
+ }
}
}
/// <summary>
- /// The InputOutline property.
+ /// The GrabHandleColor property.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public string InputOutline
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [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();
}
}
/// <summary>
- /// 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.<br />
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public Tizen.NUI.PropertyMap HiddenInputSettings
+ /// <since_tizen> 9 </since_tizen>
+ public EllipsisPosition EllipsisPosition
{
get
{
- return (PropertyMap)GetValue(HiddenInputSettingsProperty);
+ return (EllipsisPosition)GetValue(EllipsisPositionProperty);
}
set
{
- SetValue(HiddenInputSettingsProperty, value);
+ SetValue(EllipsisPositionProperty, value);
NotifyPropertyChanged();
}
}
/// <summary>
- /// The PixelSize property.
+ /// Set InputFilter to TextField.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public float PixelSize
+ /// <param name="inputFilter">The InputFilter</param>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
+ /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
+ /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description.
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetInputFilter method.
+ /// <code>
+ /// 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
+ /// </code>
+ /// </example>
+ /// <since_tizen> 9 </since_tizen>
+ public void SetInputFilter(InputFilter inputFilter)
{
- get
- {
- return (float)GetValue(PixelSizeProperty);
- }
- set
- {
- SetValue(PixelSizeProperty, value);
- NotifyPropertyChanged();
- }
+ SetProperty(TextField.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter)));
}
/// <summary>
- /// The Enable selection property.
+ /// Get InputFilter from TextField.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public bool EnableSelection
+ /// <returns>The InputFilter</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.InputFilter"/>
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ 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);
}
/// <summary>
/// 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 :<br />
+ /// <list type="table">
+ /// <item><term>text (string)</term><description>The text to display when the TextField is empty and inactive</description></item>
+ /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
+ /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
+ /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
+ /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
+ /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
+ /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
+ /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
+ /// </list>
/// </summary>
/// <example>
/// The following example demonstrates how to set the Placeholder property.
/// </code>
/// </example>
/// <since_tizen> 3 </since_tizen>
+ [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
{
}
/// <summary>
+ /// Set Placeholder to TextField. <br />
+ /// </summary>
+ /// <param name="placeholder">The Placeholder</param>
+ /// <remarks>
+ /// SetPlaceholder specifies the attributes of the placeholder property through <see cref="Tizen.NUI.Text.Placeholder"/>. <br />
+ /// </remarks>
+ /// <example>
+ /// The following example demonstrates how to use the SetPlaceholder method.
+ /// <code>
+ /// 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);
+ /// </code>
+ /// </example>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetPlaceholder(Placeholder placeholder)
+ {
+ SetValue(PlaceholderProperty, TextUtils.GetPlaceholderMap(placeholder));
+ }
+
+ /// <summary>
+ /// Get Placeholder from TextField. <br />
+ /// </summary>
+ /// <returns>The Placeholder</returns>
+ /// <remarks>
+ /// <see cref="Tizen.NUI.Text.Placeholder"/>
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Placeholder GetPlaceholder()
+ {
+ return TextUtils.GetPlaceholderStruct((PropertyMap)GetValue(PlaceholderProperty));
+ }
+
+ /// <summary>
/// The Ellipsis property.<br />
/// Enable or disable the ellipsis.<br />
/// Placeholder PropertyMap is used to add ellipsis to placeholder text.
}
}
- internal override bool IsCreateByXaml
+ /// <summary>
+ /// The FontSizeScale property. <br />
+ /// The default value is 1.0. <br />
+ /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ 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();
}
}
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)
+ /// <summary>
+ /// Select the whole text.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ 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()
+ /// <summary>
+ /// Select text from start to end index. <br />
+ /// The index is valid when 0 or positive.
+ /// </summary>
+ /// <param name="start">The start index for selection.</param>
+ /// <param name="end">The end index for selection.</param>
+ /// <remarks>
+ /// If the end index exceeds the maximum value, it is set to the length of the text.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ 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()
+ /// <summary>
+ /// Clear selection of the text. <br />
+ /// Valid when selection is activate.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ 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;
}
return;
}
+ if (systemlangTextFlag)
+ {
+ SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
+ }
+
+ removeFontSizeChangedCallback();
+
if (type == DisposeTypes.Explicit)
{
//Called by User
//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)
{
if (systemlangTextFlag == false)
{
- SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
+ SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
systemlangTextFlag = true;
}
return translatableText;
{
PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
}
+ if (textFieldPlaceHolderTextFocusedSid != null)
+ {
+ PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
+ }
}
- /// <summary>
- /// The TextChanged event arguments.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public class TextChangedEventArgs : EventArgs
+ private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
{
- private TextField _textField;
+ float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
+ SetValue(FontSizeScaleProperty, newFontSizeScale);
+ NotifyPropertyChanged();
+ }
- /// <summary>
- /// TextField.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- 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;
}
}
}
- /// <summary>
- /// The MaxLengthReached event arguments.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public class MaxLengthReachedEventArgs : EventArgs
+ private void removeFontSizeChangedCallback()
{
- private TextField _textField;
-
- /// <summary>
- /// TextField.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- 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
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);
+ }
}
}