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 return (PropertyMap)GetValue(PlaceholderProperty);
1394 SetValue(PlaceholderProperty, value);
1395 NotifyPropertyChanged();
1400 /// The Ellipsis property.<br />
1401 /// Enable or disable the ellipsis.<br />
1402 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1404 /// <since_tizen> 4 </since_tizen>
1405 public bool Ellipsis
1409 return (bool)GetValue(EllipsisProperty);
1413 SetValue(EllipsisProperty, value);
1414 NotifyPropertyChanged();
1419 /// Enables selection of the text using the Shift key.
1421 /// <since_tizen> 5 </since_tizen>
1422 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1423 [EditorBrowsable(EditorBrowsableState.Never)]
1424 public bool EnableShiftSelection
1428 return (bool)GetValue(EnableShiftSelectionProperty);
1432 SetValue(EnableShiftSelectionProperty, value);
1433 NotifyPropertyChanged();
1438 /// The text alignment to match the direction of the system language.
1440 /// <since_tizen> 6 </since_tizen>
1441 public bool MatchSystemLanguageDirection
1445 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1449 SetValue(MatchSystemLanguageDirectionProperty, value);
1450 NotifyPropertyChanged();
1455 /// The FontSizeScale property. <br />
1456 /// The default value is 1.0. <br />
1457 /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1459 /// <since_tizen> 9 </since_tizen>
1460 public float FontSizeScale
1464 return fontSizeScale;
1468 float newFontSizeScale;
1470 if (fontSizeScale == value) return;
1472 fontSizeScale = value;
1473 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1475 SystemSettingsFontSize systemSettingsFontSize;
1479 systemSettingsFontSize = SystemSettings.FontSize;
1483 Console.WriteLine("{0} Exception caught.", e);
1484 systemSettingsFontSize = SystemSettingsFontSize.Normal;
1486 newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1487 addFontSizeChangedCallback();
1491 newFontSizeScale = fontSizeScale;
1492 removeFontSizeChangedCallback();
1495 SetValue(FontSizeScaleProperty, newFontSizeScale);
1496 NotifyPropertyChanged();
1500 /// Only used by the IL of xaml, will never changed to not hidden.
1501 [EditorBrowsable(EditorBrowsableState.Never)]
1502 public override bool IsCreateByXaml
1506 return base.IsCreateByXaml;
1510 base.IsCreateByXaml = value;
1514 this.TextChanged += (obj, e) =>
1516 this.Text = e.TextField.Text;
1523 /// Get the InputMethodContext instance.
1525 /// <returns>The InputMethodContext instance.</returns>
1526 /// <since_tizen> 5 </since_tizen>
1527 public InputMethodContext GetInputMethodContext()
1529 if (inputMethodCotext == null)
1531 /*Avoid raising InputMethodContext reference count.*/
1532 inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true);
1533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1535 return inputMethodCotext;
1539 /// Select the whole text.
1541 /// <since_tizen> 6 </since_tizen>
1542 /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
1543 [EditorBrowsable(EditorBrowsableState.Never)]
1544 public void SelectWholeText()
1546 Interop.TextField.SelectWholeText(SwigCPtr);
1547 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1551 /// Clear selection of the text.
1553 /// <since_tizen> 8 </since_tizen>
1554 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1555 [EditorBrowsable(EditorBrowsableState.Never)]
1556 public void SelectNone()
1558 _ = Interop.TextField.SelectNone(SwigCPtr);
1559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1562 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
1564 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1567 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
1569 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));
1570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1577 /// <since_tizen> 3 </since_tizen>
1578 protected override void Dispose(DisposeTypes type)
1582 DisposeQueue.Instance.Add(this);
1586 if (systemlangTextFlag)
1588 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1591 removeFontSizeChangedCallback();
1593 if (type == DisposeTypes.Explicit)
1596 //Release your own managed resources here.
1597 //You should release all of your own disposable objects here.
1600 //Release your own unmanaged resources here.
1601 //You should not access any managed member here except static instance.
1602 //because the execution order of Finalizes is non-deterministic.
1605 if (textFieldMaxLengthReachedCallbackDelegate != null)
1607 this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
1610 if (textFieldTextChangedCallbackDelegate != null)
1612 TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate);
1619 /// This will not be public opened.
1620 [EditorBrowsable(EditorBrowsableState.Never)]
1621 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1623 // In order to speed up IME hide, temporarily add
1624 GetInputMethodContext()?.DestroyContext();
1625 Interop.TextField.DeleteTextField(swigCPtr);
1628 private string SetTranslatable(string textFieldSid)
1630 string translatableText = null;
1631 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1632 if (translatableText != null)
1634 if (systemlangTextFlag == false)
1636 SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1637 systemlangTextFlag = true;
1639 return translatableText;
1643 translatableText = "";
1644 return translatableText;
1648 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1650 if (textFieldTextSid != null)
1652 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1654 if (textFieldPlaceHolderTextSid != null)
1656 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1658 if (textFieldPlaceHolderTextFocusedSid != null)
1660 PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
1664 private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
1666 float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
1667 SetValue(FontSizeScaleProperty, newFontSizeScale);
1668 NotifyPropertyChanged();
1671 private void addFontSizeChangedCallback()
1673 if (hasFontSizeChangedCallback != true)
1677 SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
1678 hasFontSizeChangedCallback = true;
1682 Console.WriteLine("{0} Exception caught.", e);
1683 hasFontSizeChangedCallback = false;
1688 private void removeFontSizeChangedCallback()
1690 if (hasFontSizeChangedCallback == true)
1694 SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
1695 hasFontSizeChangedCallback = false;
1699 Console.WriteLine("{0} Exception caught.", e);
1700 hasFontSizeChangedCallback = true;
1705 internal new class Property
1707 internal static readonly int TEXT = Interop.TextField.TextGet();
1708 internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet();
1709 internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet();
1710 internal static readonly int FontFamily = Interop.TextField.FontFamilyGet();
1711 internal static readonly int FontStyle = Interop.TextField.FontStyleGet();
1712 internal static readonly int PointSize = Interop.TextField.PointSizeGet();
1713 internal static readonly int MaxLength = Interop.TextField.MaxLengthGet();
1714 internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet();
1715 internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet();
1716 internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet();
1717 internal static readonly int TextColor = Interop.TextField.TextColorGet();
1718 internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet();
1719 internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet();
1720 internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet();
1721 internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet();
1722 internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet();
1723 internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet();
1724 internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet();
1725 internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet();
1726 internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet();
1727 internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet();
1728 internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet();
1729 internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet();
1730 internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet();
1731 internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet();
1732 internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet();
1733 internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet();
1734 internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet();
1735 internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet();
1736 internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet();
1737 internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet();
1738 internal static readonly int InputColor = Interop.TextField.InputColorGet();
1739 internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet();
1740 internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet();
1741 internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet();
1742 internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet();
1743 internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet();
1744 internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet();
1745 internal static readonly int SHADOW = Interop.TextField.ShadowGet();
1746 internal static readonly int InputShadow = Interop.TextField.InputShadowGet();
1747 internal static readonly int EMBOSS = Interop.TextField.EmbossGet();
1748 internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet();
1749 internal static readonly int OUTLINE = Interop.TextField.OutlineGet();
1750 internal static readonly int InputOutline = Interop.TextField.InputOutlineGet();
1751 internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet();
1752 internal static readonly int PixelSize = Interop.TextField.PixelSizeGet();
1753 internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet();
1754 internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet();
1755 internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet();
1756 internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet();
1757 internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet();
1758 internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet();
1759 internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet();
1760 internal static readonly int SelectedText = Interop.TextField.SelectedTextGet();
1761 internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet();
1762 internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet();
1763 internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
1764 internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
1765 internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
1766 internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
1769 internal class InputStyle
1775 FontFamily = 0x0002,
1785 private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
1787 DecorationBoundingBox = new Rectangle(x, y, width, height);
1789 private void OnInputColorChanged(float x, float y, float z, float w)
1791 InputColor = new Vector4(x, y, z, w);
1793 private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
1795 PlaceholderTextColor = new Vector4(r, g, b, a);
1797 private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
1799 PrimaryCursorColor = new Vector4(x, y, z, w);
1801 private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
1803 SecondaryCursorColor = new Vector4(x, y, z, w);
1805 private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
1807 SelectionHighlightColor = new Vector4(x, y, z, w);
1809 private void OnShadowColorChanged(float x, float y, float z, float w)
1811 ShadowColor = new Vector4(x, y, z, w);
1813 private void OnShadowOffsetChanged(float x, float y)
1815 ShadowOffset = new Vector2(x, y);
1817 private void OnTextColorChanged(float r, float g, float b, float a)
1819 TextColor = new Color(r, g, b, a);
1821 private void OnGrabHandleColorChanged(float r, float g, float b, float a)
1823 GrabHandleColor = new Color(r, g, b, a);