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