8fffdcb86708123b03bdddb040f01479cd3b8666
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextEditor.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20
21 using System;
22 using System.Globalization;
23 using System.ComponentModel;
24
25 namespace Tizen.NUI.BaseComponents
26 {
27     /// <summary>
28     /// A control which provides a multi-line editable text editor.
29     /// </summary>
30     /// <since_tizen> 3 </since_tizen>
31     public partial class TextEditor : View
32     {
33         private string textEditorTextSid = null;
34         private string textEditorPlaceHolderTextSid = null;
35         private bool systemlangTextFlag = false;
36         private InputMethodContext inputMethodContext = null;
37         private float fontSizeScale = 1.0f;
38         private bool hasFontSizeChangedCallback = false;
39
40         static TextEditor() { }
41
42         /// <summary>
43         /// Creates the TextEditor control.
44         /// </summary>
45         /// <since_tizen> 3 </since_tizen>
46         public TextEditor() : this(Interop.TextEditor.New(), true)
47         {
48             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49         }
50
51         /// <summary>
52         /// Creates the TextEditor with specified style.
53         /// </summary>
54         [EditorBrowsable(EditorBrowsableState.Never)]
55         public TextEditor(TextEditorStyle style) : this(Interop.TextLabel.New(), true, style: style)
56         {
57         }
58
59         /// <summary>
60         /// Creates the TextEditor with setting the status of shown or hidden.
61         /// </summary>
62         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
63         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
64         [EditorBrowsable(EditorBrowsableState.Never)]
65         public TextEditor(bool shown) : this(Interop.TextEditor.New(), true)
66         {
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68             SetVisible(shown);
69         }
70
71         internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.NewTextEditor(TextEditor.getCPtr(handle)), true)
72         {
73             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74
75             if (!shown)
76             {
77                 SetVisible(false);
78             }
79         }
80
81         internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true, TextEditorStyle style = null) : base(cPtr, cMemoryOwn, style)
82         {
83             if (!shown)
84             {
85                 SetVisible(false);
86             }
87         }
88
89         /// <summary>
90         /// The TranslatableText property.<br />
91         /// The text can set the SID value.<br />
92         /// </summary>
93         /// <exception cref='ArgumentNullException'>
94         /// ResourceManager about multilingual is null.
95         /// </exception>
96         /// <since_tizen> 4 </since_tizen>
97         public string TranslatableText
98         {
99             get
100             {
101                 return textEditorTextSid;
102             }
103             set
104             {
105                 if (NUIApplication.MultilingualResourceManager == null)
106                 {
107                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
108                 }
109                 textEditorTextSid = value;
110                 Text = SetTranslatable(textEditorTextSid);
111                 NotifyPropertyChanged();
112             }
113         }
114         /// <summary>
115         /// The TranslatablePlaceholderText property.<br />
116         /// The text can set the SID value.<br />
117         /// </summary>
118         /// <exception cref='ArgumentNullException'>
119         /// ResourceManager about multilingual is null.
120         /// </exception>
121         /// <since_tizen> 4 </since_tizen>
122         public string TranslatablePlaceholderText
123         {
124             get
125             {
126                 return textEditorPlaceHolderTextSid;
127             }
128             set
129             {
130                 if (NUIApplication.MultilingualResourceManager == null)
131                 {
132                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
133                 }
134                 textEditorPlaceHolderTextSid = value;
135                 PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
136                 NotifyPropertyChanged();
137             }
138         }
139
140         /// <summary>
141         /// The Text property.
142         /// </summary>
143         /// <since_tizen> 3 </since_tizen>
144         public string Text
145         {
146             get
147             {
148                 return (string)GetValue(TextProperty);
149             }
150             set
151             {
152                 SetValueAndForceSendChangeSignal(TextProperty, value);
153                 NotifyPropertyChanged();
154             }
155         }
156
157         /// <summary>
158         /// The TextColor property.
159         /// </summary>
160         /// <remarks>
161         /// The property cascade chaining set is possible. For example, this (textEditor.TextColor.X = 0.1f;) is possible.
162         /// </remarks>
163         /// <since_tizen> 3 </since_tizen>
164         public Vector4 TextColor
165         {
166             get
167             {
168                 Vector4 temp = (Vector4)GetValue(TextColorProperty);
169                 return new Vector4(OnTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
170             }
171             set
172             {
173                 SetValue(TextColorProperty, value);
174                 NotifyPropertyChanged();
175             }
176         }
177
178         /// <summary>
179         /// The FontFamily property.
180         /// </summary>
181         /// <since_tizen> 3 </since_tizen>
182         public string FontFamily
183         {
184             get
185             {
186                 return (string)GetValue(FontFamilyProperty);
187             }
188             set
189             {
190                 SetValue(FontFamilyProperty, value);
191                 NotifyPropertyChanged();
192             }
193         }
194
195         /// <summary>
196         /// The FontStyle property.
197         /// </summary>
198         /// <since_tizen> 3 </since_tizen>
199         public PropertyMap FontStyle
200         {
201             get
202             {
203                 return (PropertyMap)GetValue(FontStyleProperty);
204             }
205             set
206             {
207                 SetValue(FontStyleProperty, value);
208                 NotifyPropertyChanged();
209             }
210         }
211
212         /// <summary>
213         /// The PointSize property.
214         /// </summary>
215         /// <since_tizen> 3 </since_tizen>
216         public float PointSize
217         {
218             get
219             {
220                 return (float)GetValue(PointSizeProperty);
221             }
222             set
223             {
224                 SetValue(PointSizeProperty, value);
225                 NotifyPropertyChanged();
226             }
227         }
228
229         /// <summary>
230         /// The HorizontalAlignment property.
231         /// </summary>
232         /// <since_tizen> 3 </since_tizen>
233         public HorizontalAlignment HorizontalAlignment
234         {
235             get
236             {
237                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
238             }
239             set
240             {
241                 SetValue(HorizontalAlignmentProperty, value);
242                 NotifyPropertyChanged();
243             }
244         }
245
246         /// <summary>
247         /// The ScrollThreshold property.
248         /// </summary>
249         /// <since_tizen> 3 </since_tizen>
250         public float ScrollThreshold
251         {
252             get
253             {
254                 return (float)GetValue(ScrollThresholdProperty);
255             }
256             set
257             {
258                 SetValue(ScrollThresholdProperty, value);
259                 NotifyPropertyChanged();
260             }
261         }
262
263         /// <summary>
264         /// The ScrollSpeed property.
265         /// </summary>
266         /// <since_tizen> 3 </since_tizen>
267         public float ScrollSpeed
268         {
269             get
270             {
271                 return (float)GetValue(ScrollSpeedProperty);
272             }
273             set
274             {
275                 SetValue(ScrollSpeedProperty, value);
276                 NotifyPropertyChanged();
277             }
278         }
279
280         /// <summary>
281         /// The PrimaryCursorColor property.
282         /// </summary>
283         /// <remarks>
284         /// The property cascade chaining set is possible. For example, this (textEditor.PrimaryCursorColor.X = 0.1f;) is possible.
285         /// </remarks>
286         /// <since_tizen> 3 </since_tizen>
287         public Vector4 PrimaryCursorColor
288         {
289             get
290             {
291                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
292                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
293             }
294             set
295             {
296                 SetValue(PrimaryCursorColorProperty, value);
297                 NotifyPropertyChanged();
298             }
299         }
300
301         /// <summary>
302         /// The SecondaryCursorColor property.
303         /// </summary>
304         /// <remarks>
305         /// The property cascade chaining set is possible. For example, this (textEditor.SecondaryCursorColor.X = 0.1f;) is possible.
306         /// </remarks>
307         /// <since_tizen> 3 </since_tizen>
308         public Vector4 SecondaryCursorColor
309         {
310             get
311             {
312                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
313                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
314             }
315             set
316             {
317                 SetValue(SecondaryCursorColorProperty, value);
318                 NotifyPropertyChanged();
319             }
320         }
321
322         /// <summary>
323         /// The EnableCursorBlink property.
324         /// </summary>
325         /// <since_tizen> 3 </since_tizen>
326         public bool EnableCursorBlink
327         {
328             get
329             {
330                 return (bool)GetValue(EnableCursorBlinkProperty);
331             }
332             set
333             {
334                 SetValue(EnableCursorBlinkProperty, value);
335                 NotifyPropertyChanged();
336             }
337         }
338
339         /// <summary>
340         /// The CursorBlinkInterval property.
341         /// </summary>
342         /// <since_tizen> 3 </since_tizen>
343         public float CursorBlinkInterval
344         {
345             get
346             {
347                 return (float)GetValue(CursorBlinkIntervalProperty);
348             }
349             set
350             {
351                 SetValue(CursorBlinkIntervalProperty, value);
352                 NotifyPropertyChanged();
353             }
354         }
355
356         /// <summary>
357         /// The CursorBlinkDuration property.
358         /// </summary>
359         /// <since_tizen> 3 </since_tizen>
360         public float CursorBlinkDuration
361         {
362             get
363             {
364                 return (float)GetValue(CursorBlinkDurationProperty);
365             }
366             set
367             {
368                 SetValue(CursorBlinkDurationProperty, value);
369                 NotifyPropertyChanged();
370             }
371         }
372
373         /// <summary>
374         /// The CursorWidth property.
375         /// </summary>
376         /// <since_tizen> 3 </since_tizen>
377         public int CursorWidth
378         {
379             get
380             {
381                 return (int)GetValue(CursorWidthProperty);
382             }
383             set
384             {
385                 SetValue(CursorWidthProperty, value);
386                 NotifyPropertyChanged();
387             }
388         }
389
390         /// <summary>
391         /// The GrabHandleImage property.
392         /// </summary>
393         /// <since_tizen> 3 </since_tizen>
394         public string GrabHandleImage
395         {
396             get
397             {
398                 return (string)GetValue(GrabHandleImageProperty);
399             }
400             set
401             {
402                 SetValue(GrabHandleImageProperty, value);
403                 NotifyPropertyChanged();
404             }
405         }
406
407         /// <summary>
408         /// The GrabHandlePressedImage property.
409         /// </summary>
410         /// <since_tizen> 3 </since_tizen>
411         public string GrabHandlePressedImage
412         {
413             get
414             {
415                 return (string)GetValue(GrabHandlePressedImageProperty);
416             }
417             set
418             {
419                 SetValue(GrabHandlePressedImageProperty, value);
420                 NotifyPropertyChanged();
421             }
422         }
423
424         /// <summary>
425         /// The SelectionHandleImageLeft property.
426         /// </summary>
427         /// <since_tizen> 3 </since_tizen>
428         public PropertyMap SelectionHandleImageLeft
429         {
430             get
431             {
432                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
433             }
434             set
435             {
436                 SetValue(SelectionHandleImageLeftProperty, value);
437                 NotifyPropertyChanged();
438             }
439         }
440
441         /// <summary>
442         /// The SelectionHandleImageRight property.
443         /// </summary>
444         /// <since_tizen> 3 </since_tizen>
445         public PropertyMap SelectionHandleImageRight
446         {
447             get
448             {
449                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
450             }
451             set
452             {
453                 SetValue(SelectionHandleImageRightProperty, value);
454                 NotifyPropertyChanged();
455             }
456         }
457
458         /// <summary>
459         /// The SelectionHandlePressedImageLeft property.
460         /// </summary>
461         /// <since_tizen> 3 </since_tizen>
462         public PropertyMap SelectionHandlePressedImageLeft
463         {
464             get
465             {
466                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
467             }
468             set
469             {
470                 SetValue(SelectionHandlePressedImageLeftProperty, value);
471                 NotifyPropertyChanged();
472             }
473         }
474
475         /// <summary>
476         /// The SelectionHandlePressedImageRight property.
477         /// </summary>
478         /// <since_tizen> 3 </since_tizen>
479         public PropertyMap SelectionHandlePressedImageRight
480         {
481             get
482             {
483                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
484             }
485             set
486             {
487                 SetValue(SelectionHandlePressedImageRightProperty, value);
488                 NotifyPropertyChanged();
489             }
490         }
491
492         /// <summary>
493         /// The SelectionHandleMarkerImageLeft property.
494         /// </summary>
495         /// <since_tizen> 3 </since_tizen>
496         public PropertyMap SelectionHandleMarkerImageLeft
497         {
498             get
499             {
500                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
501             }
502             set
503             {
504                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
505                 NotifyPropertyChanged();
506             }
507         }
508
509         /// <summary>
510         /// The SelectionHandleMarkerImageRight property.
511         /// </summary>
512         /// <since_tizen> 3 </since_tizen>
513         public PropertyMap SelectionHandleMarkerImageRight
514         {
515             get
516             {
517                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
518             }
519             set
520             {
521                 SetValue(SelectionHandleMarkerImageRightProperty, value);
522                 NotifyPropertyChanged();
523             }
524         }
525
526         /// <summary>
527         /// The SelectionHighlightColor property.
528         /// </summary>
529         /// <remarks>
530         /// The property cascade chaining set is possible. For example, this (textEditor.SelectionHighlightColor.X = 0.1f;) is possible.
531         /// </remarks>
532         /// <since_tizen> 3 </since_tizen>
533         public Vector4 SelectionHighlightColor
534         {
535             get
536             {
537                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
538                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
539             }
540             set
541             {
542                 SetValue(SelectionHighlightColorProperty, value);
543                 NotifyPropertyChanged();
544             }
545         }
546
547         /// <summary>
548         /// The DecorationBoundingBox property.
549         /// </summary>
550         /// <remarks>
551         /// The property cascade chaining set is possible. For example, this (textEditor.DecorationBoundingBox.X = 1;) is possible.
552         /// </remarks>
553         /// <since_tizen> 3 </since_tizen>
554         public Rectangle DecorationBoundingBox
555         {
556             get
557             {
558                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
559                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
560             }
561             set
562             {
563                 SetValue(DecorationBoundingBoxProperty, value);
564                 NotifyPropertyChanged();
565             }
566         }
567
568         /// <summary>
569         /// The EnableMarkup property.
570         /// </summary>
571         /// <since_tizen> 3 </since_tizen>
572         public bool EnableMarkup
573         {
574             get
575             {
576                 return (bool)GetValue(EnableMarkupProperty);
577             }
578             set
579             {
580                 SetValue(EnableMarkupProperty, value);
581                 NotifyPropertyChanged();
582             }
583         }
584
585         /// <summary>
586         /// The InputColor property.
587         /// </summary>
588         /// <remarks>
589         /// The property cascade chaining set is possible. For example, this (textEditor.InputColor.X = 0.1f;) is possible.
590         /// </remarks>
591         /// <since_tizen> 3 </since_tizen>
592         public Vector4 InputColor
593         {
594             get
595             {
596                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
597                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
598             }
599             set
600             {
601                 SetValue(InputColorProperty, value);
602                 NotifyPropertyChanged();
603             }
604         }
605
606         /// <summary>
607         /// The InputFontFamily property.
608         /// </summary>
609         /// <since_tizen> 3 </since_tizen>
610         public string InputFontFamily
611         {
612             get
613             {
614                 return (string)GetValue(InputFontFamilyProperty);
615             }
616             set
617             {
618                 SetValue(InputFontFamilyProperty, value);
619                 NotifyPropertyChanged();
620             }
621         }
622
623         /// <summary>
624         /// The InputFontStyle property.
625         /// </summary>
626         /// <since_tizen> 3 </since_tizen>
627         public PropertyMap InputFontStyle
628         {
629             get
630             {
631                 return (PropertyMap)GetValue(InputFontStyleProperty);
632             }
633             set
634             {
635                 SetValue(InputFontStyleProperty, value);
636                 NotifyPropertyChanged();
637             }
638         }
639
640         /// <summary>
641         /// The InputPointSize property.
642         /// </summary>
643         /// <since_tizen> 3 </since_tizen>
644         public float InputPointSize
645         {
646             get
647             {
648                 return (float)GetValue(InputPointSizeProperty);
649             }
650             set
651             {
652                 SetValue(InputPointSizeProperty, value);
653                 NotifyPropertyChanged();
654             }
655         }
656
657         /// <summary>
658         /// The LineSpacing property.
659         /// </summary>
660         /// <since_tizen> 3 </since_tizen>
661         public float LineSpacing
662         {
663             get
664             {
665                 return (float)GetValue(LineSpacingProperty);
666             }
667             set
668             {
669                 SetValue(LineSpacingProperty, value);
670                 NotifyPropertyChanged();
671             }
672         }
673
674         /// <summary>
675         /// The InputLineSpacing property.
676         /// </summary>
677         /// <since_tizen> 3 </since_tizen>
678         public float InputLineSpacing
679         {
680             get
681             {
682                 return (float)GetValue(InputLineSpacingProperty);
683             }
684             set
685             {
686                 SetValue(InputLineSpacingProperty, value);
687                 NotifyPropertyChanged();
688             }
689         }
690
691         /// <summary>
692         /// The Underline property.
693         /// </summary>
694         /// <since_tizen> 3 </since_tizen>
695         public PropertyMap Underline
696         {
697             get
698             {
699                 return (PropertyMap)GetValue(UnderlineProperty);
700             }
701             set
702             {
703                 SetValue(UnderlineProperty, value);
704                 NotifyPropertyChanged();
705             }
706         }
707
708         /// <summary>
709         /// The InputUnderline property.
710         /// </summary>
711         /// <since_tizen> 3 </since_tizen>
712         public string InputUnderline
713         {
714             get
715             {
716                 return (string)GetValue(InputUnderlineProperty);
717             }
718             set
719             {
720                 SetValue(InputUnderlineProperty, value);
721                 NotifyPropertyChanged();
722             }
723         }
724
725         /// <summary>
726         /// The Shadow property.
727         /// </summary>
728         /// <since_tizen> 3 </since_tizen>
729         public PropertyMap Shadow
730         {
731             get
732             {
733                 return (PropertyMap)GetValue(ShadowProperty);
734             }
735             set
736             {
737                 SetValue(ShadowProperty, value);
738                 NotifyPropertyChanged();
739             }
740         }
741
742         /// <summary>
743         /// The InputShadow property.
744         /// </summary>
745         /// <since_tizen> 3 </since_tizen>
746         public string InputShadow
747         {
748             get
749             {
750                 return (string)GetValue(InputShadowProperty);
751             }
752             set
753             {
754                 SetValue(InputShadowProperty, value);
755                 NotifyPropertyChanged();
756             }
757         }
758
759         /// <summary>
760         /// The Emboss property.
761         /// </summary>
762         /// <since_tizen> 3 </since_tizen>
763         public string Emboss
764         {
765             get
766             {
767                 return (string)GetValue(EmbossProperty);
768             }
769             set
770             {
771                 SetValue(EmbossProperty, value);
772                 NotifyPropertyChanged();
773             }
774         }
775
776         /// <summary>
777         /// The InputEmboss property.
778         /// </summary>
779         /// <since_tizen> 3 </since_tizen>
780         public string InputEmboss
781         {
782             get
783             {
784                 return (string)GetValue(InputEmbossProperty);
785             }
786             set
787             {
788                 SetValue(InputEmbossProperty, value);
789                 NotifyPropertyChanged();
790             }
791         }
792
793         /// <summary>
794         /// The Outline property.
795         /// </summary>
796         /// <since_tizen> 3 </since_tizen>
797         public PropertyMap Outline
798         {
799             get
800             {
801                 return (PropertyMap)GetValue(OutlineProperty);
802             }
803             set
804             {
805                 SetValue(OutlineProperty, value);
806                 NotifyPropertyChanged();
807             }
808         }
809
810         /// <summary>
811         /// The InputOutline property.
812         /// </summary>
813         /// <since_tizen> 3 </since_tizen>
814         public string InputOutline
815         {
816             get
817             {
818                 return (string)GetValue(InputOutlineProperty);
819             }
820             set
821             {
822                 SetValue(InputOutlineProperty, value);
823                 NotifyPropertyChanged();
824             }
825         }
826
827         /// <summary>
828         /// The SmoothScroll property.
829         /// </summary>
830         /// <since_tizen> 3 </since_tizen>
831         public bool SmoothScroll
832         {
833             get
834             {
835                 return (bool)GetValue(SmoothScrollProperty);
836             }
837             set
838             {
839                 SetValue(SmoothScrollProperty, value);
840                 NotifyPropertyChanged();
841             }
842         }
843
844         /// <summary>
845         /// The SmoothScrollDuration property.
846         /// </summary>
847         /// <since_tizen> 3 </since_tizen>
848         public float SmoothScrollDuration
849         {
850             get
851             {
852                 return (float)GetValue(SmoothScrollDurationProperty);
853             }
854             set
855             {
856                 SetValue(SmoothScrollDurationProperty, value);
857                 NotifyPropertyChanged();
858             }
859         }
860
861         /// <summary>
862         /// The EnableScrollBar property.
863         /// </summary>
864         /// <since_tizen> 3 </since_tizen>
865         public bool EnableScrollBar
866         {
867             get
868             {
869                 return (bool)GetValue(EnableScrollBarProperty);
870             }
871             set
872             {
873                 SetValue(EnableScrollBarProperty, value);
874                 NotifyPropertyChanged();
875             }
876         }
877
878         /// <summary>
879         /// The ScrollBarShowDuration property.
880         /// </summary>
881         /// <since_tizen> 3 </since_tizen>
882         public float ScrollBarShowDuration
883         {
884             get
885             {
886                 return (float)GetValue(ScrollBarShowDurationProperty);
887             }
888             set
889             {
890                 SetValue(ScrollBarShowDurationProperty, value);
891                 NotifyPropertyChanged();
892             }
893         }
894
895         /// <summary>
896         /// The ScrollBarFadeDuration property.
897         /// </summary>
898         /// <since_tizen> 3 </since_tizen>
899         public float ScrollBarFadeDuration
900         {
901             get
902             {
903                 return (float)GetValue(ScrollBarFadeDurationProperty);
904             }
905             set
906             {
907                 SetValue(ScrollBarFadeDurationProperty, value);
908                 NotifyPropertyChanged();
909             }
910         }
911
912         /// <summary>
913         /// The PixelSize property.
914         /// </summary>
915         /// <since_tizen> 3 </since_tizen>
916         public float PixelSize
917         {
918             get
919             {
920                 return (float)GetValue(PixelSizeProperty);
921             }
922             set
923             {
924                 SetValue(PixelSizeProperty, value);
925                 NotifyPropertyChanged();
926             }
927         }
928
929         /// <summary>
930         /// The line count of the text.
931         /// </summary>
932         /// <since_tizen> 3 </since_tizen>
933         public int LineCount
934         {
935             get
936             {
937                 int temp = 0;
938                 GetProperty(TextEditor.Property.LineCount).Get(out temp);
939                 return temp;
940             }
941         }
942
943         /// <summary>
944         /// The text to display when the TextEditor is empty and inactive.
945         /// </summary>
946         /// <since_tizen> 3 </since_tizen>
947         public string PlaceholderText
948         {
949             get
950             {
951                 return (string)GetValue(PlaceholderTextProperty);
952             }
953             set
954             {
955                 SetValue(PlaceholderTextProperty, value);
956                 NotifyPropertyChanged();
957             }
958         }
959
960         /// <summary>
961         /// The Selected Text property (read-only).
962         /// </summary>
963         [EditorBrowsable(EditorBrowsableState.Never)]
964         public string SelectedText
965         {
966             get
967             {
968                 string temp;
969                 GetProperty(TextEditor.Property.SelectedText).Get(out temp);
970                 return temp;
971             }
972         }
973
974         /// <summary>
975         /// The Placeholder text color.
976         /// </summary>
977         /// <remarks>
978         /// The property cascade chaining set is possible. For example, this (textEditor.PlaceholderTextColor.X = 0.1f;) is possible.
979         /// </remarks>
980         /// <since_tizen> 3 </since_tizen>
981         public Color PlaceholderTextColor
982         {
983             get
984             {
985                 Color temp = (Color)GetValue(PlaceholderTextColorProperty);
986                 return new Color(OnPlaceholderTextColorChanged, temp.R, temp.G, temp.B, temp.A);
987             }
988             set
989             {
990                 SetValue(PlaceholderTextColorProperty, value);
991                 NotifyPropertyChanged();
992             }
993         }
994
995         /// <summary>
996         /// The EnableSelection property.
997         /// </summary>
998         /// <since_tizen> 3 </since_tizen>
999         public bool EnableSelection
1000         {
1001             get
1002             {
1003                 return (bool)GetValue(EnableSelectionProperty);
1004             }
1005             set
1006             {
1007                 SetValue(EnableSelectionProperty, value);
1008                 NotifyPropertyChanged();
1009             }
1010         }
1011
1012         /// <summary>
1013         /// The start index for selection.
1014         /// </summary>
1015         /// <since_tizen> 8 </since_tizen>
1016         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1017         [EditorBrowsable(EditorBrowsableState.Never)]
1018         public int SelectedTextStart
1019         {
1020             get
1021             {
1022                 int temp;
1023                 GetProperty(TextEditor.Property.SelectedTextStart).Get(out temp);
1024                 return temp;
1025             }
1026             set
1027             {
1028                 SetProperty(TextEditor.Property.SelectedTextStart, new PropertyValue(value));
1029                 NotifyPropertyChanged();
1030             }
1031         }
1032
1033         /// <summary>
1034         /// The end index for selection.
1035         /// </summary>
1036         /// <since_tizen> 8 </since_tizen>
1037         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1038         [EditorBrowsable(EditorBrowsableState.Never)]
1039         public int SelectedTextEnd
1040         {
1041             get
1042             {
1043                 int temp;
1044                 GetProperty(TextEditor.Property.SelectedTextEnd).Get(out temp);
1045                 return temp;
1046             }
1047             set
1048             {
1049                 SetProperty(TextEditor.Property.SelectedTextEnd, new PropertyValue(value));
1050                 NotifyPropertyChanged();
1051             }
1052         }
1053
1054         /// <summary>
1055         /// Enable editing in text control.
1056         /// </summary>
1057         /// <since_tizen> 8 </since_tizen>
1058         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1059         [EditorBrowsable(EditorBrowsableState.Never)]
1060         public bool EnableEditing
1061         {
1062             get
1063             {
1064                 bool temp;
1065                 GetProperty(TextEditor.Property.EnableEditing).Get(out temp);
1066                 return temp;
1067             }
1068             set
1069             {
1070                 SetProperty(TextEditor.Property.EnableEditing, new PropertyValue(value));
1071                 NotifyPropertyChanged();
1072             }
1073         }
1074
1075         /// <summary>
1076         /// Specify horizontal scroll position in text control.
1077         /// </summary>
1078         [EditorBrowsable(EditorBrowsableState.Never)]
1079         public int HorizontalScrollPosition
1080         {
1081             get
1082             {
1083                 int temp;
1084                 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
1085                 {
1086                     propertyValue.Get(out temp);
1087                 }
1088                 return temp;
1089             }
1090             set
1091             {
1092                 using (PropertyValue propertyValue = new PropertyValue(value))
1093                 {
1094                     SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
1095                     NotifyPropertyChanged();
1096                 }
1097             }
1098         }
1099
1100         /// <summary>
1101         /// Specify vertical scroll position in text control.
1102         /// </summary>
1103         [EditorBrowsable(EditorBrowsableState.Never)]
1104         public int VerticalScrollPosition
1105         {
1106             get
1107             {
1108                 int temp;
1109                 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
1110                 {
1111                     propertyValue.Get(out temp);
1112                 }
1113                 return temp;
1114             }
1115             set
1116             {
1117                 using (PropertyValue propertyValue = new PropertyValue(value))
1118                 {
1119                     SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
1120                     NotifyPropertyChanged();
1121                 }
1122             }
1123         }
1124
1125         /// <summary>
1126         /// Specify primary cursor (caret) position in text control.
1127         /// </summary>
1128         [EditorBrowsable(EditorBrowsableState.Never)]
1129         public int PrimaryCursorPosition
1130         {
1131             get
1132             {
1133                 int temp;
1134                 using (PropertyValue propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
1135                 {
1136                     propertyValue.Get(out temp);
1137                 }
1138                 return temp;
1139             }
1140             set
1141             {
1142                 using (PropertyValue propertyValue = new PropertyValue(value))
1143                 {
1144                     SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
1145                     NotifyPropertyChanged();
1146                 }
1147             }
1148         }
1149
1150         /// <summary>
1151         /// The GrabHandleColor property.
1152         /// </summary>
1153         /// <remarks>
1154         /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
1155         /// </remarks>
1156         [EditorBrowsable(EditorBrowsableState.Never)]
1157         public Color GrabHandleColor
1158         {
1159             get
1160             {
1161                 Color temp = (Color)GetValue(GrabHandleColorProperty);
1162                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1163             }
1164             set
1165             {
1166                 SetValue(GrabHandleColorProperty, value);
1167                 NotifyPropertyChanged();
1168             }
1169         }
1170
1171         /// <summary>
1172         /// The Placeholder property.
1173         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1174         /// </summary>
1175         /// <example>
1176         /// The following example demonstrates how to set the placeholder property.
1177         /// <code>
1178         /// PropertyMap propertyMap = new PropertyMap();
1179         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1180         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1181         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1182         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1183         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1184         ///
1185         /// PropertyMap fontStyleMap = new PropertyMap();
1186         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1187         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1188         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1189         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1190         ///
1191         /// TextEditor editor = new TextEditor();
1192         /// editor.Placeholder = propertyMap;
1193         /// </code>
1194         /// </example>
1195         /// <since_tizen> 3 </since_tizen>
1196         public Tizen.NUI.PropertyMap Placeholder
1197         {
1198             get
1199             {
1200                 return (PropertyMap)GetValue(PlaceholderProperty);
1201             }
1202             set
1203             {
1204                 SetValue(PlaceholderProperty, value);
1205                 NotifyPropertyChanged();
1206             }
1207         }
1208
1209         /// <summary>
1210         /// The LineWrapMode property.<br />
1211         /// The line wrap mode when the text lines over the layout width.<br />
1212         /// </summary>
1213         /// <since_tizen> 4 </since_tizen>
1214         public LineWrapMode LineWrapMode
1215         {
1216             get
1217             {
1218                 return (LineWrapMode)GetValue(LineWrapModeProperty);
1219             }
1220             set
1221             {
1222                 SetValue(LineWrapModeProperty, value);
1223                 NotifyPropertyChanged();
1224             }
1225         }
1226
1227         /// <summary>
1228         /// Enables Text selection using Shift key.
1229         /// </summary>
1230         /// <since_tizen> 5 </since_tizen>
1231         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1232         [EditorBrowsable(EditorBrowsableState.Never)]
1233         public bool EnableShiftSelection
1234         {
1235             get
1236             {
1237                 return (bool)GetValue(EnableShiftSelectionProperty);
1238             }
1239             set
1240             {
1241                 SetValue(EnableShiftSelectionProperty, value);
1242                 NotifyPropertyChanged();
1243             }
1244         }
1245
1246         /// <summary>
1247         /// The text alignment to match the direction of the system language.
1248         /// </summary>
1249         /// <since_tizen> 6 </since_tizen>
1250         public bool MatchSystemLanguageDirection
1251         {
1252             get
1253             {
1254                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1255             }
1256             set
1257             {
1258                 SetValue(MatchSystemLanguageDirectionProperty, value);
1259                 NotifyPropertyChanged();
1260             }
1261         }
1262
1263         /// <summary>
1264         /// The MaxLength property.
1265         /// </summary>
1266         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1267         [EditorBrowsable(EditorBrowsableState.Never)]
1268         public int MaxLength
1269         {
1270             get
1271             {
1272                 return (int)GetValue(MaxLengthProperty);
1273             }
1274             set
1275             {
1276                 SetValue(MaxLengthProperty, value);
1277                 NotifyPropertyChanged();
1278             }
1279         }
1280
1281         /// Only used by the IL of xaml, will never changed to not hidden.
1282         [EditorBrowsable(EditorBrowsableState.Never)]
1283         public override bool IsCreateByXaml
1284         {
1285             get
1286             {
1287                 return base.IsCreateByXaml;
1288             }
1289             set
1290             {
1291                 base.IsCreateByXaml = value;
1292
1293                 if (value == true)
1294                 {
1295                     this.TextChanged += (obj, e) =>
1296                     {
1297                         this.Text = e.TextEditor.Text;
1298                     };
1299                 }
1300             }
1301         }
1302
1303         /// <summary>
1304         /// The FontSizeScale property. <br />
1305         /// The default value is 1.0. <br />
1306         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1307         /// </summary>
1308         /// <since_tizen> 9 </since_tizen>
1309         public float FontSizeScale
1310         {
1311             get
1312             {
1313                 return fontSizeScale;
1314             }
1315             set
1316             {
1317                 float newFontSizeScale;
1318
1319                 if (fontSizeScale == value) return;
1320
1321                 fontSizeScale = value;
1322                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1323                 {
1324                     SystemSettingsFontSize systemSettingsFontSize;
1325
1326                     try
1327                     {
1328                         systemSettingsFontSize = SystemSettings.FontSize;
1329                     }
1330                     catch (Exception e)
1331                     {
1332                         Console.WriteLine("{0} Exception caught.", e);
1333                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
1334                     }
1335                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1336                     addFontSizeChangedCallback();
1337                 }
1338                 else
1339                 {
1340                     newFontSizeScale = fontSizeScale;
1341                     removeFontSizeChangedCallback();
1342                 }
1343
1344                 SetValue(FontSizeScaleProperty, newFontSizeScale);
1345                 NotifyPropertyChanged();
1346             }
1347         }
1348
1349         /// <summary>
1350         /// The InputMethodSettings property.
1351         /// </summary>
1352         [EditorBrowsable(EditorBrowsableState.Never)]
1353         public PropertyMap InputMethodSettings
1354         {
1355             get
1356             {
1357                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
1358             }
1359             set
1360             {
1361                 SetValue(InputMethodSettingsProperty, value);
1362                 NotifyPropertyChanged();
1363             }
1364         }
1365
1366         /// <summary>
1367         /// Scroll the text control by specific amount..
1368         /// </summary>
1369         /// <param name="scroll">The amount (in pixels) of scrolling in horizontal &amp; vertical directions.</param>
1370         [EditorBrowsable(EditorBrowsableState.Never)]
1371         public void ScrollBy(Vector2 scroll)
1372         {
1373             Interop.TextEditor.ScrollBy(SwigCPtr, Vector2.getCPtr(scroll));
1374             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1375         }
1376
1377         /// <summary>
1378         /// Get the InputMethodContext instance.
1379         /// </summary>
1380         /// <returns>The InputMethodContext instance.</returns>
1381         /// <since_tizen> 5 </since_tizen>
1382         public InputMethodContext GetInputMethodContext()
1383         {
1384             if (inputMethodContext == null)
1385             {
1386                 /*Avoid raising InputMethodContext reference count.*/
1387                 inputMethodContext = new InputMethodContext(Interop.TextEditor.GetInputMethodContext(SwigCPtr), true);
1388                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1389             }
1390             return inputMethodContext;
1391         }
1392
1393         /// <summary>
1394         /// Select the whole text.
1395         /// </summary>
1396         [EditorBrowsable(EditorBrowsableState.Never)]
1397         public void SelectWholeText()
1398         {
1399             Interop.TextEditor.SelectWholeText(SwigCPtr);
1400             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1401         }
1402
1403         /// <summary>
1404         /// Clear selection of the text.
1405         /// </summary>
1406         [EditorBrowsable(EditorBrowsableState.Never)]
1407         public void SelectNone()
1408         {
1409             _ = Interop.TextEditor.SelectNone(SwigCPtr);
1410             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1411         }
1412
1413         /// <summary>
1414         /// Enable grab handle property.
1415         /// </summary>
1416         [EditorBrowsable(EditorBrowsableState.Never)]
1417         public bool EnableGrabHandle
1418         {
1419             get
1420             {
1421                 return (bool)GetValue(EnableGrabHandleProperty);
1422             }
1423             set
1424             {
1425                 SetValue(EnableGrabHandleProperty, value);
1426                 NotifyPropertyChanged();
1427             }
1428         }
1429
1430         /// <summary>
1431         /// Enable grab handle popup property.
1432         /// </summary>
1433         [EditorBrowsable(EditorBrowsableState.Never)]
1434         public bool EnableGrabHandlePopup
1435         {
1436             get
1437             {
1438                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1439             }
1440             set
1441             {
1442                 SetValue(EnableGrabHandlePopupProperty, value);
1443                 NotifyPropertyChanged();
1444             }
1445         }
1446
1447         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
1448         {
1449             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1450         }
1451
1452         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
1453         {
1454             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));
1455             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1456             return ret;
1457         }
1458
1459         /// <summary>
1460         /// Dispose.
1461         /// </summary>
1462         /// <since_tizen> 3 </since_tizen>
1463         protected override void Dispose(DisposeTypes type)
1464         {
1465             if (disposed)
1466             {
1467                 return;
1468             }
1469
1470             if (systemlangTextFlag)
1471             {
1472                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1473             }
1474
1475             removeFontSizeChangedCallback();
1476
1477             //Release your own unmanaged resources here.
1478             //You should not access any managed member here except static instance.
1479             //because the execution order of Finalizes is non-deterministic.
1480
1481             if (this.HasBody())
1482             {
1483                 if (textEditorTextChangedCallbackDelegate != null)
1484                 {
1485                     TextChangedSignal().Disconnect(textEditorTextChangedCallbackDelegate);
1486                 }
1487
1488                 if (textEditorMaxLengthReachedCallbackDelegate != null)
1489                 {
1490                     this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
1491                 }
1492             }
1493
1494             base.Dispose(type);
1495         }
1496
1497         /// This will not be public opened.
1498         [EditorBrowsable(EditorBrowsableState.Never)]
1499         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1500         {
1501             // In order to speed up IME hide, temporarily add
1502             GetInputMethodContext()?.DestroyContext();
1503             Interop.TextEditor.DeleteTextEditor(swigCPtr);
1504         }
1505
1506         private string SetTranslatable(string textEditorSid)
1507         {
1508             string translatableText = null;
1509             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1510             if (translatableText != null)
1511             {
1512                 if (systemlangTextFlag == false)
1513                 {
1514                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1515                     systemlangTextFlag = true;
1516                 }
1517                 return translatableText;
1518             }
1519             else
1520             {
1521                 translatableText = "";
1522                 return translatableText;
1523             }
1524         }
1525
1526         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1527         {
1528             if (textEditorTextSid != null)
1529             {
1530                 Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1531             }
1532             if (textEditorPlaceHolderTextSid != null)
1533             {
1534                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1535             }
1536         }
1537
1538         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
1539         {
1540             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
1541             SetValue(FontSizeScaleProperty, newFontSizeScale);
1542             NotifyPropertyChanged();
1543         }
1544
1545         private void addFontSizeChangedCallback()
1546         {
1547             if (hasFontSizeChangedCallback != true)
1548             {
1549                 try
1550                 {
1551                     SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
1552                     hasFontSizeChangedCallback = true;
1553                 }
1554                 catch (Exception e)
1555                 {
1556                     Console.WriteLine("{0} Exception caught.", e);
1557                     hasFontSizeChangedCallback = false;
1558                 }
1559             }
1560         }
1561
1562         private void removeFontSizeChangedCallback()
1563         {
1564             if (hasFontSizeChangedCallback == true)
1565             {
1566                 try
1567                 {
1568                     SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
1569                     hasFontSizeChangedCallback = false;
1570                 }
1571                 catch (Exception e)
1572                 {
1573                     Console.WriteLine("{0} Exception caught.", e);
1574                     hasFontSizeChangedCallback = true;
1575                 }
1576             }
1577         }
1578
1579         internal new class Property
1580         {
1581             internal static readonly int TEXT = Interop.TextEditor.TextGet();
1582             internal static readonly int TextColor = Interop.TextEditor.TextColorGet();
1583             internal static readonly int FontFamily = Interop.TextEditor.FontFamilyGet();
1584             internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
1585             internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
1586             internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
1587             internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
1588             internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
1589             internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
1590             internal static readonly int SecondaryCursorColor = Interop.TextEditor.SecondaryCursorColorGet();
1591             internal static readonly int EnableCursorBlink = Interop.TextEditor.EnableCursorBlinkGet();
1592             internal static readonly int CursorBlinkInterval = Interop.TextEditor.CursorBlinkIntervalGet();
1593             internal static readonly int CursorBlinkDuration = Interop.TextEditor.CursorBlinkDurationGet();
1594             internal static readonly int CursorWidth = Interop.TextEditor.CursorWidthGet();
1595             internal static readonly int GrabHandleImage = Interop.TextEditor.GrabHandleImageGet();
1596             internal static readonly int GrabHandlePressedImage = Interop.TextEditor.GrabHandlePressedImageGet();
1597             internal static readonly int SelectionHandleImageLeft = Interop.TextEditor.SelectionHandleImageLeftGet();
1598             internal static readonly int SelectionHandleImageRight = Interop.TextEditor.SelectionHandleImageRightGet();
1599             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextEditor.SelectionHandlePressedImageLeftGet();
1600             internal static readonly int SelectionHandlePressedImageRight = Interop.TextEditor.SelectionHandlePressedImageRightGet();
1601             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextEditor.SelectionHandleMarkerImageLeftGet();
1602             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextEditor.SelectionHandleMarkerImageRightGet();
1603             internal static readonly int SelectionHighlightColor = Interop.TextEditor.SelectionHighlightColorGet();
1604             internal static readonly int DecorationBoundingBox = Interop.TextEditor.DecorationBoundingBoxGet();
1605             internal static readonly int EnableMarkup = Interop.TextEditor.EnableMarkupGet();
1606             internal static readonly int InputColor = Interop.TextEditor.InputColorGet();
1607             internal static readonly int InputFontFamily = Interop.TextEditor.InputFontFamilyGet();
1608             internal static readonly int InputFontStyle = Interop.TextEditor.InputFontStyleGet();
1609             internal static readonly int InputPointSize = Interop.TextEditor.InputPointSizeGet();
1610             internal static readonly int LineSpacing = Interop.TextEditor.LineSpacingGet();
1611             internal static readonly int InputLineSpacing = Interop.TextEditor.InputLineSpacingGet();
1612             internal static readonly int UNDERLINE = Interop.TextEditor.UnderlineGet();
1613             internal static readonly int InputUnderline = Interop.TextEditor.InputUnderlineGet();
1614             internal static readonly int SHADOW = Interop.TextEditor.ShadowGet();
1615             internal static readonly int InputShadow = Interop.TextEditor.InputShadowGet();
1616             internal static readonly int EMBOSS = Interop.TextEditor.EmbossGet();
1617             internal static readonly int InputEmboss = Interop.TextEditor.InputEmbossGet();
1618             internal static readonly int OUTLINE = Interop.TextEditor.OutlineGet();
1619             internal static readonly int InputOutline = Interop.TextEditor.InputOutlineGet();
1620             internal static readonly int SmoothScroll = Interop.TextEditor.SmoothScrollGet();
1621             internal static readonly int SmoothScrollDuration = Interop.TextEditor.SmoothScrollDurationGet();
1622             internal static readonly int EnableScrollBar = Interop.TextEditor.EnableScrollBarGet();
1623             internal static readonly int ScrollBarShowDuration = Interop.TextEditor.ScrollBarShowDurationGet();
1624             internal static readonly int ScrollBarFadeDuration = Interop.TextEditor.ScrollBarFadeDurationGet();
1625             internal static readonly int PixelSize = Interop.TextEditor.PixelSizeGet();
1626             internal static readonly int LineCount = Interop.TextEditor.LineCountGet();
1627             internal static readonly int EnableSelection = Interop.TextEditor.EnableSelectionGet();
1628             internal static readonly int PLACEHOLDER = Interop.TextEditor.PlaceholderGet();
1629             internal static readonly int LineWrapMode = Interop.TextEditor.LineWrapModeGet();
1630             internal static readonly int PlaceholderText = Interop.TextEditor.PlaceholderTextGet();
1631             internal static readonly int PlaceholderTextColor = Interop.TextEditor.PlaceholderTextColorGet();
1632             internal static readonly int EnableShiftSelection = Interop.TextEditor.EnableShiftSelectionGet();
1633             internal static readonly int MatchSystemLanguageDirection = Interop.TextEditor.MatchSystemLanguageDirectionGet();
1634             internal static readonly int MaxLength = Interop.TextEditor.MaxLengthGet();
1635             internal static readonly int SelectedTextStart = Interop.TextEditor.SelectedTextStartGet();
1636             internal static readonly int SelectedTextEnd = Interop.TextEditor.SelectedTextEndGet();
1637             internal static readonly int EnableEditing = Interop.TextEditor.EnableEditingGet();
1638             internal static readonly int SelectedText = Interop.TextEditor.SelectedTextGet();
1639             internal static readonly int HorizontalScrollPosition = Interop.TextEditor.HorizontalScrollPositionGet();
1640             internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
1641             internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
1642             internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
1643             internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
1644             internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
1645             internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
1646             internal static readonly int InputMethodSettings = Interop.TextEditor.InputMethodSettingsGet();
1647         }
1648
1649         internal class InputStyle
1650         {
1651             internal enum Mask
1652             {
1653                 None = 0x0000,
1654                 Color = 0x0001,
1655                 FontFamily = 0x0002,
1656                 PointSize = 0x0004,
1657                 FontStyle = 0x0008,
1658                 LineSpacing = 0x0010,
1659                 Underline = 0x0020,
1660                 Shadow = 0x0040,
1661                 Emboss = 0x0080,
1662                 Outline = 0x0100
1663             }
1664         }
1665
1666         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
1667         {
1668             DecorationBoundingBox = new Rectangle(x, y, width, height);
1669         }
1670         private void OnInputColorChanged(float x, float y, float z, float w)
1671         {
1672             InputColor = new Vector4(x, y, z, w);
1673         }
1674         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
1675         {
1676             PlaceholderTextColor = new Color(r, g, b, a);
1677         }
1678         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
1679         {
1680             PrimaryCursorColor = new Vector4(x, y, z, w);
1681         }
1682         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
1683         {
1684             SecondaryCursorColor = new Vector4(x, y, z, w);
1685         }
1686         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
1687         {
1688             SelectionHighlightColor = new Vector4(x, y, z, w);
1689         }
1690         private void OnTextColorChanged(float x, float y, float z, float w)
1691         {
1692             TextColor = new Vector4(x, y, z, w);
1693         }
1694         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
1695         {
1696             GrabHandleColor = new Color(r, g, b, a);
1697         }
1698     }
1699 }