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.
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20 using System.Text.RegularExpressions;
23 using System.Globalization;
24 using System.ComponentModel;
27 namespace Tizen.NUI.BaseComponents
30 /// A control which provides a multi-line editable text editor.
32 /// <since_tizen> 3 </since_tizen>
33 public partial class TextEditor : View
35 private string textEditorTextSid = null;
36 private string textEditorPlaceHolderTextSid = null;
37 private bool systemlangTextFlag = false;
38 private InputMethodContext inputMethodContext = null;
39 private float fontSizeScale = 1.0f;
40 private bool hasFontSizeChangedCallback = false;
42 static TextEditor() { }
45 /// Creates the TextEditor control.
47 /// <since_tizen> 3 </since_tizen>
48 public TextEditor() : this(Interop.TextEditor.New(), true)
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 /// Creates the TextEditor with specified style.
56 [EditorBrowsable(EditorBrowsableState.Never)]
57 public TextEditor(TextEditorStyle style) : this(Interop.TextLabel.New(), true, style: style)
62 /// Creates the TextEditor with setting the status of shown or hidden.
64 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
65 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 public TextEditor(bool shown) : this(Interop.TextEditor.New(), true)
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73 internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.NewTextEditor(TextEditor.getCPtr(handle)), true)
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true, TextEditorStyle style = null) : base(cPtr, cMemoryOwn, style)
92 /// The TranslatableText property.<br />
93 /// The text can set the SID value.<br />
95 /// <exception cref='ArgumentNullException'>
96 /// ResourceManager about multilingual is null.
98 /// <since_tizen> 4 </since_tizen>
99 public string TranslatableText
103 return textEditorTextSid;
107 if (NUIApplication.MultilingualResourceManager == null)
109 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
111 textEditorTextSid = value;
112 Text = SetTranslatable(textEditorTextSid);
113 NotifyPropertyChanged();
117 /// The TranslatablePlaceholderText property.<br />
118 /// The text can set the SID value.<br />
120 /// <exception cref='ArgumentNullException'>
121 /// ResourceManager about multilingual is null.
123 /// <since_tizen> 4 </since_tizen>
124 public string TranslatablePlaceholderText
128 return textEditorPlaceHolderTextSid;
132 if (NUIApplication.MultilingualResourceManager == null)
134 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
136 textEditorPlaceHolderTextSid = value;
137 PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
138 NotifyPropertyChanged();
143 /// The Text property.
145 /// <since_tizen> 3 </since_tizen>
150 return (string)GetValue(TextProperty);
154 SetValueAndForceSendChangeSignal(TextProperty, value);
155 NotifyPropertyChanged();
160 /// The TextColor property.
163 /// The property cascade chaining set is possible. For example, this (textEditor.TextColor.X = 0.1f;) is possible.
165 /// <since_tizen> 3 </since_tizen>
166 public Vector4 TextColor
170 Vector4 temp = (Vector4)GetValue(TextColorProperty);
171 return new Vector4(OnTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
175 SetValue(TextColorProperty, value);
176 NotifyPropertyChanged();
181 /// The FontFamily property.
183 /// <since_tizen> 3 </since_tizen>
184 public string FontFamily
188 return (string)GetValue(FontFamilyProperty);
192 SetValue(FontFamilyProperty, value);
193 NotifyPropertyChanged();
198 /// The FontStyle property.
199 /// The fontStyle map contains the following keys :<br />
200 /// <list type="table">
201 /// <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>
202 /// <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>
203 /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
206 /// <since_tizen> 3 </since_tizen>
207 public PropertyMap FontStyle
211 return (PropertyMap)GetValue(FontStyleProperty);
215 SetValue(FontStyleProperty, value);
216 NotifyPropertyChanged();
221 /// Set FontStyle to TextEditor. <br />
223 /// <param name="fontStyle">The FontStyle</param>
225 /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
228 /// The following example demonstrates how to use the SetFontStyle method.
230 /// var fontStyle = new Tizen.NUI.Text.FontStyle();
231 /// fontStyle.Width = FontWidthType.Expanded;
232 /// fontStyle.Weight = FontWeightType.Bold;
233 /// fontStyle.Slant = FontSlantType.Italic;
234 /// editor.SetFontStyle(fontStyle);
237 [EditorBrowsable(EditorBrowsableState.Never)]
238 public void SetFontStyle(FontStyle fontStyle)
240 SetProperty(TextEditor.Property.FontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
244 /// Get FontStyle from TextEditor. <br />
246 /// <returns>The FontStyle</returns>
248 /// <see cref="Tizen.NUI.Text.FontStyle"/>
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public FontStyle GetFontStyle()
253 var map = new PropertyMap();
254 GetProperty(TextEditor.Property.FontStyle).Get(map);
255 return TextUtils.GetFontStyleStruct(map);
259 /// The PointSize property.
261 /// <since_tizen> 3 </since_tizen>
262 public float PointSize
266 return (float)GetValue(PointSizeProperty);
270 SetValue(PointSizeProperty, value);
271 NotifyPropertyChanged();
276 /// The HorizontalAlignment property.
278 /// <since_tizen> 3 </since_tizen>
279 public HorizontalAlignment HorizontalAlignment
283 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
287 SetValue(HorizontalAlignmentProperty, value);
288 NotifyPropertyChanged();
293 /// The ScrollThreshold property.
295 /// <since_tizen> 3 </since_tizen>
296 public float ScrollThreshold
300 return (float)GetValue(ScrollThresholdProperty);
304 SetValue(ScrollThresholdProperty, value);
305 NotifyPropertyChanged();
310 /// The ScrollSpeed property.
312 /// <since_tizen> 3 </since_tizen>
313 public float ScrollSpeed
317 return (float)GetValue(ScrollSpeedProperty);
321 SetValue(ScrollSpeedProperty, value);
322 NotifyPropertyChanged();
327 /// The PrimaryCursorColor property.
330 /// The property cascade chaining set is possible. For example, this (textEditor.PrimaryCursorColor.X = 0.1f;) is possible.
332 /// <since_tizen> 3 </since_tizen>
333 public Vector4 PrimaryCursorColor
337 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
338 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
342 SetValue(PrimaryCursorColorProperty, value);
343 NotifyPropertyChanged();
348 /// The SecondaryCursorColor property.
351 /// The property cascade chaining set is possible. For example, this (textEditor.SecondaryCursorColor.X = 0.1f;) is possible.
353 /// <since_tizen> 3 </since_tizen>
354 public Vector4 SecondaryCursorColor
358 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
359 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
363 SetValue(SecondaryCursorColorProperty, value);
364 NotifyPropertyChanged();
369 /// The EnableCursorBlink property.
371 /// <since_tizen> 3 </since_tizen>
372 public bool EnableCursorBlink
376 return (bool)GetValue(EnableCursorBlinkProperty);
380 SetValue(EnableCursorBlinkProperty, value);
381 NotifyPropertyChanged();
386 /// The CursorBlinkInterval property.
388 /// <since_tizen> 3 </since_tizen>
389 public float CursorBlinkInterval
393 return (float)GetValue(CursorBlinkIntervalProperty);
397 SetValue(CursorBlinkIntervalProperty, value);
398 NotifyPropertyChanged();
403 /// The CursorBlinkDuration property.
405 /// <since_tizen> 3 </since_tizen>
406 public float CursorBlinkDuration
410 return (float)GetValue(CursorBlinkDurationProperty);
414 SetValue(CursorBlinkDurationProperty, value);
415 NotifyPropertyChanged();
420 /// The CursorWidth property.
422 /// <since_tizen> 3 </since_tizen>
423 public int CursorWidth
427 return (int)GetValue(CursorWidthProperty);
431 SetValue(CursorWidthProperty, value);
432 NotifyPropertyChanged();
437 /// The GrabHandleImage property.
439 /// <since_tizen> 3 </since_tizen>
440 public string GrabHandleImage
444 return (string)GetValue(GrabHandleImageProperty);
448 SetValue(GrabHandleImageProperty, value);
449 NotifyPropertyChanged();
454 /// The GrabHandlePressedImage property.
456 /// <since_tizen> 3 </since_tizen>
457 public string GrabHandlePressedImage
461 return (string)GetValue(GrabHandlePressedImageProperty);
465 SetValue(GrabHandlePressedImageProperty, value);
466 NotifyPropertyChanged();
471 /// The SelectionHandleImageLeft property.
472 /// The selectionHandleImageLeft map contains the following key :<br />
473 /// <list type="table">
474 /// <item><term>filename (string)</term><description>The path of image file</description></item>
477 /// <since_tizen> 3 </since_tizen>
478 public PropertyMap SelectionHandleImageLeft
482 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
486 SetValue(SelectionHandleImageLeftProperty, value);
487 NotifyPropertyChanged();
492 /// The SelectionHandleImageRight property.
493 /// The selectionHandleImageRight map contains the following key :<br />
494 /// <list type="table">
495 /// <item><term>filename (string)</term><description>The path of image file</description></item>
498 /// <since_tizen> 3 </since_tizen>
499 public PropertyMap SelectionHandleImageRight
503 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
507 SetValue(SelectionHandleImageRightProperty, value);
508 NotifyPropertyChanged();
513 /// The SelectionHandlePressedImageLeft property.
514 /// The selectionHandlePressedImageLeft map contains the following key :<br />
515 /// <list type="table">
516 /// <item><term>filename (string)</term><description>The path of image file</description></item>
519 /// <since_tizen> 3 </since_tizen>
520 public PropertyMap SelectionHandlePressedImageLeft
524 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
528 SetValue(SelectionHandlePressedImageLeftProperty, value);
529 NotifyPropertyChanged();
534 /// The SelectionHandlePressedImageRight property.
535 /// The selectionHandlePressedImageRight map contains the following key :<br />
536 /// <list type="table">
537 /// <item><term>filename (string)</term><description>The path of image file</description></item>
540 /// <since_tizen> 3 </since_tizen>
541 public PropertyMap SelectionHandlePressedImageRight
545 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
549 SetValue(SelectionHandlePressedImageRightProperty, value);
550 NotifyPropertyChanged();
555 /// The SelectionHandleMarkerImageLeft property.
556 /// The selectionHandleMarkerImageLeft map contains the following key :<br />
557 /// <list type="table">
558 /// <item><term>filename (string)</term><description>The path of image file</description></item>
561 /// <since_tizen> 3 </since_tizen>
562 public PropertyMap SelectionHandleMarkerImageLeft
566 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
570 SetValue(SelectionHandleMarkerImageLeftProperty, value);
571 NotifyPropertyChanged();
576 /// The SelectionHandleMarkerImageRight property.
577 /// The selectionHandleMarkerImageRight map contains the following key :<br />
578 /// <list type="table">
579 /// <item><term>filename (string)</term><description>The path of image file</description></item>
582 /// <since_tizen> 3 </since_tizen>
583 public PropertyMap SelectionHandleMarkerImageRight
587 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
591 SetValue(SelectionHandleMarkerImageRightProperty, value);
592 NotifyPropertyChanged();
597 /// The SelectionHighlightColor property.
600 /// The property cascade chaining set is possible. For example, this (textEditor.SelectionHighlightColor.X = 0.1f;) is possible.
602 /// <since_tizen> 3 </since_tizen>
603 public Vector4 SelectionHighlightColor
607 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
608 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
612 SetValue(SelectionHighlightColorProperty, value);
613 NotifyPropertyChanged();
618 /// The DecorationBoundingBox property.
621 /// The property cascade chaining set is possible. For example, this (textEditor.DecorationBoundingBox.X = 1;) is possible.
623 /// <since_tizen> 3 </since_tizen>
624 public Rectangle DecorationBoundingBox
628 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
629 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
633 SetValue(DecorationBoundingBoxProperty, value);
634 NotifyPropertyChanged();
639 /// The EnableMarkup property.
641 /// <since_tizen> 3 </since_tizen>
642 public bool EnableMarkup
646 return (bool)GetValue(EnableMarkupProperty);
650 SetValue(EnableMarkupProperty, value);
651 NotifyPropertyChanged();
656 /// The InputColor property.
659 /// The property cascade chaining set is possible. For example, this (textEditor.InputColor.X = 0.1f;) is possible.
661 /// <since_tizen> 3 </since_tizen>
662 public Vector4 InputColor
666 Vector4 temp = (Vector4)GetValue(InputColorProperty);
667 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
671 SetValue(InputColorProperty, value);
672 NotifyPropertyChanged();
677 /// The InputFontFamily property.
679 /// <since_tizen> 3 </since_tizen>
680 public string InputFontFamily
684 return (string)GetValue(InputFontFamilyProperty);
688 SetValue(InputFontFamilyProperty, value);
689 NotifyPropertyChanged();
694 /// The InputFontStyle property.
695 /// The inputFontStyle map contains the following keys :<br />
696 /// <list type="table">
697 /// <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>
698 /// <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>
699 /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
702 /// <since_tizen> 3 </since_tizen>
703 public PropertyMap InputFontStyle
707 return (PropertyMap)GetValue(InputFontStyleProperty);
711 SetValue(InputFontStyleProperty, value);
712 NotifyPropertyChanged();
717 /// Set InputFontStyle to TextEditor. <br />
719 /// <param name="fontStyle">The FontStyle</param>
721 /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
724 /// The following example demonstrates how to use the SetInputFontStyle method.
726 /// var fontStyle = new Tizen.NUI.Text.FontStyle();
727 /// fontStyle.Width = FontWidthType.Expanded;
728 /// fontStyle.Weight = FontWeightType.Bold;
729 /// fontStyle.Slant = FontSlantType.Italic;
730 /// editor.SetInputFontStyle(fontStyle);
733 [EditorBrowsable(EditorBrowsableState.Never)]
734 public void SetInputFontStyle(FontStyle fontStyle)
736 SetProperty(TextEditor.Property.InputFontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
737 NotifyPropertyChanged();
741 /// Get InputFontStyle from TextEditor. <br />
743 /// <returns>The FontStyle</returns>
745 /// <see cref="Tizen.NUI.Text.FontStyle"/>
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public FontStyle GetInputFontStyle()
750 var map = new PropertyMap();
751 GetProperty(TextEditor.Property.InputFontStyle).Get(map);
752 return TextUtils.GetFontStyleStruct(map);
756 /// The InputPointSize property.
758 /// <since_tizen> 3 </since_tizen>
759 public float InputPointSize
763 return (float)GetValue(InputPointSizeProperty);
767 SetValue(InputPointSizeProperty, value);
768 NotifyPropertyChanged();
773 /// The LineSpacing property.
775 /// <since_tizen> 3 </since_tizen>
776 public float LineSpacing
780 return (float)GetValue(LineSpacingProperty);
784 SetValue(LineSpacingProperty, value);
785 NotifyPropertyChanged();
790 /// The InputLineSpacing property.
792 /// <since_tizen> 3 </since_tizen>
793 public float InputLineSpacing
797 return (float)GetValue(InputLineSpacingProperty);
801 SetValue(InputLineSpacingProperty, value);
802 NotifyPropertyChanged();
807 /// The Underline property.
808 /// The underline map contains the following keys :<br />
809 /// <list type="table">
810 /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
811 /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
812 /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
815 /// <since_tizen> 3 </since_tizen>
816 public PropertyMap Underline
820 return (PropertyMap)GetValue(UnderlineProperty);
824 SetValue(UnderlineProperty, value);
825 NotifyPropertyChanged();
830 /// The InputUnderline property.
832 /// <since_tizen> 3 </since_tizen>
833 public string InputUnderline
837 return (string)GetValue(InputUnderlineProperty);
841 SetValue(InputUnderlineProperty, value);
842 NotifyPropertyChanged();
847 /// The Shadow property.
848 /// The shadow map contains the following keys :<br />
849 /// <list type="table">
850 /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
851 /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
852 /// <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>
855 /// <since_tizen> 3 </since_tizen>
856 public PropertyMap Shadow
860 return (PropertyMap)GetValue(ShadowProperty);
864 SetValue(ShadowProperty, value);
865 NotifyPropertyChanged();
870 /// The InputShadow property.
872 /// <since_tizen> 3 </since_tizen>
873 public string InputShadow
877 return (string)GetValue(InputShadowProperty);
881 SetValue(InputShadowProperty, value);
882 NotifyPropertyChanged();
887 /// The Emboss property.
889 /// <since_tizen> 3 </since_tizen>
894 return (string)GetValue(EmbossProperty);
898 SetValue(EmbossProperty, value);
899 NotifyPropertyChanged();
904 /// The InputEmboss property.
906 /// <since_tizen> 3 </since_tizen>
907 public string InputEmboss
911 return (string)GetValue(InputEmbossProperty);
915 SetValue(InputEmbossProperty, value);
916 NotifyPropertyChanged();
921 /// The Outline property.
922 /// The outline map contains the following keys :<br />
923 /// <list type="table">
924 /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
925 /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
928 /// <since_tizen> 3 </since_tizen>
929 public PropertyMap Outline
933 return (PropertyMap)GetValue(OutlineProperty);
937 SetValue(OutlineProperty, value);
938 NotifyPropertyChanged();
943 /// The InputOutline property.
945 /// <since_tizen> 3 </since_tizen>
946 public string InputOutline
950 return (string)GetValue(InputOutlineProperty);
954 SetValue(InputOutlineProperty, value);
955 NotifyPropertyChanged();
960 /// The SmoothScroll property.
962 /// <since_tizen> 3 </since_tizen>
963 public bool SmoothScroll
967 return (bool)GetValue(SmoothScrollProperty);
971 SetValue(SmoothScrollProperty, value);
972 NotifyPropertyChanged();
977 /// The SmoothScrollDuration property.
979 /// <since_tizen> 3 </since_tizen>
980 public float SmoothScrollDuration
984 return (float)GetValue(SmoothScrollDurationProperty);
988 SetValue(SmoothScrollDurationProperty, value);
989 NotifyPropertyChanged();
994 /// The EnableScrollBar property.
996 /// <since_tizen> 3 </since_tizen>
997 public bool EnableScrollBar
1001 return (bool)GetValue(EnableScrollBarProperty);
1005 SetValue(EnableScrollBarProperty, value);
1006 NotifyPropertyChanged();
1011 /// The ScrollBarShowDuration property.
1013 /// <since_tizen> 3 </since_tizen>
1014 public float ScrollBarShowDuration
1018 return (float)GetValue(ScrollBarShowDurationProperty);
1022 SetValue(ScrollBarShowDurationProperty, value);
1023 NotifyPropertyChanged();
1028 /// The ScrollBarFadeDuration property.
1030 /// <since_tizen> 3 </since_tizen>
1031 public float ScrollBarFadeDuration
1035 return (float)GetValue(ScrollBarFadeDurationProperty);
1039 SetValue(ScrollBarFadeDurationProperty, value);
1040 NotifyPropertyChanged();
1045 /// The PixelSize property.
1047 /// <since_tizen> 3 </since_tizen>
1048 public float PixelSize
1052 return (float)GetValue(PixelSizeProperty);
1056 SetValue(PixelSizeProperty, value);
1057 NotifyPropertyChanged();
1062 /// The line count of the text.
1064 /// <since_tizen> 3 </since_tizen>
1065 public int LineCount
1070 GetProperty(TextEditor.Property.LineCount).Get(out temp);
1076 /// The text to display when the TextEditor is empty and inactive.
1078 /// <since_tizen> 3 </since_tizen>
1079 public string PlaceholderText
1083 return (string)GetValue(PlaceholderTextProperty);
1087 SetValue(PlaceholderTextProperty, value);
1088 NotifyPropertyChanged();
1093 /// The Selected Text property (read-only).
1095 [EditorBrowsable(EditorBrowsableState.Never)]
1096 public string SelectedText
1101 GetProperty(TextEditor.Property.SelectedText).Get(out temp);
1107 /// The Placeholder text color.
1110 /// The property cascade chaining set is possible. For example, this (textEditor.PlaceholderTextColor.X = 0.1f;) is possible.
1112 /// <since_tizen> 3 </since_tizen>
1113 public Color PlaceholderTextColor
1117 Color temp = (Color)GetValue(PlaceholderTextColorProperty);
1118 return new Color(OnPlaceholderTextColorChanged, temp.R, temp.G, temp.B, temp.A);
1122 SetValue(PlaceholderTextColorProperty, value);
1123 NotifyPropertyChanged();
1128 /// The EnableSelection property.
1130 /// <since_tizen> 3 </since_tizen>
1131 public bool EnableSelection
1135 return (bool)GetValue(EnableSelectionProperty);
1139 SetValue(EnableSelectionProperty, value);
1140 NotifyPropertyChanged();
1145 /// The start index for selection.
1147 /// <since_tizen> 8 </since_tizen>
1148 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1149 [EditorBrowsable(EditorBrowsableState.Never)]
1150 public int SelectedTextStart
1155 GetProperty(TextEditor.Property.SelectedTextStart).Get(out temp);
1160 SetProperty(TextEditor.Property.SelectedTextStart, new PropertyValue(value));
1161 NotifyPropertyChanged();
1166 /// The end index for selection.
1168 /// <since_tizen> 8 </since_tizen>
1169 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1170 [EditorBrowsable(EditorBrowsableState.Never)]
1171 public int SelectedTextEnd
1176 GetProperty(TextEditor.Property.SelectedTextEnd).Get(out temp);
1181 SetProperty(TextEditor.Property.SelectedTextEnd, new PropertyValue(value));
1182 NotifyPropertyChanged();
1187 /// Enable editing in text control.
1189 /// <since_tizen> 8 </since_tizen>
1190 /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1191 [EditorBrowsable(EditorBrowsableState.Never)]
1192 public bool EnableEditing
1197 GetProperty(TextEditor.Property.EnableEditing).Get(out temp);
1202 SetProperty(TextEditor.Property.EnableEditing, new PropertyValue(value));
1203 NotifyPropertyChanged();
1208 /// Specify horizontal scroll position in text control.
1210 [EditorBrowsable(EditorBrowsableState.Never)]
1211 public int HorizontalScrollPosition
1216 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
1218 propertyValue.Get(out temp);
1224 using (PropertyValue propertyValue = new PropertyValue(value))
1226 SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
1227 NotifyPropertyChanged();
1233 /// Specify vertical scroll position in text control.
1235 [EditorBrowsable(EditorBrowsableState.Never)]
1236 public int VerticalScrollPosition
1241 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
1243 propertyValue.Get(out temp);
1249 using (PropertyValue propertyValue = new PropertyValue(value))
1251 SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
1252 NotifyPropertyChanged();
1258 /// Specify primary cursor (caret) position in text control.
1260 [EditorBrowsable(EditorBrowsableState.Never)]
1261 public int PrimaryCursorPosition
1266 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
1268 propertyValue.Get(out temp);
1274 using (PropertyValue propertyValue = new PropertyValue(value))
1276 SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
1277 NotifyPropertyChanged();
1283 /// The GrabHandleColor property.
1286 /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
1288 [EditorBrowsable(EditorBrowsableState.Never)]
1289 public Color GrabHandleColor
1293 Color temp = (Color)GetValue(GrabHandleColorProperty);
1294 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1298 SetValue(GrabHandleColorProperty, value);
1299 NotifyPropertyChanged();
1304 /// Set InputFilter to TextEditor. <br />
1306 /// <param name="inputFilter">The InputFilter</param>
1308 /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
1309 /// Users can set the Accepted or Rejected regular expression set, or both. <br />
1310 /// If both are used, Rejected has higher priority. <br />
1311 /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
1312 /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description. <br />
1315 /// The following example demonstrates how to use the SetInputFilter method.
1317 /// Tizen.NUI.Text.InputFilter inputFilter;
1318 /// inputFilter.Accepted = new Regex(@"[\d]"); // accept whole digits
1319 /// inputFilter.Rejected = new Regex("[0-3]"); // reject 0, 1, 2, 3
1320 /// editor.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
1323 [EditorBrowsable(EditorBrowsableState.Never)]
1324 public void SetInputFilter(InputFilter inputFilter)
1326 var map = new PropertyMap();
1327 var accepted = inputFilter.Accepted != null ? new PropertyValue(inputFilter.Accepted.ToString()) : new PropertyValue("");
1328 var rejected = inputFilter.Rejected != null ? new PropertyValue(inputFilter.Rejected.ToString()) : new PropertyValue("");
1329 map.Add(0, accepted);
1330 map.Add(1, rejected);
1331 SetProperty(TextEditor.Property.InputFilter, new PropertyValue(map));
1335 /// Get InputFilter from TextEditor. <br />
1337 /// <returns>The InputFilter</returns>
1339 /// <see cref="Tizen.NUI.Text.InputFilter"/>
1341 [EditorBrowsable(EditorBrowsableState.Never)]
1342 public InputFilter GetInputFilter()
1344 var map = new PropertyMap();
1345 GetProperty(TextEditor.Property.InputFilter).Get(map);
1346 string accepted = "";
1347 string rejected = "";
1348 map.Find(0)?.Get(out accepted);
1349 map.Find(1)?.Get(out rejected);
1351 var inputFilter = new InputFilter();
1352 inputFilter.Accepted = new Regex(accepted);
1353 inputFilter.Rejected = new Regex(rejected);
1359 /// The Placeholder property.
1360 /// The placeholder map contains the following keys :<br />
1361 /// <list type="table">
1362 /// <item><term>text (string)</term><description>The text to display when the TextEditor is empty and inactive</description></item>
1363 /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1364 /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1365 /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1366 /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1367 /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1368 /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1369 /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1373 /// The following example demonstrates how to set the placeholder property.
1375 /// PropertyMap propertyMap = new PropertyMap();
1376 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1377 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1378 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1379 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1380 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1382 /// PropertyMap fontStyleMap = new PropertyMap();
1383 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1384 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1385 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1386 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1388 /// TextEditor editor = new TextEditor();
1389 /// editor.Placeholder = propertyMap;
1392 /// <since_tizen> 3 </since_tizen>
1393 public Tizen.NUI.PropertyMap Placeholder
1397 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
1398 PropertyValue value = null;
1401 value = map.Find(0);
1404 value.Get(out string text);
1405 map.Add("text", new PropertyValue(text));
1409 value = map.Find(1);
1412 value.Get(out string textFocused);
1413 map.Add("textFocused", new PropertyValue(textFocused));
1417 value = map.Find(2);
1420 Color color = new Color();
1422 map.Add("color", new PropertyValue(color));
1426 value = map.Find(3);
1429 value.Get(out string fontFamily);
1430 map.Add("fontFamily", new PropertyValue(fontFamily));
1434 value = map.Find(4);
1437 PropertyMap fontStyle = new PropertyMap();
1438 value.Get(fontStyle);
1439 map.Add("fontStyle", new PropertyValue(fontStyle));
1443 value = map.Find(5);
1446 value.Get(out float pointSize);
1447 map.Add("pointSize", new PropertyValue(pointSize));
1451 value = map.Find(6);
1454 value.Get(out float pixelSize);
1455 map.Add("pixelSize", new PropertyValue(pixelSize));
1459 value = map.Find(7);
1462 value.Get(out bool ellipsis);
1463 map.Add("ellipsis", new PropertyValue(ellipsis));
1470 SetValue(PlaceholderProperty, value);
1471 NotifyPropertyChanged();
1476 /// The Ellipsis property.<br />
1477 /// Enable or disable the ellipsis.<br />
1479 [EditorBrowsable(EditorBrowsableState.Never)]
1480 public bool Ellipsis
1484 return (bool)GetValue(EllipsisProperty);
1488 SetValue(EllipsisProperty, value);
1489 NotifyPropertyChanged();
1495 /// The ellipsis position of the text.
1496 /// The ellipsis position type when the text size over the layout size.<br />
1497 /// The ellipsis position: End, Start or Middle.<br />
1499 [EditorBrowsable(EditorBrowsableState.Never)]
1500 public EllipsisPosition EllipsisPosition
1504 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
1508 SetValue(EllipsisPositionProperty, value);
1509 NotifyPropertyChanged();
1514 /// The LineWrapMode property.<br />
1515 /// The line wrap mode when the text lines over the layout width.<br />
1517 /// <since_tizen> 4 </since_tizen>
1518 public LineWrapMode LineWrapMode
1522 return (LineWrapMode)GetValue(LineWrapModeProperty);
1526 SetValue(LineWrapModeProperty, value);
1527 NotifyPropertyChanged();
1532 /// Enables Text selection using Shift key.
1534 /// <since_tizen> 5 </since_tizen>
1535 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1536 [EditorBrowsable(EditorBrowsableState.Never)]
1537 public bool EnableShiftSelection
1541 return (bool)GetValue(EnableShiftSelectionProperty);
1545 SetValue(EnableShiftSelectionProperty, value);
1546 NotifyPropertyChanged();
1551 /// The text alignment to match the direction of the system language.
1553 /// <since_tizen> 6 </since_tizen>
1554 public bool MatchSystemLanguageDirection
1558 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1562 SetValue(MatchSystemLanguageDirectionProperty, value);
1563 NotifyPropertyChanged();
1568 /// The MaxLength property.
1570 /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1571 [EditorBrowsable(EditorBrowsableState.Never)]
1572 public int MaxLength
1576 return (int)GetValue(MaxLengthProperty);
1580 SetValue(MaxLengthProperty, value);
1581 NotifyPropertyChanged();
1585 /// Only used by the IL of xaml, will never changed to not hidden.
1586 [EditorBrowsable(EditorBrowsableState.Never)]
1587 public override bool IsCreateByXaml
1591 return base.IsCreateByXaml;
1595 base.IsCreateByXaml = value;
1599 this.TextChanged += (obj, e) =>
1601 this.Text = e.TextEditor.Text;
1608 /// The FontSizeScale property. <br />
1609 /// The default value is 1.0. <br />
1610 /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1612 /// <since_tizen> 9 </since_tizen>
1613 public float FontSizeScale
1617 return fontSizeScale;
1621 float newFontSizeScale;
1623 if (fontSizeScale == value) return;
1625 fontSizeScale = value;
1626 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1628 SystemSettingsFontSize systemSettingsFontSize;
1632 systemSettingsFontSize = SystemSettings.FontSize;
1636 Console.WriteLine("{0} Exception caught.", e);
1637 systemSettingsFontSize = SystemSettingsFontSize.Normal;
1639 newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1640 addFontSizeChangedCallback();
1644 newFontSizeScale = fontSizeScale;
1645 removeFontSizeChangedCallback();
1648 SetValue(FontSizeScaleProperty, newFontSizeScale);
1649 NotifyPropertyChanged();
1654 /// The InputMethodSettings property.
1657 /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
1660 /// The following example demonstrates how to set the InputMethodSettings property.
1662 /// InputMethod method = new InputMethod();
1663 /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
1664 /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
1665 /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
1666 /// method.Variation = 1;
1667 /// textEditor.InputMethodSettings = method.OutputMap;
1670 [EditorBrowsable(EditorBrowsableState.Never)]
1671 public PropertyMap InputMethodSettings
1675 return (PropertyMap)GetValue(InputMethodSettingsProperty);
1679 SetValue(InputMethodSettingsProperty, value);
1680 NotifyPropertyChanged();
1685 /// Scroll the text control by specific amount..
1687 /// <param name="scroll">The amount (in pixels) of scrolling in horizontal & vertical directions.</param>
1688 [EditorBrowsable(EditorBrowsableState.Never)]
1689 public void ScrollBy(Vector2 scroll)
1691 Interop.TextEditor.ScrollBy(SwigCPtr, Vector2.getCPtr(scroll));
1692 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1696 /// Get the InputMethodContext instance.
1698 /// <returns>The InputMethodContext instance.</returns>
1699 /// <since_tizen> 5 </since_tizen>
1700 public InputMethodContext GetInputMethodContext()
1702 if (inputMethodContext == null)
1704 /*Avoid raising InputMethodContext reference count.*/
1705 inputMethodContext = new InputMethodContext(Interop.TextEditor.GetInputMethodContext(SwigCPtr), true);
1706 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1708 return inputMethodContext;
1712 /// Select the whole text.
1714 [EditorBrowsable(EditorBrowsableState.Never)]
1715 public void SelectWholeText()
1717 Interop.TextEditor.SelectWholeText(SwigCPtr);
1718 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1722 /// Select text from start to end index.
1724 /// <param name="start">The start index for selection.</param>
1725 /// <param name="end">The end index for selection.</param>
1726 [EditorBrowsable(EditorBrowsableState.Never)]
1727 public void SelectText(uint start, uint end)
1729 Interop.TextEditor.SelectText(SwigCPtr, start, end);
1730 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1734 /// Clear selection of the text.
1736 [EditorBrowsable(EditorBrowsableState.Never)]
1737 public void SelectNone()
1739 _ = Interop.TextEditor.SelectNone(SwigCPtr);
1740 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1744 /// Enable grab handle property.
1746 [EditorBrowsable(EditorBrowsableState.Never)]
1747 public bool EnableGrabHandle
1751 return (bool)GetValue(EnableGrabHandleProperty);
1755 SetValue(EnableGrabHandleProperty, value);
1756 NotifyPropertyChanged();
1761 /// Enable grab handle popup property.
1763 [EditorBrowsable(EditorBrowsableState.Never)]
1764 public bool EnableGrabHandlePopup
1768 return (bool)GetValue(EnableGrabHandlePopupProperty);
1772 SetValue(EnableGrabHandlePopupProperty, value);
1773 NotifyPropertyChanged();
1777 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
1779 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1782 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
1784 SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.InputStyleChangedSignal(SwigCPtr));
1785 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1792 /// <since_tizen> 3 </since_tizen>
1793 protected override void Dispose(DisposeTypes type)
1800 if (systemlangTextFlag)
1802 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1805 removeFontSizeChangedCallback();
1807 //Release your own unmanaged resources here.
1808 //You should not access any managed member here except static instance.
1809 //because the execution order of Finalizes is non-deterministic.
1813 if (textEditorTextChangedCallbackDelegate != null)
1815 TextChangedSignal().Disconnect(textEditorTextChangedCallbackDelegate);
1818 if (textEditorMaxLengthReachedCallbackDelegate != null)
1820 this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
1827 /// This will not be public opened.
1828 [EditorBrowsable(EditorBrowsableState.Never)]
1829 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1831 // In order to speed up IME hide, temporarily add
1832 GetInputMethodContext()?.DestroyContext();
1833 Interop.TextEditor.DeleteTextEditor(swigCPtr);
1836 private string SetTranslatable(string textEditorSid)
1838 string translatableText = null;
1839 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1840 if (translatableText != null)
1842 if (systemlangTextFlag == false)
1844 SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1845 systemlangTextFlag = true;
1847 return translatableText;
1851 translatableText = "";
1852 return translatableText;
1856 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1858 if (textEditorTextSid != null)
1860 Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1862 if (textEditorPlaceHolderTextSid != null)
1864 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1868 private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
1870 float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
1871 SetValue(FontSizeScaleProperty, newFontSizeScale);
1872 NotifyPropertyChanged();
1875 private void addFontSizeChangedCallback()
1877 if (hasFontSizeChangedCallback != true)
1881 SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
1882 hasFontSizeChangedCallback = true;
1886 Console.WriteLine("{0} Exception caught.", e);
1887 hasFontSizeChangedCallback = false;
1892 private void removeFontSizeChangedCallback()
1894 if (hasFontSizeChangedCallback == true)
1898 SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
1899 hasFontSizeChangedCallback = false;
1903 Console.WriteLine("{0} Exception caught.", e);
1904 hasFontSizeChangedCallback = true;
1909 internal new class Property
1911 internal static readonly int TEXT = Interop.TextEditor.TextGet();
1912 internal static readonly int TextColor = Interop.TextEditor.TextColorGet();
1913 internal static readonly int FontFamily = Interop.TextEditor.FontFamilyGet();
1914 internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
1915 internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
1916 internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
1917 internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
1918 internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
1919 internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
1920 internal static readonly int SecondaryCursorColor = Interop.TextEditor.SecondaryCursorColorGet();
1921 internal static readonly int EnableCursorBlink = Interop.TextEditor.EnableCursorBlinkGet();
1922 internal static readonly int CursorBlinkInterval = Interop.TextEditor.CursorBlinkIntervalGet();
1923 internal static readonly int CursorBlinkDuration = Interop.TextEditor.CursorBlinkDurationGet();
1924 internal static readonly int CursorWidth = Interop.TextEditor.CursorWidthGet();
1925 internal static readonly int GrabHandleImage = Interop.TextEditor.GrabHandleImageGet();
1926 internal static readonly int GrabHandlePressedImage = Interop.TextEditor.GrabHandlePressedImageGet();
1927 internal static readonly int SelectionHandleImageLeft = Interop.TextEditor.SelectionHandleImageLeftGet();
1928 internal static readonly int SelectionHandleImageRight = Interop.TextEditor.SelectionHandleImageRightGet();
1929 internal static readonly int SelectionHandlePressedImageLeft = Interop.TextEditor.SelectionHandlePressedImageLeftGet();
1930 internal static readonly int SelectionHandlePressedImageRight = Interop.TextEditor.SelectionHandlePressedImageRightGet();
1931 internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextEditor.SelectionHandleMarkerImageLeftGet();
1932 internal static readonly int SelectionHandleMarkerImageRight = Interop.TextEditor.SelectionHandleMarkerImageRightGet();
1933 internal static readonly int SelectionHighlightColor = Interop.TextEditor.SelectionHighlightColorGet();
1934 internal static readonly int DecorationBoundingBox = Interop.TextEditor.DecorationBoundingBoxGet();
1935 internal static readonly int EnableMarkup = Interop.TextEditor.EnableMarkupGet();
1936 internal static readonly int InputColor = Interop.TextEditor.InputColorGet();
1937 internal static readonly int InputFontFamily = Interop.TextEditor.InputFontFamilyGet();
1938 internal static readonly int InputFontStyle = Interop.TextEditor.InputFontStyleGet();
1939 internal static readonly int InputPointSize = Interop.TextEditor.InputPointSizeGet();
1940 internal static readonly int LineSpacing = Interop.TextEditor.LineSpacingGet();
1941 internal static readonly int InputLineSpacing = Interop.TextEditor.InputLineSpacingGet();
1942 internal static readonly int UNDERLINE = Interop.TextEditor.UnderlineGet();
1943 internal static readonly int InputUnderline = Interop.TextEditor.InputUnderlineGet();
1944 internal static readonly int SHADOW = Interop.TextEditor.ShadowGet();
1945 internal static readonly int InputShadow = Interop.TextEditor.InputShadowGet();
1946 internal static readonly int EMBOSS = Interop.TextEditor.EmbossGet();
1947 internal static readonly int InputEmboss = Interop.TextEditor.InputEmbossGet();
1948 internal static readonly int OUTLINE = Interop.TextEditor.OutlineGet();
1949 internal static readonly int InputOutline = Interop.TextEditor.InputOutlineGet();
1950 internal static readonly int SmoothScroll = Interop.TextEditor.SmoothScrollGet();
1951 internal static readonly int SmoothScrollDuration = Interop.TextEditor.SmoothScrollDurationGet();
1952 internal static readonly int EnableScrollBar = Interop.TextEditor.EnableScrollBarGet();
1953 internal static readonly int ScrollBarShowDuration = Interop.TextEditor.ScrollBarShowDurationGet();
1954 internal static readonly int ScrollBarFadeDuration = Interop.TextEditor.ScrollBarFadeDurationGet();
1955 internal static readonly int PixelSize = Interop.TextEditor.PixelSizeGet();
1956 internal static readonly int LineCount = Interop.TextEditor.LineCountGet();
1957 internal static readonly int EnableSelection = Interop.TextEditor.EnableSelectionGet();
1958 internal static readonly int PLACEHOLDER = Interop.TextEditor.PlaceholderGet();
1959 internal static readonly int LineWrapMode = Interop.TextEditor.LineWrapModeGet();
1960 internal static readonly int PlaceholderText = Interop.TextEditor.PlaceholderTextGet();
1961 internal static readonly int PlaceholderTextColor = Interop.TextEditor.PlaceholderTextColorGet();
1962 internal static readonly int EnableShiftSelection = Interop.TextEditor.EnableShiftSelectionGet();
1963 internal static readonly int MatchSystemLanguageDirection = Interop.TextEditor.MatchSystemLanguageDirectionGet();
1964 internal static readonly int MaxLength = Interop.TextEditor.MaxLengthGet();
1965 internal static readonly int SelectedTextStart = Interop.TextEditor.SelectedTextStartGet();
1966 internal static readonly int SelectedTextEnd = Interop.TextEditor.SelectedTextEndGet();
1967 internal static readonly int EnableEditing = Interop.TextEditor.EnableEditingGet();
1968 internal static readonly int SelectedText = Interop.TextEditor.SelectedTextGet();
1969 internal static readonly int HorizontalScrollPosition = Interop.TextEditor.HorizontalScrollPositionGet();
1970 internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
1971 internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
1972 internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
1973 internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
1974 internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
1975 internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
1976 internal static readonly int InputMethodSettings = Interop.TextEditor.InputMethodSettingsGet();
1977 internal static readonly int ELLIPSIS = Interop.TextEditor.EllipsisGet();
1978 internal static readonly int EllipsisPosition = Interop.TextEditor.EllipsisPositionGet();
1979 internal static readonly int InputFilter = Interop.TextEditor.InputFilterGet();
1982 internal class InputStyle
1988 FontFamily = 0x0002,
1991 LineSpacing = 0x0010,
1999 private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
2001 DecorationBoundingBox = new Rectangle(x, y, width, height);
2003 private void OnInputColorChanged(float x, float y, float z, float w)
2005 InputColor = new Vector4(x, y, z, w);
2007 private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
2009 PlaceholderTextColor = new Color(r, g, b, a);
2011 private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
2013 PrimaryCursorColor = new Vector4(x, y, z, w);
2015 private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
2017 SecondaryCursorColor = new Vector4(x, y, z, w);
2019 private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
2021 SelectionHighlightColor = new Vector4(x, y, z, w);
2023 private void OnTextColorChanged(float x, float y, float z, float w)
2025 TextColor = new Vector4(x, y, z, w);
2027 private void OnGrabHandleColorChanged(float r, float g, float b, float a)
2029 GrabHandleColor = new Color(r, g, b, a);