2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 extern alias TizenSystemSettings;
18 using TizenSystemSettings.Tizen.System;
21 using System.Globalization;
22 using System.ComponentModel;
23 using Tizen.NUI.Binding;
25 namespace Tizen.NUI.BaseComponents
28 /// A control which provides a single line editable text field.
30 /// <since_tizen> 3 </since_tizen>
31 public partial class TextField : View
33 private string textFieldTextSid = null;
34 private string textFieldPlaceHolderTextSid = null;
35 private string textFieldPlaceHolderTextFocusedSid = null;
36 private bool systemlangTextFlag = false;
37 private InputMethodContext inputMethodCotext = null;
38 private float fontSizeScale = 1.0f;
39 private bool hasFontSizeChangedCallback = false;
41 static TextField() { }
44 /// Creates the TextField control.
46 /// <since_tizen> 3 </since_tizen>
47 public TextField() : this(Interop.TextField.New(), true)
49 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
53 /// Creates the TextField with setting the status of shown or hidden.
55 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
56 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
57 [EditorBrowsable(EditorBrowsableState.Never)]
58 public TextField(bool shown) : this(Interop.TextField.New(), true)
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// Get attributes, it is abstract function and must be override.
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 protected override ViewStyle CreateViewStyle()
70 return new TextFieldStyle();
73 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle)
81 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null)
89 internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.NewTextField(TextField.getCPtr(handle)), true)
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 internal enum ExceedPolicyType
101 ExceedPolicyOriginal,
106 /// The TranslatableText property.<br />
107 /// The text can set the SID value.<br />
109 /// <exception cref='ArgumentNullException'>
110 /// ResourceManager about multilingual is null.
112 /// <since_tizen> 4 </since_tizen>
113 public string TranslatableText
117 return (string)GetValue(TranslatableTextProperty);
121 SetValue(TranslatableTextProperty, value);
124 private string translatableText
128 return textFieldTextSid;
132 if (NUIApplication.MultilingualResourceManager == null)
134 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
136 textFieldTextSid = value;
137 Text = SetTranslatable(textFieldTextSid);
138 NotifyPropertyChanged();
143 /// The TranslatablePlaceholderText property.<br />
144 /// The text can set the SID value.<br />
146 /// <exception cref='ArgumentNullException'>
147 /// ResourceManager about multilingual is null.
149 /// <since_tizen> 4 </since_tizen>
150 public string TranslatablePlaceholderText
154 return (string)GetValue(TranslatablePlaceholderTextProperty);
158 SetValue(TranslatablePlaceholderTextProperty, value);
161 private string translatablePlaceholderText
165 return textFieldPlaceHolderTextSid;
169 if (NUIApplication.MultilingualResourceManager == null)
171 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
173 textFieldPlaceHolderTextSid = value;
174 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
175 NotifyPropertyChanged();
180 /// The TranslatablePlaceholderTextFocused property.<br />
181 /// The text can set the SID value.<br />
183 /// <exception cref='ArgumentNullException'>
184 /// ResourceManager about multilingual is null.
186 /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
187 [EditorBrowsable(EditorBrowsableState.Never)]
188 public string TranslatablePlaceholderTextFocused
192 return (string)GetValue(TranslatablePlaceholderTextFocusedProperty);
196 SetValue(TranslatablePlaceholderTextFocusedProperty, value);
199 private string translatablePlaceholderTextFocused
203 return textFieldPlaceHolderTextFocusedSid;
207 if (NUIApplication.MultilingualResourceManager == null)
209 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
211 textFieldPlaceHolderTextFocusedSid = value;
212 PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid);
213 NotifyPropertyChanged();
218 /// The Text property.
220 /// <since_tizen> 3 </since_tizen>
225 return (string)GetValue(TextProperty);
229 SetValueAndForceSendChangeSignal(TextProperty, value);
230 NotifyPropertyChanged();
235 /// The PlaceholderText property.
237 /// <since_tizen> 3 </since_tizen>
238 public string PlaceholderText
242 return (string)GetValue(PlaceholderTextProperty);
246 SetValue(PlaceholderTextProperty, value);
247 NotifyPropertyChanged();
252 /// The PlaceholderTextFocused property.
254 /// <since_tizen> 3 </since_tizen>
255 public string PlaceholderTextFocused
259 return (string)GetValue(PlaceholderTextFocusedProperty);
263 SetValue(PlaceholderTextFocusedProperty, value);
264 NotifyPropertyChanged();
269 /// The FontFamily property.
271 /// <since_tizen> 3 </since_tizen>
272 public string FontFamily
276 return (string)GetValue(FontFamilyProperty);
280 SetValue(FontFamilyProperty, value);
281 NotifyPropertyChanged();
286 /// The FontStyle property.
287 /// The fontStyle map contains the following keys :<br />
288 /// <list type="table">
289 /// <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>
290 /// <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>
291 /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
294 /// <since_tizen> 3 </since_tizen>
295 public PropertyMap FontStyle
299 return (PropertyMap)GetValue(FontStyleProperty);
303 SetValue(FontStyleProperty, value);
304 NotifyPropertyChanged();
309 /// The PointSize property.
311 /// <since_tizen> 3 </since_tizen>
312 public float PointSize
316 return (float)GetValue(PointSizeProperty);
320 SetValue(PointSizeProperty, value);
321 NotifyPropertyChanged();
326 /// The MaxLength property.
328 /// <since_tizen> 3 </since_tizen>
333 return (int)GetValue(MaxLengthProperty);
337 SetValue(MaxLengthProperty, value);
338 NotifyPropertyChanged();
343 /// The ExceedPolicy property.
345 /// <since_tizen> 3 </since_tizen>
346 public int ExceedPolicy
350 return (int)GetValue(ExceedPolicyProperty);
354 SetValue(ExceedPolicyProperty, value);
355 NotifyPropertyChanged();
360 /// The HorizontalAlignment property.
362 /// <since_tizen> 3 </since_tizen>
363 public HorizontalAlignment HorizontalAlignment
367 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
371 SetValue(HorizontalAlignmentProperty, value);
372 NotifyPropertyChanged();
377 /// The VerticalAlignment property.
379 /// <since_tizen> 3 </since_tizen>
380 public VerticalAlignment VerticalAlignment
384 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
388 SetValue(VerticalAlignmentProperty, value);
389 NotifyPropertyChanged();
390 NotifyPropertyChanged();
395 /// The TextColor property.
398 /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
400 /// <since_tizen> 3 </since_tizen>
401 public Color TextColor
405 Color temp = (Color)GetValue(TextColorProperty);
406 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
410 SetValue(TextColorProperty, value);
411 NotifyPropertyChanged();
416 /// The PlaceholderTextColor property.
419 /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
421 /// <since_tizen> 3 </since_tizen>
422 public Vector4 PlaceholderTextColor
426 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
427 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
431 SetValue(PlaceholderTextColorProperty, value);
432 NotifyPropertyChanged();
437 /// The ShadowOffset property.
439 /// <since_tizen> 3 </since_tizen>
441 /// Deprecated.(API Level 6) Use Shadow instead.
442 /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
444 [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
445 public Vector2 ShadowOffset
449 PropertyMap map = new PropertyMap();
450 GetProperty(TextField.Property.SHADOW).Get(map);
451 Vector2 shadowOffset = new Vector2();
452 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
453 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
457 PropertyMap temp = new PropertyMap();
458 temp.Insert("offset", new PropertyValue(value));
459 SetValue(ShadowProperty, temp);
460 NotifyPropertyChanged();
465 /// The ShadowColor property.
467 /// <since_tizen> 3 </since_tizen>
469 /// Deprecated.(API Level 6) Use Shadow instead.
470 /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
472 [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
473 public Vector4 ShadowColor
477 PropertyMap map = new PropertyMap();
478 GetProperty(TextField.Property.SHADOW).Get(map);
479 Vector4 shadowColor = new Vector4();
480 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
481 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
485 PropertyMap temp = new PropertyMap();
486 temp.Insert("color", new PropertyValue(value));
487 SetValue(ShadowProperty, temp);
488 NotifyPropertyChanged();
493 /// The PrimaryCursorColor property.
496 /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
498 /// <since_tizen> 3 </since_tizen>
499 public Vector4 PrimaryCursorColor
503 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
504 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
508 SetValue(PrimaryCursorColorProperty, value);
509 NotifyPropertyChanged();
514 /// The SecondaryCursorColor property.
517 /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
519 /// <since_tizen> 3 </since_tizen>
520 public Vector4 SecondaryCursorColor
524 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
525 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
529 SetValue(SecondaryCursorColorProperty, value);
530 NotifyPropertyChanged();
535 /// The EnableCursorBlink property.
537 /// <since_tizen> 3 </since_tizen>
538 public bool EnableCursorBlink
542 return (bool)GetValue(EnableCursorBlinkProperty);
546 SetValue(EnableCursorBlinkProperty, value);
547 NotifyPropertyChanged();
552 /// The CursorBlinkInterval property.
554 /// <since_tizen> 3 </since_tizen>
555 public float CursorBlinkInterval
559 return (float)GetValue(CursorBlinkIntervalProperty);
563 SetValue(CursorBlinkIntervalProperty, value);
564 NotifyPropertyChanged();
569 /// The CursorBlinkDuration property.
571 /// <since_tizen> 3 </since_tizen>
572 public float CursorBlinkDuration
576 return (float)GetValue(CursorBlinkDurationProperty);
580 SetValue(CursorBlinkDurationProperty, value);
581 NotifyPropertyChanged();
586 /// The CursorWidth property.
588 /// <since_tizen> 3 </since_tizen>
589 public int CursorWidth
593 return (int)GetValue(CursorWidthProperty);
597 SetValue(CursorWidthProperty, value);
598 NotifyPropertyChanged();
603 /// The GrabHandleImage property.
605 /// <since_tizen> 3 </since_tizen>
606 public string GrabHandleImage
610 return (string)GetValue(GrabHandleImageProperty);
614 SetValue(GrabHandleImageProperty, value);
615 NotifyPropertyChanged();
620 /// The GrabHandlePressedImage property.
622 /// <since_tizen> 3 </since_tizen>
623 public string GrabHandlePressedImage
627 return (string)GetValue(GrabHandlePressedImageProperty);
631 SetValue(GrabHandlePressedImageProperty, value);
632 NotifyPropertyChanged();
637 /// The ScrollThreshold property.
639 /// <since_tizen> 3 </since_tizen>
640 public float ScrollThreshold
644 return (float)GetValue(ScrollThresholdProperty);
648 SetValue(ScrollThresholdProperty, value);
649 NotifyPropertyChanged();
654 /// The ScrollSpeed property.
656 /// <since_tizen> 3 </since_tizen>
657 public float ScrollSpeed
661 return (float)GetValue(ScrollSpeedProperty);
665 SetValue(ScrollSpeedProperty, value);
666 NotifyPropertyChanged();
671 /// The SelectionHandleImageLeft property.
672 /// The selectionHandleImageLeft map contains the following key :<br />
673 /// <list type="table">
674 /// <item><term>filename (string)</term><description>The path of image file</description></item>
677 /// <since_tizen> 3 </since_tizen>
678 public PropertyMap SelectionHandleImageLeft
682 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
686 SetValue(SelectionHandleImageLeftProperty, value);
687 NotifyPropertyChanged();
692 /// The SelectionHandleImageRight property.
693 /// The selectionHandleImageRight map contains the following key :<br />
694 /// <list type="table">
695 /// <item><term>filename (string)</term><description>The path of image file</description></item>
698 /// <since_tizen> 3 </since_tizen>
699 public PropertyMap SelectionHandleImageRight
703 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
707 SetValue(SelectionHandleImageRightProperty, value);
708 NotifyPropertyChanged();
713 /// The SelectionHandlePressedImageLeft property.
714 /// The selectionHandlePressedImageLeft map contains the following key :<br />
715 /// <list type="table">
716 /// <item><term>filename (string)</term><description>The path of image file</description></item>
719 /// <since_tizen> 3 </since_tizen>
720 public PropertyMap SelectionHandlePressedImageLeft
724 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
728 SetValue(SelectionHandlePressedImageLeftProperty, value);
729 NotifyPropertyChanged();
734 /// The SelectionHandlePressedImageRight property.
735 /// The selectionHandlePressedImageRight map contains the following key :<br />
736 /// <list type="table">
737 /// <item><term>filename (string)</term><description>The path of image file</description></item>
740 /// <since_tizen> 3 </since_tizen>
741 public PropertyMap SelectionHandlePressedImageRight
745 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
749 SetValue(SelectionHandlePressedImageRightProperty, value);
750 NotifyPropertyChanged();
755 /// The SelectionHandleMarkerImageLeft property.
756 /// The selectionHandleMarkerImageLeft map contains the following key :<br />
757 /// <list type="table">
758 /// <item><term>filename (string)</term><description>The path of image file</description></item>
761 /// <since_tizen> 3 </since_tizen>
762 public PropertyMap SelectionHandleMarkerImageLeft
766 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
770 SetValue(SelectionHandleMarkerImageLeftProperty, value);
771 NotifyPropertyChanged();
776 /// The SelectionHandleMarkerImageRight property.
777 /// The selectionHandleMarkerImageRight map contains the following key :<br />
778 /// <list type="table">
779 /// <item><term>filename (string)</term><description>The path of image file</description></item>
782 /// <since_tizen> 3 </since_tizen>
783 public PropertyMap SelectionHandleMarkerImageRight
787 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
791 SetValue(SelectionHandleMarkerImageRightProperty, value);
792 NotifyPropertyChanged();
797 /// The SelectionHighlightColor property.
800 /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
802 /// <since_tizen> 3 </since_tizen>
803 public Vector4 SelectionHighlightColor
807 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
808 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
812 SetValue(SelectionHighlightColorProperty, value);
813 NotifyPropertyChanged();
818 /// The DecorationBoundingBox property.
821 /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
823 /// <since_tizen> 3 </since_tizen>
824 public Rectangle DecorationBoundingBox
828 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
829 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
833 SetValue(DecorationBoundingBoxProperty, value);
834 NotifyPropertyChanged();
839 /// The InputMethodSettings property.
842 /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
845 /// The following example demonstrates how to set the InputMethodSettings property.
847 /// InputMethod method = new InputMethod();
848 /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
849 /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
850 /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
851 /// method.Variation = 1;
852 /// textField.InputMethodSettings = method.OutputMap;
855 /// <since_tizen> 3 </since_tizen>
856 public PropertyMap InputMethodSettings
860 return (PropertyMap)GetValue(InputMethodSettingsProperty);
864 SetValue(InputMethodSettingsProperty, value);
865 NotifyPropertyChanged();
870 /// The InputColor property.
873 /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
875 /// <since_tizen> 3 </since_tizen>
876 public Vector4 InputColor
880 Vector4 temp = (Vector4)GetValue(InputColorProperty);
881 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
885 SetValue(InputColorProperty, value);
886 NotifyPropertyChanged();
891 /// The EnableMarkup property.
893 /// <since_tizen> 3 </since_tizen>
894 public bool EnableMarkup
898 return (bool)GetValue(EnableMarkupProperty);
902 SetValue(EnableMarkupProperty, value);
903 NotifyPropertyChanged();
908 /// The InputFontFamily property.
910 /// <since_tizen> 3 </since_tizen>
911 public string InputFontFamily
915 return (string)GetValue(InputFontFamilyProperty);
919 SetValue(InputFontFamilyProperty, value);
920 NotifyPropertyChanged();
925 /// The InputFontStyle property.
926 /// The inputFontStyle map contains the following keys :<br />
927 /// <list type="table">
928 /// <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>
929 /// <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>
930 /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
933 /// <since_tizen> 3 </since_tizen>
934 public PropertyMap InputFontStyle
938 return (PropertyMap)GetValue(InputFontStyleProperty);
942 SetValue(InputFontStyleProperty, value);
943 NotifyPropertyChanged();
948 /// The InputPointSize property.
950 /// <since_tizen> 3 </since_tizen>
951 public float InputPointSize
955 return (float)GetValue(InputPointSizeProperty);
959 SetValue(InputPointSizeProperty, value);
960 NotifyPropertyChanged();
965 /// The Underline property.
966 /// The underline map contains the following keys :<br />
967 /// <list type="table">
968 /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
969 /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
970 /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
973 /// <since_tizen> 3 </since_tizen>
974 public PropertyMap Underline
978 return (PropertyMap)GetValue(UnderlineProperty);
982 SetValue(UnderlineProperty, value);
983 NotifyPropertyChanged();
988 /// The InputUnderline property.
990 /// <since_tizen> 3 </since_tizen>
991 public string InputUnderline
995 return (string)GetValue(InputUnderlineProperty);
999 SetValue(InputUnderlineProperty, value);
1000 NotifyPropertyChanged();
1005 /// The Shadow property.
1006 /// The shadow map contains the following keys :<br />
1007 /// <list type="table">
1008 /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1009 /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1010 /// <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>
1013 /// <since_tizen> 3 </since_tizen>
1014 public PropertyMap Shadow
1018 return (PropertyMap)GetValue(ShadowProperty);
1022 SetValue(ShadowProperty, value);
1023 NotifyPropertyChanged();
1028 /// The InputShadow property.
1030 /// <since_tizen> 3 </since_tizen>
1031 public string InputShadow
1035 return (string)GetValue(InputShadowProperty);
1039 SetValue(InputShadowProperty, value);
1040 NotifyPropertyChanged();
1045 /// The Emboss property.
1047 /// <since_tizen> 3 </since_tizen>
1048 public string Emboss
1052 return (string)GetValue(EmbossProperty);
1056 SetValue(EmbossProperty, value);
1057 NotifyPropertyChanged();
1062 /// The InputEmboss property.
1064 /// <since_tizen> 3 </since_tizen>
1065 public string InputEmboss
1069 return (string)GetValue(InputEmbossProperty);
1073 SetValue(InputEmbossProperty, value);
1074 NotifyPropertyChanged();
1079 /// The Outline property.
1080 /// The outline map contains the following keys :<br />
1081 /// <list type="table">
1082 /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1083 /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1086 /// <since_tizen> 3 </since_tizen>
1087 public PropertyMap Outline
1091 return (PropertyMap)GetValue(OutlineProperty);
1095 SetValue(OutlineProperty, value);
1096 NotifyPropertyChanged();
1101 /// The InputOutline property.
1103 /// <since_tizen> 3 </since_tizen>
1104 public string InputOutline
1108 return (string)GetValue(InputOutlineProperty);
1112 SetValue(InputOutlineProperty, value);
1113 NotifyPropertyChanged();
1118 /// The HiddenInputSettings property.
1119 /// The hiddenInputSettings map contains the following keys :<br />
1120 /// <list type="table">
1121 /// <item><term>HiddenInputProperty.Mode (int)</term><description>The mode for input text display (Use HiddenInputModeType)</description></item>
1122 /// <item><term>HiddenInputProperty.SubstituteCharacter (int)</term><description>All input characters are substituted by this character</description></item>
1123 /// <item><term>HiddenInputProperty.SubstituteCount (int)</term><description>Length of text to show or hide, available when HideCount/ShowCount mode is used</description></item>
1124 /// <item><term>HiddenInputProperty.ShowLastCharacterDuration (int)</term><description>Hide last character after this duration, available when ShowLastCharacter mode</description></item>
1128 /// See <see cref="HiddenInputProperty"/> and <see cref="HiddenInputModeType"/> for a detailed description.
1131 /// The following example demonstrates how to set the HiddenInputSettings property.
1133 /// PropertyMap map = new PropertyMap();
1134 /// map.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter));
1135 /// map.Add(HiddenInputProperty.ShowLastCharacterDuration, new PropertyValue(500));
1136 /// map.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x2A));
1137 /// textField.HiddenInputSettings = map;
1140 /// <since_tizen> 3 </since_tizen>
1141 public Tizen.NUI.PropertyMap HiddenInputSettings
1145 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1149 SetValue(HiddenInputSettingsProperty, value);
1150 NotifyPropertyChanged();
1155 /// The PixelSize property.
1157 /// <since_tizen> 3 </since_tizen>
1158 public float PixelSize
1162 return (float)GetValue(PixelSizeProperty);
1166 SetValue(PixelSizeProperty, value);
1167 NotifyPropertyChanged();
1172 /// The Enable selection property.
1174 /// <since_tizen> 3 </since_tizen>
1175 public bool EnableSelection
1179 return (bool)GetValue(EnableSelectionProperty);
1183 SetValue(EnableSelectionProperty, value);
1184 NotifyPropertyChanged();
1189 /// The Enable selection property.
1191 /// <since_tizen> 6 </since_tizen>
1192 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1193 [EditorBrowsable(EditorBrowsableState.Never)]
1194 public bool EnableGrabHandle
1198 return (bool)GetValue(EnableGrabHandleProperty);
1202 SetValue(EnableGrabHandleProperty, value);
1203 NotifyPropertyChanged();
1208 /// The Enable selection property.
1210 /// <since_tizen> 6 </since_tizen>
1211 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1212 [EditorBrowsable(EditorBrowsableState.Never)]
1213 public bool EnableGrabHandlePopup
1217 return (bool)GetValue(EnableGrabHandlePopupProperty);
1221 SetValue(EnableGrabHandlePopupProperty, value);
1222 NotifyPropertyChanged();
1227 /// The Selected Text property.
1229 /// <since_tizen> 8 </since_tizen>
1230 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1231 [EditorBrowsable(EditorBrowsableState.Never)]
1232 public string SelectedText
1237 GetProperty(TextField.Property.SelectedText).Get(out temp);
1243 /// The start index for selection.
1245 /// <since_tizen> 8 </since_tizen>
1246 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1247 [EditorBrowsable(EditorBrowsableState.Never)]
1248 public int SelectedTextStart
1253 GetProperty(TextField.Property.SelectedTextStart).Get(out temp);
1258 SetProperty(TextField.Property.SelectedTextStart, new PropertyValue(value));
1259 NotifyPropertyChanged();
1264 /// The end index for selection.
1266 /// <since_tizen> 8 </since_tizen>
1267 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1268 [EditorBrowsable(EditorBrowsableState.Never)]
1269 public int SelectedTextEnd
1274 GetProperty(TextField.Property.SelectedTextEnd).Get(out temp);
1279 SetProperty(TextField.Property.SelectedTextEnd, new PropertyValue(value));
1280 NotifyPropertyChanged();
1285 /// Enable editing in text control.
1287 /// <since_tizen> 8 </since_tizen>
1288 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1289 [EditorBrowsable(EditorBrowsableState.Never)]
1290 public bool EnableEditing
1295 GetProperty(TextField.Property.EnableEditing).Get(out temp);
1300 SetProperty(TextField.Property.EnableEditing, new PropertyValue(value));
1301 NotifyPropertyChanged();
1306 /// Specify primary cursor (caret) position in text control.
1308 [EditorBrowsable(EditorBrowsableState.Never)]
1309 public int PrimaryCursorPosition
1314 using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
1316 propertyValue.Get(out temp);
1322 using (PropertyValue propertyValue = new PropertyValue(value))
1324 SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue);
1325 NotifyPropertyChanged();
1331 /// The GrabHandleColor property.
1334 /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
1336 [EditorBrowsable(EditorBrowsableState.Never)]
1337 public Color GrabHandleColor
1341 Color temp = (Color)GetValue(GrabHandleColorProperty);
1342 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1346 SetValue(GrabHandleColorProperty, value);
1347 NotifyPropertyChanged();
1352 /// The Placeholder property.
1353 /// The placeholder map contains the following keys :<br />
1354 /// <list type="table">
1355 /// <item><term>text (string)</term><description>The text to display when the TextField is empty and inactive</description></item>
1356 /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1357 /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1358 /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1359 /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1360 /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1361 /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1362 /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1366 /// The following example demonstrates how to set the Placeholder property.
1368 /// PropertyMap propertyMap = new PropertyMap();
1369 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1370 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1371 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1372 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1373 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1375 /// PropertyMap fontStyleMap = new PropertyMap();
1376 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1377 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1378 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1379 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1381 /// TextField field = new TextField();
1382 /// field.Placeholder = propertyMap;
1385 /// <since_tizen> 3 </since_tizen>
1386 public Tizen.NUI.PropertyMap Placeholder
1390 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
1391 PropertyValue value = null;
1394 value = map.Find(0);
1397 value.Get(out string text);
1398 map.Add("text", new PropertyValue(text));
1402 value = map.Find(1);
1405 value.Get(out string textFocused);
1406 map.Add("textFocused", new PropertyValue(textFocused));
1410 value = map.Find(2);
1413 Color color = new Color();
1415 map.Add("color", new PropertyValue(color));
1419 value = map.Find(3);
1422 value.Get(out string fontFamily);
1423 map.Add("fontFamily", new PropertyValue(fontFamily));
1427 value = map.Find(4);
1430 PropertyMap fontStyle = new PropertyMap();
1431 value.Get(fontStyle);
1432 map.Add("fontStyle", new PropertyValue(fontStyle));
1436 value = map.Find(5);
1439 value.Get(out float pointSize);
1440 map.Add("pointSize", new PropertyValue(pointSize));
1444 value = map.Find(6);
1447 value.Get(out float pixelSize);
1448 map.Add("pixelSize", new PropertyValue(pixelSize));
1452 value = map.Find(7);
1455 value.Get(out bool ellipsis);
1456 map.Add("ellipsis", new PropertyValue(ellipsis));
1463 SetValue(PlaceholderProperty, value);
1464 NotifyPropertyChanged();
1469 /// The Ellipsis property.<br />
1470 /// Enable or disable the ellipsis.<br />
1471 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1473 /// <since_tizen> 4 </since_tizen>
1474 public bool Ellipsis
1478 return (bool)GetValue(EllipsisProperty);
1482 SetValue(EllipsisProperty, value);
1483 NotifyPropertyChanged();
1488 /// Enables selection of the text using the Shift key.
1490 /// <since_tizen> 5 </since_tizen>
1491 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1492 [EditorBrowsable(EditorBrowsableState.Never)]
1493 public bool EnableShiftSelection
1497 return (bool)GetValue(EnableShiftSelectionProperty);
1501 SetValue(EnableShiftSelectionProperty, value);
1502 NotifyPropertyChanged();
1507 /// The text alignment to match the direction of the system language.
1509 /// <since_tizen> 6 </since_tizen>
1510 public bool MatchSystemLanguageDirection
1514 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1518 SetValue(MatchSystemLanguageDirectionProperty, value);
1519 NotifyPropertyChanged();
1524 /// The FontSizeScale property. <br />
1525 /// The default value is 1.0. <br />
1526 /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1528 /// <since_tizen> 9 </since_tizen>
1529 public float FontSizeScale
1533 return fontSizeScale;
1537 float newFontSizeScale;
1539 if (fontSizeScale == value) return;
1541 fontSizeScale = value;
1542 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1544 SystemSettingsFontSize systemSettingsFontSize;
1548 systemSettingsFontSize = SystemSettings.FontSize;
1552 Console.WriteLine("{0} Exception caught.", e);
1553 systemSettingsFontSize = SystemSettingsFontSize.Normal;
1555 newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1556 addFontSizeChangedCallback();
1560 newFontSizeScale = fontSizeScale;
1561 removeFontSizeChangedCallback();
1564 SetValue(FontSizeScaleProperty, newFontSizeScale);
1565 NotifyPropertyChanged();
1569 /// Only used by the IL of xaml, will never changed to not hidden.
1570 [EditorBrowsable(EditorBrowsableState.Never)]
1571 public override bool IsCreateByXaml
1575 return base.IsCreateByXaml;
1579 base.IsCreateByXaml = value;
1583 this.TextChanged += (obj, e) =>
1585 this.Text = e.TextField.Text;
1592 /// Get the InputMethodContext instance.
1594 /// <returns>The InputMethodContext instance.</returns>
1595 /// <since_tizen> 5 </since_tizen>
1596 public InputMethodContext GetInputMethodContext()
1598 if (inputMethodCotext == null)
1600 /*Avoid raising InputMethodContext reference count.*/
1601 inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true);
1602 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1604 return inputMethodCotext;
1608 /// Select the whole text.
1610 /// <since_tizen> 6 </since_tizen>
1611 /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
1612 [EditorBrowsable(EditorBrowsableState.Never)]
1613 public void SelectWholeText()
1615 Interop.TextField.SelectWholeText(SwigCPtr);
1616 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1620 /// Clear selection of the text.
1622 /// <since_tizen> 8 </since_tizen>
1623 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1624 [EditorBrowsable(EditorBrowsableState.Never)]
1625 public void SelectNone()
1627 _ = Interop.TextField.SelectNone(SwigCPtr);
1628 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1631 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
1633 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1636 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
1638 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));
1639 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1646 /// <since_tizen> 3 </since_tizen>
1647 protected override void Dispose(DisposeTypes type)
1651 DisposeQueue.Instance.Add(this);
1655 if (systemlangTextFlag)
1657 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1660 removeFontSizeChangedCallback();
1662 if (type == DisposeTypes.Explicit)
1665 //Release your own managed resources here.
1666 //You should release all of your own disposable objects here.
1669 //Release your own unmanaged resources here.
1670 //You should not access any managed member here except static instance.
1671 //because the execution order of Finalizes is non-deterministic.
1674 if (textFieldMaxLengthReachedCallbackDelegate != null)
1676 this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
1679 if (textFieldTextChangedCallbackDelegate != null)
1681 TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate);
1688 /// This will not be public opened.
1689 [EditorBrowsable(EditorBrowsableState.Never)]
1690 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1692 // In order to speed up IME hide, temporarily add
1693 GetInputMethodContext()?.DestroyContext();
1694 Interop.TextField.DeleteTextField(swigCPtr);
1697 private string SetTranslatable(string textFieldSid)
1699 string translatableText = null;
1700 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1701 if (translatableText != null)
1703 if (systemlangTextFlag == false)
1705 SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1706 systemlangTextFlag = true;
1708 return translatableText;
1712 translatableText = "";
1713 return translatableText;
1717 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1719 if (textFieldTextSid != null)
1721 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1723 if (textFieldPlaceHolderTextSid != null)
1725 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1727 if (textFieldPlaceHolderTextFocusedSid != null)
1729 PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
1733 private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
1735 float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
1736 SetValue(FontSizeScaleProperty, newFontSizeScale);
1737 NotifyPropertyChanged();
1740 private void addFontSizeChangedCallback()
1742 if (hasFontSizeChangedCallback != true)
1746 SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
1747 hasFontSizeChangedCallback = true;
1751 Console.WriteLine("{0} Exception caught.", e);
1752 hasFontSizeChangedCallback = false;
1757 private void removeFontSizeChangedCallback()
1759 if (hasFontSizeChangedCallback == true)
1763 SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
1764 hasFontSizeChangedCallback = false;
1768 Console.WriteLine("{0} Exception caught.", e);
1769 hasFontSizeChangedCallback = true;
1774 internal new class Property
1776 internal static readonly int TEXT = Interop.TextField.TextGet();
1777 internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet();
1778 internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet();
1779 internal static readonly int FontFamily = Interop.TextField.FontFamilyGet();
1780 internal static readonly int FontStyle = Interop.TextField.FontStyleGet();
1781 internal static readonly int PointSize = Interop.TextField.PointSizeGet();
1782 internal static readonly int MaxLength = Interop.TextField.MaxLengthGet();
1783 internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet();
1784 internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet();
1785 internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet();
1786 internal static readonly int TextColor = Interop.TextField.TextColorGet();
1787 internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet();
1788 internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet();
1789 internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet();
1790 internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet();
1791 internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet();
1792 internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet();
1793 internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet();
1794 internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet();
1795 internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet();
1796 internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet();
1797 internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet();
1798 internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet();
1799 internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet();
1800 internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet();
1801 internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet();
1802 internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet();
1803 internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet();
1804 internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet();
1805 internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet();
1806 internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet();
1807 internal static readonly int InputColor = Interop.TextField.InputColorGet();
1808 internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet();
1809 internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet();
1810 internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet();
1811 internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet();
1812 internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet();
1813 internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet();
1814 internal static readonly int SHADOW = Interop.TextField.ShadowGet();
1815 internal static readonly int InputShadow = Interop.TextField.InputShadowGet();
1816 internal static readonly int EMBOSS = Interop.TextField.EmbossGet();
1817 internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet();
1818 internal static readonly int OUTLINE = Interop.TextField.OutlineGet();
1819 internal static readonly int InputOutline = Interop.TextField.InputOutlineGet();
1820 internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet();
1821 internal static readonly int PixelSize = Interop.TextField.PixelSizeGet();
1822 internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet();
1823 internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet();
1824 internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet();
1825 internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet();
1826 internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet();
1827 internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet();
1828 internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet();
1829 internal static readonly int SelectedText = Interop.TextField.SelectedTextGet();
1830 internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet();
1831 internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet();
1832 internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
1833 internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
1834 internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
1835 internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
1838 internal class InputStyle
1844 FontFamily = 0x0002,
1854 private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
1856 DecorationBoundingBox = new Rectangle(x, y, width, height);
1858 private void OnInputColorChanged(float x, float y, float z, float w)
1860 InputColor = new Vector4(x, y, z, w);
1862 private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
1864 PlaceholderTextColor = new Vector4(r, g, b, a);
1866 private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
1868 PrimaryCursorColor = new Vector4(x, y, z, w);
1870 private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
1872 SecondaryCursorColor = new Vector4(x, y, z, w);
1874 private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
1876 SelectionHighlightColor = new Vector4(x, y, z, w);
1878 private void OnShadowColorChanged(float x, float y, float z, float w)
1880 ShadowColor = new Vector4(x, y, z, w);
1882 private void OnShadowOffsetChanged(float x, float y)
1884 ShadowOffset = new Vector2(x, y);
1886 private void OnTextColorChanged(float r, float g, float b, float a)
1888 TextColor = new Color(r, g, b, a);
1890 private void OnGrabHandleColorChanged(float r, float g, float b, float a)
1892 GrabHandleColor = new Color(r, g, b, a);