[NUI] Refactoring Theme and StyleManager (#1981)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextField.cs
1 /*
2  * Copyright(c) 2019 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 extern alias TizenSystemSettings;
18 using TizenSystemSettings.Tizen.System;
19
20 using System;
21 using System.Globalization;
22 using System.ComponentModel;
23 using Tizen.NUI.Binding;
24
25 namespace Tizen.NUI.BaseComponents
26 {
27     /// <summary>
28     /// A control which provides a single line editable text field.
29     /// </summary>
30     /// <since_tizen> 3 </since_tizen>
31     public partial class TextField : View
32     {
33         private string textFieldTextSid = null;
34         private string textFieldPlaceHolderTextSid = null;
35         private bool systemlangTextFlag = false;
36         private InputMethodContext inputMethodCotext = null;
37         private TextFieldSelectorData selectorData;
38
39         static TextField() { }
40
41         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
42         [EditorBrowsable(EditorBrowsableState.Never)]
43         public TextFieldStyle Style => new TextFieldStyle(this);
44
45         /// <summary>
46         /// Creates the TextField control.
47         /// </summary>
48         /// <since_tizen> 3 </since_tizen>
49         public TextField() : this(Interop.TextField.TextField_New(), true)
50         {
51             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52         }
53
54         /// <summary>
55         /// Creates the TextField with setting the status of shown or hidden.
56         /// </summary>
57         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
58         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
59         [EditorBrowsable(EditorBrowsableState.Never)]
60         public TextField(bool shown) : this(Interop.TextField.TextField_New(), true)
61         {
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63             SetVisible(shown);
64         }
65
66         /// <summary>
67         /// Get attribues, it is abstract function and must be override.
68         /// </summary>
69         /// <since_tizen> 6 </since_tizen>
70         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
71         [EditorBrowsable(EditorBrowsableState.Never)]
72         protected override ViewStyle GetViewStyle()
73         {
74             return new TextFieldStyle();
75         }
76
77         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn, viewStyle)
78         {
79             if (!shown)
80             {
81                 SetVisible(false);
82             }
83         }
84
85         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn)
86         {
87             ApplyStyle(ThemeManager.GetStyle(nameof(TextField)));
88
89             if (!shown)
90             {
91                 SetVisible(false);
92             }
93         }
94
95         internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
96         {
97             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98
99             if (!shown)
100             {
101                 SetVisible(false);
102             }
103         }
104
105         internal enum ExceedPolicyType
106         {
107             ExceedPolicyOriginal,
108             ExceedPolicyClip
109         }
110
111         /// <summary>
112         /// The TranslatableText property.<br />
113         /// The text can set the SID value.<br />
114         /// </summary>
115         /// <exception cref='ArgumentNullException'>
116         /// ResourceManager about multilingual is null.
117         /// </exception>
118         /// <since_tizen> 4 </since_tizen>
119         public string TranslatableText
120         {
121             get
122             {
123                 return (string)GetValue(TranslatableTextProperty);
124             }
125             set
126             {
127                 selectorData?.TranslatableText.UpdateIfNeeds(this, value);
128                 SetValue(TranslatableTextProperty, value);
129             }
130         }
131         private string translatableText
132         {
133             get
134             {
135                 return textFieldTextSid;
136             }
137             set
138             {
139                 if (NUIApplication.MultilingualResourceManager == null)
140                 {
141                     throw new ArgumentNullException("ResourceManager about multilingual is null");
142                 }
143                 textFieldTextSid = value;
144                 Text = SetTranslatable(textFieldTextSid);
145                 NotifyPropertyChanged();
146             }
147         }
148
149         /// <summary>
150         /// The TranslatablePlaceholderText property.<br />
151         /// The text can set the SID value.<br />
152         /// </summary>
153         /// <exception cref='ArgumentNullException'>
154         /// ResourceManager about multilingual is null.
155         /// </exception>
156         /// <since_tizen> 4 </since_tizen>
157         public string TranslatablePlaceholderText
158         {
159             get
160             {
161                 return (string)GetValue(TranslatablePlaceholderTextProperty);
162             }
163             set
164             {
165                 SetValue(TranslatablePlaceholderTextProperty, value);
166                 selectorData?.TranslatablePlaceholderText.UpdateIfNeeds(this, value);
167             }
168         }
169         private string translatablePlaceholderText
170         {
171             get
172             {
173                 return textFieldPlaceHolderTextSid;
174             }
175             set
176             {
177                 if (NUIApplication.MultilingualResourceManager == null)
178                 {
179                     throw new ArgumentNullException("ResourceManager about multilingual is null");
180                 }
181                 textFieldPlaceHolderTextSid = value;
182                 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
183                 NotifyPropertyChanged();
184             }
185         }
186
187         /// <summary>
188         /// The Text property.
189         /// </summary>
190         /// <since_tizen> 3 </since_tizen>
191         public string Text
192         {
193             get
194             {
195                 return (string)GetValue(TextProperty);
196             }
197             set
198             {
199                 SetValueAndForceSendChangeSignal(TextProperty, value);
200                 selectorData?.Text.UpdateIfNeeds(this, value);
201                 NotifyPropertyChanged();
202             }
203         }
204
205         /// <summary>
206         /// The PlaceholderText property.
207         /// </summary>
208         /// <since_tizen> 3 </since_tizen>
209         public string PlaceholderText
210         {
211             get
212             {
213                 return (string)GetValue(PlaceholderTextProperty);
214             }
215             set
216             {
217                 SetValue(PlaceholderTextProperty, value);
218                 NotifyPropertyChanged();
219             }
220         }
221
222         /// <summary>
223         /// The PlaceholderTextFocused property.
224         /// </summary>
225         /// <since_tizen> 3 </since_tizen>
226         public string PlaceholderTextFocused
227         {
228             get
229             {
230                 return (string)GetValue(PlaceholderTextFocusedProperty);
231             }
232             set
233             {
234                 SetValue(PlaceholderTextFocusedProperty, value);
235                 NotifyPropertyChanged();
236             }
237         }
238
239         /// <summary>
240         /// The FontFamily property.
241         /// </summary>
242         /// <since_tizen> 3 </since_tizen>
243         public string FontFamily
244         {
245             get
246             {
247                 return (string)GetValue(FontFamilyProperty);
248             }
249             set
250             {
251                 SetValue(FontFamilyProperty, value);
252                 selectorData?.FontFamily.UpdateIfNeeds(this, value);
253                 NotifyPropertyChanged();
254             }
255         }
256
257         /// <summary>
258         /// The FontStyle property.
259         /// </summary>
260         /// <since_tizen> 3 </since_tizen>
261         public PropertyMap FontStyle
262         {
263             get
264             {
265                 return (PropertyMap)GetValue(FontStyleProperty);
266             }
267             set
268             {
269                 SetValue(FontStyleProperty, value);
270                 NotifyPropertyChanged();
271             }
272         }
273
274         /// <summary>
275         /// The PointSize property.
276         /// </summary>
277         /// <since_tizen> 3 </since_tizen>
278         public float PointSize
279         {
280             get
281             {
282                 return (float)GetValue(PointSizeProperty);
283             }
284             set
285             {
286                 SetValue(PointSizeProperty, value);
287                 selectorData?.PointSize.UpdateIfNeeds(this, value);
288                 NotifyPropertyChanged();
289             }
290         }
291
292         /// <summary>
293         /// The MaxLength property.
294         /// </summary>
295         /// <since_tizen> 3 </since_tizen>
296         public int MaxLength
297         {
298             get
299             {
300                 return (int)GetValue(MaxLengthProperty);
301             }
302             set
303             {
304                 SetValue(MaxLengthProperty, value);
305                 NotifyPropertyChanged();
306             }
307         }
308
309         /// <summary>
310         /// The ExceedPolicy property.
311         /// </summary>
312         /// <since_tizen> 3 </since_tizen>
313         public int ExceedPolicy
314         {
315             get
316             {
317                 return (int)GetValue(ExceedPolicyProperty);
318             }
319             set
320             {
321                 SetValue(ExceedPolicyProperty, value);
322                 NotifyPropertyChanged();
323             }
324         }
325
326         /// <summary>
327         /// The HorizontalAlignment property.
328         /// </summary>
329         /// <since_tizen> 3 </since_tizen>
330         public HorizontalAlignment HorizontalAlignment
331         {
332             get
333             {
334                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
335             }
336             set
337             {
338                 SetValue(HorizontalAlignmentProperty, value);
339                 NotifyPropertyChanged();
340             }
341         }
342
343         /// <summary>
344         /// The VerticalAlignment property.
345         /// </summary>
346         /// <since_tizen> 3 </since_tizen>
347         public VerticalAlignment VerticalAlignment
348         {
349             get
350             {
351                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
352             }
353             set
354             {
355                 SetValue(VerticalAlignmentProperty, value);
356                 NotifyPropertyChanged();
357                 NotifyPropertyChanged();
358             }
359         }
360
361         /// <summary>
362         /// The TextColor property.
363         /// </summary>
364         /// <remarks>
365         /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
366         /// </remarks>
367         /// <since_tizen> 3 </since_tizen>
368         public Color TextColor
369         {
370             get
371             {
372                 Color temp = (Color)GetValue(TextColorProperty);
373                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
374             }
375             set
376             {
377                 SetValue(TextColorProperty, value);
378                 selectorData?.TextColor.UpdateIfNeeds(this, value);
379                 NotifyPropertyChanged();
380             }
381         }
382
383         /// <summary>
384         /// The PlaceholderTextColor property.
385         /// </summary>
386         /// <remarks>
387         /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
388         /// </remarks>
389         /// <since_tizen> 3 </since_tizen>
390         public Vector4 PlaceholderTextColor
391         {
392             get
393             {
394                 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
395                 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
396             }
397             set
398             {
399                 SetValue(PlaceholderTextColorProperty, value);
400                 selectorData?.PlaceholderTextColor.UpdateIfNeeds(this, value);
401                 NotifyPropertyChanged();
402             }
403         }
404
405         /// <summary>
406         /// The ShadowOffset property.
407         /// </summary>
408         /// <since_tizen> 3 </since_tizen>
409         /// <remarks>
410         /// Deprecated.(API Level 6) Use Shadow instead.
411         /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
412         /// </remarks>
413         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
414         public Vector2 ShadowOffset
415         {
416             get
417             {
418                 PropertyMap map = new PropertyMap();
419                 GetProperty(TextField.Property.SHADOW).Get(map);
420                 Vector2 shadowOffset = new Vector2();
421                 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
422                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
423             }
424             set
425             {
426                 PropertyMap temp = new PropertyMap();
427                 temp.Insert("offset", new PropertyValue(value));
428                 SetValue(ShadowProperty, temp);
429                 NotifyPropertyChanged();
430             }
431         }
432
433         /// <summary>
434         /// The ShadowColor property.
435         /// </summary>
436         /// <since_tizen> 3 </since_tizen>
437         /// <remarks>
438         /// Deprecated.(API Level 6) Use Shadow instead.
439         /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
440         /// </remarks>
441         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
442         public Vector4 ShadowColor
443         {
444             get
445             {
446                 PropertyMap map = new PropertyMap();
447                 GetProperty(TextField.Property.SHADOW).Get(map);
448                 Vector4 shadowColor = new Vector4();
449                 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
450                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
451             }
452             set
453             {
454                 PropertyMap temp = new PropertyMap();
455                 temp.Insert("color", new PropertyValue(value));
456                 SetValue(ShadowProperty, temp);
457                 NotifyPropertyChanged();
458             }
459         }
460
461         /// <summary>
462         /// The PrimaryCursorColor property.
463         /// </summary>
464         /// <remarks>
465         /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
466         /// </remarks>
467         /// <since_tizen> 3 </since_tizen>
468         public Vector4 PrimaryCursorColor
469         {
470             get
471             {
472                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
473                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
474             }
475             set
476             {
477                 SetValue(PrimaryCursorColorProperty, value);
478                 selectorData?.PrimaryCursorColor.UpdateIfNeeds(this, value);
479                 NotifyPropertyChanged();
480             }
481         }
482
483         /// <summary>
484         /// The SecondaryCursorColor property.
485         /// </summary>
486         /// <remarks>
487         /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
488         /// </remarks>
489         /// <since_tizen> 3 </since_tizen>
490         public Vector4 SecondaryCursorColor
491         {
492             get
493             {
494                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
495                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
496             }
497             set
498             {
499                 SetValue(SecondaryCursorColorProperty, value);
500                 NotifyPropertyChanged();
501             }
502         }
503
504         /// <summary>
505         /// The EnableCursorBlink property.
506         /// </summary>
507         /// <since_tizen> 3 </since_tizen>
508         public bool EnableCursorBlink
509         {
510             get
511             {
512                 return (bool)GetValue(EnableCursorBlinkProperty);
513             }
514             set
515             {
516                 SetValue(EnableCursorBlinkProperty, value);
517                 NotifyPropertyChanged();
518             }
519         }
520
521         /// <summary>
522         /// The CursorBlinkInterval property.
523         /// </summary>
524         /// <since_tizen> 3 </since_tizen>
525         public float CursorBlinkInterval
526         {
527             get
528             {
529                 return (float)GetValue(CursorBlinkIntervalProperty);
530             }
531             set
532             {
533                 SetValue(CursorBlinkIntervalProperty, value);
534                 NotifyPropertyChanged();
535             }
536         }
537
538         /// <summary>
539         /// The CursorBlinkDuration property.
540         /// </summary>
541         /// <since_tizen> 3 </since_tizen>
542         public float CursorBlinkDuration
543         {
544             get
545             {
546                 return (float)GetValue(CursorBlinkDurationProperty);
547             }
548             set
549             {
550                 SetValue(CursorBlinkDurationProperty, value);
551                 NotifyPropertyChanged();
552             }
553         }
554
555         /// <summary>
556         /// The CursorWidth property.
557         /// </summary>
558         /// <since_tizen> 3 </since_tizen>
559         public int CursorWidth
560         {
561             get
562             {
563                 return (int)GetValue(CursorWidthProperty);
564             }
565             set
566             {
567                 SetValue(CursorWidthProperty, value);
568                 NotifyPropertyChanged();
569             }
570         }
571
572         /// <summary>
573         /// The GrabHandleImage property.
574         /// </summary>
575         /// <since_tizen> 3 </since_tizen>
576         public string GrabHandleImage
577         {
578             get
579             {
580                 return (string)GetValue(GrabHandleImageProperty);
581             }
582             set
583             {
584                 SetValue(GrabHandleImageProperty, value);
585                 NotifyPropertyChanged();
586             }
587         }
588
589         /// <summary>
590         /// The GrabHandlePressedImage property.
591         /// </summary>
592         /// <since_tizen> 3 </since_tizen>
593         public string GrabHandlePressedImage
594         {
595             get
596             {
597                 return (string)GetValue(GrabHandlePressedImageProperty);
598             }
599             set
600             {
601                 SetValue(GrabHandlePressedImageProperty, value);
602                 NotifyPropertyChanged();
603             }
604         }
605
606         /// <summary>
607         /// The ScrollThreshold property.
608         /// </summary>
609         /// <since_tizen> 3 </since_tizen>
610         public float ScrollThreshold
611         {
612             get
613             {
614                 return (float)GetValue(ScrollThresholdProperty);
615             }
616             set
617             {
618                 SetValue(ScrollThresholdProperty, value);
619                 NotifyPropertyChanged();
620             }
621         }
622
623         /// <summary>
624         /// The ScrollSpeed property.
625         /// </summary>
626         /// <since_tizen> 3 </since_tizen>
627         public float ScrollSpeed
628         {
629             get
630             {
631                 return (float)GetValue(ScrollSpeedProperty);
632             }
633             set
634             {
635                 SetValue(ScrollSpeedProperty, value);
636                 NotifyPropertyChanged();
637             }
638         }
639
640         /// <summary>
641         /// The SelectionHandleImageLeft property.
642         /// </summary>
643         /// <since_tizen> 3 </since_tizen>
644         public PropertyMap SelectionHandleImageLeft
645         {
646             get
647             {
648                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
649             }
650             set
651             {
652                 SetValue(SelectionHandleImageLeftProperty, value);
653                 NotifyPropertyChanged();
654             }
655         }
656
657         /// <summary>
658         /// The SelectionHandleImageRight property.
659         /// </summary>
660         /// <since_tizen> 3 </since_tizen>
661         public PropertyMap SelectionHandleImageRight
662         {
663             get
664             {
665                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
666             }
667             set
668             {
669                 SetValue(SelectionHandleImageRightProperty, value);
670                 NotifyPropertyChanged();
671             }
672         }
673
674         /// <summary>
675         /// The SelectionHandlePressedImageLeft property.
676         /// </summary>
677         /// <since_tizen> 3 </since_tizen>
678         public PropertyMap SelectionHandlePressedImageLeft
679         {
680             get
681             {
682                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
683             }
684             set
685             {
686                 SetValue(SelectionHandlePressedImageLeftProperty, value);
687                 NotifyPropertyChanged();
688             }
689         }
690
691         /// <summary>
692         /// The SelectionHandlePressedImageRight property.
693         /// </summary>
694         /// <since_tizen> 3 </since_tizen>
695         public PropertyMap SelectionHandlePressedImageRight
696         {
697             get
698             {
699                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
700             }
701             set
702             {
703                 SetValue(SelectionHandlePressedImageRightProperty, value);
704                 NotifyPropertyChanged();
705             }
706         }
707
708         /// <summary>
709         /// The SelectionHandleMarkerImageLeft property.
710         /// </summary>
711         /// <since_tizen> 3 </since_tizen>
712         public PropertyMap SelectionHandleMarkerImageLeft
713         {
714             get
715             {
716                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
717             }
718             set
719             {
720                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
721                 NotifyPropertyChanged();
722             }
723         }
724
725         /// <summary>
726         /// The SelectionHandleMarkerImageRight property.
727         /// </summary>
728         /// <since_tizen> 3 </since_tizen>
729         public PropertyMap SelectionHandleMarkerImageRight
730         {
731             get
732             {
733                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
734             }
735             set
736             {
737                 SetValue(SelectionHandleMarkerImageRightProperty, value);
738                 NotifyPropertyChanged();
739             }
740         }
741
742         /// <summary>
743         /// The SelectionHighlightColor property.
744         /// </summary>
745         /// <remarks>
746         /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
747         /// </remarks>
748         /// <since_tizen> 3 </since_tizen>
749         public Vector4 SelectionHighlightColor
750         {
751             get
752             {
753                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
754                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
755             }
756             set
757             {
758                 SetValue(SelectionHighlightColorProperty, value);
759                 NotifyPropertyChanged();
760             }
761         }
762
763         /// <summary>
764         /// The DecorationBoundingBox property.
765         /// </summary>
766         /// <remarks>
767         /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
768         /// </remarks>
769         /// <since_tizen> 3 </since_tizen>
770         public Rectangle DecorationBoundingBox
771         {
772             get
773             {
774                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
775                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
776             }
777             set
778             {
779                 SetValue(DecorationBoundingBoxProperty, value);
780                 NotifyPropertyChanged();
781             }
782         }
783
784         /// <summary>
785         /// The InputMethodSettings property.
786         /// </summary>
787         /// <since_tizen> 3 </since_tizen>
788         public PropertyMap InputMethodSettings
789         {
790             get
791             {
792                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
793             }
794             set
795             {
796                 SetValue(InputMethodSettingsProperty, value);
797                 NotifyPropertyChanged();
798             }
799         }
800
801         /// <summary>
802         /// The InputColor property.
803         /// </summary>
804         /// <remarks>
805         /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
806         /// </remarks>
807         /// <since_tizen> 3 </since_tizen>
808         public Vector4 InputColor
809         {
810             get
811             {
812                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
813                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
814             }
815             set
816             {
817                 SetValue(InputColorProperty, value);
818                 NotifyPropertyChanged();
819             }
820         }
821
822         /// <summary>
823         /// The EnableMarkup property.
824         /// </summary>
825         /// <since_tizen> 3 </since_tizen>
826         public bool EnableMarkup
827         {
828             get
829             {
830                 return (bool)GetValue(EnableMarkupProperty);
831             }
832             set
833             {
834                 SetValue(EnableMarkupProperty, value);
835                 NotifyPropertyChanged();
836             }
837         }
838
839         /// <summary>
840         /// The InputFontFamily property.
841         /// </summary>
842         /// <since_tizen> 3 </since_tizen>
843         public string InputFontFamily
844         {
845             get
846             {
847                 return (string)GetValue(InputFontFamilyProperty);
848             }
849             set
850             {
851                 SetValue(InputFontFamilyProperty, value);
852                 NotifyPropertyChanged();
853             }
854         }
855
856         /// <summary>
857         /// The InputFontStyle property.
858         /// </summary>
859         /// <since_tizen> 3 </since_tizen>
860         public PropertyMap InputFontStyle
861         {
862             get
863             {
864                 return (PropertyMap)GetValue(InputFontStyleProperty);
865             }
866             set
867             {
868                 SetValue(InputFontStyleProperty, value);
869                 NotifyPropertyChanged();
870             }
871         }
872
873         /// <summary>
874         /// The InputPointSize property.
875         /// </summary>
876         /// <since_tizen> 3 </since_tizen>
877         public float InputPointSize
878         {
879             get
880             {
881                 return (float)GetValue(InputPointSizeProperty);
882             }
883             set
884             {
885                 SetValue(InputPointSizeProperty, value);
886                 NotifyPropertyChanged();
887             }
888         }
889
890         /// <summary>
891         /// The Underline property.
892         /// </summary>
893         /// <since_tizen> 3 </since_tizen>
894         public PropertyMap Underline
895         {
896             get
897             {
898                 return (PropertyMap)GetValue(UnderlineProperty);
899             }
900             set
901             {
902                 SetValue(UnderlineProperty, value);
903                 NotifyPropertyChanged();
904             }
905         }
906
907         /// <summary>
908         /// The InputUnderline property.
909         /// </summary>
910         /// <since_tizen> 3 </since_tizen>
911         public string InputUnderline
912         {
913             get
914             {
915                 return (string)GetValue(InputUnderlineProperty);
916             }
917             set
918             {
919                 SetValue(InputUnderlineProperty, value);
920                 NotifyPropertyChanged();
921             }
922         }
923
924         /// <summary>
925         /// The Shadow property.
926         /// </summary>
927         /// <since_tizen> 3 </since_tizen>
928         public PropertyMap Shadow
929         {
930             get
931             {
932                 return (PropertyMap)GetValue(ShadowProperty);
933             }
934             set
935             {
936                 SetValue(ShadowProperty, value);
937                 NotifyPropertyChanged();
938             }
939         }
940
941         /// <summary>
942         /// The InputShadow property.
943         /// </summary>
944         /// <since_tizen> 3 </since_tizen>
945         public string InputShadow
946         {
947             get
948             {
949                 return (string)GetValue(InputShadowProperty);
950             }
951             set
952             {
953                 SetValue(InputShadowProperty, value);
954                 NotifyPropertyChanged();
955             }
956         }
957
958         /// <summary>
959         /// The Emboss property.
960         /// </summary>
961         /// <since_tizen> 3 </since_tizen>
962         public string Emboss
963         {
964             get
965             {
966                 return (string)GetValue(EmbossProperty);
967             }
968             set
969             {
970                 SetValue(EmbossProperty, value);
971                 NotifyPropertyChanged();
972             }
973         }
974
975         /// <summary>
976         /// The InputEmboss property.
977         /// </summary>
978         /// <since_tizen> 3 </since_tizen>
979         public string InputEmboss
980         {
981             get
982             {
983                 return (string)GetValue(InputEmbossProperty);
984             }
985             set
986             {
987                 SetValue(InputEmbossProperty, value);
988                 NotifyPropertyChanged();
989             }
990         }
991
992         /// <summary>
993         /// The Outline property.
994         /// </summary>
995         /// <since_tizen> 3 </since_tizen>
996         public PropertyMap Outline
997         {
998             get
999             {
1000                 return (PropertyMap)GetValue(OutlineProperty);
1001             }
1002             set
1003             {
1004                 SetValue(OutlineProperty, value);
1005                 NotifyPropertyChanged();
1006             }
1007         }
1008
1009         /// <summary>
1010         /// The InputOutline property.
1011         /// </summary>
1012         /// <since_tizen> 3 </since_tizen>
1013         public string InputOutline
1014         {
1015             get
1016             {
1017                 return (string)GetValue(InputOutlineProperty);
1018             }
1019             set
1020             {
1021                 SetValue(InputOutlineProperty, value);
1022                 NotifyPropertyChanged();
1023             }
1024         }
1025
1026         /// <summary>
1027         /// The HiddenInputSettings property.
1028         /// </summary>
1029         /// <since_tizen> 3 </since_tizen>
1030         public Tizen.NUI.PropertyMap HiddenInputSettings
1031         {
1032             get
1033             {
1034                 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1035             }
1036             set
1037             {
1038                 SetValue(HiddenInputSettingsProperty, value);
1039                 NotifyPropertyChanged();
1040             }
1041         }
1042
1043         /// <summary>
1044         /// The PixelSize property.
1045         /// </summary>
1046         /// <since_tizen> 3 </since_tizen>
1047         public float PixelSize
1048         {
1049             get
1050             {
1051                 return (float)GetValue(PixelSizeProperty);
1052             }
1053             set
1054             {
1055                 SetValue(PixelSizeProperty, value);
1056                 NotifyPropertyChanged();
1057             }
1058         }
1059
1060         /// <summary>
1061         /// The Enable selection property.
1062         /// </summary>
1063         /// <since_tizen> 3 </since_tizen>
1064         public bool EnableSelection
1065         {
1066             get
1067             {
1068                 return (bool)GetValue(EnableSelectionProperty);
1069             }
1070             set
1071             {
1072                 SetValue(EnableSelectionProperty, value);
1073                 NotifyPropertyChanged();
1074             }
1075         }
1076
1077         /// <summary>
1078         /// The Enable selection property.
1079         /// </summary>
1080         /// <since_tizen> 6 </since_tizen>
1081         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1082         [EditorBrowsable(EditorBrowsableState.Never)]
1083         public bool EnableGrabHandle
1084         {
1085             get
1086             {
1087                 return (bool)GetValue(EnableGrabHandleProperty);
1088             }
1089             set
1090             {
1091                 SetValue(EnableGrabHandleProperty, value);
1092                 NotifyPropertyChanged();
1093             }
1094         }
1095
1096         /// <summary>
1097         /// The Enable selection property.
1098         /// </summary>
1099         /// <since_tizen> 6 </since_tizen>
1100         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1101         [EditorBrowsable(EditorBrowsableState.Never)]
1102         public bool EnableGrabHandlePopup
1103         {
1104             get
1105             {
1106                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1107             }
1108             set
1109             {
1110                 SetValue(EnableGrabHandlePopupProperty, value);
1111                 NotifyPropertyChanged();
1112             }
1113         }
1114
1115         /// <summary>
1116         /// The Selected Text property.
1117         /// </summary>
1118         /// <since_tizen> 8 </since_tizen>
1119         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1120         [EditorBrowsable(EditorBrowsableState.Never)]
1121         public string SelectedText
1122         {
1123             get
1124             {
1125                 string temp;
1126                 GetProperty(TextField.Property.SELECTED_TEXT).Get(out temp);
1127                 return temp;
1128             }
1129         }
1130
1131         /// <summary>
1132         /// The Placeholder property.
1133         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1134         /// </summary>
1135         /// <example>
1136         /// The following example demonstrates how to set the Placeholder property.
1137         /// <code>
1138         /// PropertyMap propertyMap = new PropertyMap();
1139         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1140         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1141         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1142         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1143         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1144         ///
1145         /// PropertyMap fontStyleMap = new PropertyMap();
1146         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1147         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1148         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1149         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1150         ///
1151         /// TextField field = new TextField();
1152         /// field.Placeholder = propertyMap;
1153         /// </code>
1154         /// </example>
1155         /// <since_tizen> 3 </since_tizen>
1156         public Tizen.NUI.PropertyMap Placeholder
1157         {
1158             get
1159             {
1160                 return (PropertyMap)GetValue(PlaceholderProperty);
1161             }
1162             set
1163             {
1164                 SetValue(PlaceholderProperty, value);
1165                 NotifyPropertyChanged();
1166             }
1167         }
1168
1169         /// <summary>
1170         /// The Ellipsis property.<br />
1171         /// Enable or disable the ellipsis.<br />
1172         /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1173         /// </summary>
1174         /// <since_tizen> 4 </since_tizen>
1175         public bool Ellipsis
1176         {
1177             get
1178             {
1179                 return (bool)GetValue(EllipsisProperty);
1180             }
1181             set
1182             {
1183                 SetValue(EllipsisProperty, value);
1184                 NotifyPropertyChanged();
1185             }
1186         }
1187
1188         /// <summary>
1189         /// Enables selection of the text using the Shift key.
1190         /// </summary>
1191         /// <since_tizen> 5 </since_tizen>
1192         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1193         [EditorBrowsable(EditorBrowsableState.Never)]
1194         public bool EnableShiftSelection
1195         {
1196             get
1197             {
1198                 return (bool)GetValue(EnableShiftSelectionProperty);
1199             }
1200             set
1201             {
1202                 SetValue(EnableShiftSelectionProperty, value);
1203                 NotifyPropertyChanged();
1204             }
1205         }
1206
1207         /// <summary>
1208         /// The text alignment to match the direction of the system language.
1209         /// </summary>
1210         /// <since_tizen> 6 </since_tizen>
1211         public bool MatchSystemLanguageDirection
1212         {
1213             get
1214             {
1215                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1216             }
1217             set
1218             {
1219                 SetValue(MatchSystemLanguageDirectionProperty, value);
1220                 NotifyPropertyChanged();
1221             }
1222         }
1223
1224         /// Only used by the IL of xaml, will never changed to not hidden.
1225         [EditorBrowsable(EditorBrowsableState.Never)]
1226         public override bool IsCreateByXaml
1227         {
1228             get
1229             {
1230                 return base.IsCreateByXaml;
1231             }
1232             set
1233             {
1234                 base.IsCreateByXaml = value;
1235
1236                 if (value == true)
1237                 {
1238                     this.TextChanged += (obj, e) =>
1239                     {
1240                         this.Text = this.Text;
1241                     };
1242                 }
1243             }
1244         }
1245
1246         private TextFieldSelectorData SelectorData
1247         {
1248             get
1249             {
1250                 if (selectorData == null)
1251                 {
1252                     selectorData = new TextFieldSelectorData();
1253                 }
1254                 return selectorData;
1255             }
1256         }
1257
1258         /// <summary>
1259         /// Get the InputMethodContext instance.
1260         /// </summary>
1261         /// <returns>The InputMethodContext instance.</returns>
1262         /// <since_tizen> 5 </since_tizen>
1263         public InputMethodContext GetInputMethodContext()
1264         {
1265             if (inputMethodCotext == null)
1266             {
1267                 /*Avoid raising InputMethodContext reference count.*/
1268                 inputMethodCotext = new InputMethodContext(Interop.TextField.TextField_GetInputMethodContext(swigCPtr), true);
1269                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1270             }
1271             return inputMethodCotext;
1272         }
1273
1274         /// <summary>
1275         /// Select the whole text.
1276         /// </summary>
1277         /// <since_tizen> 6 </since_tizen>
1278         /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
1279         [EditorBrowsable(EditorBrowsableState.Never)]
1280         public void SelectWholeText()
1281         {
1282             Interop.TextField.TextField_SelectWholeText(swigCPtr);
1283             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1284         }
1285
1286         /// <summary>
1287         /// Clear selection of the text.
1288         /// </summary>
1289         /// <since_tizen> 8 </since_tizen>
1290         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1291         [EditorBrowsable(EditorBrowsableState.Never)]
1292         public void SelectNone()
1293         {
1294             Interop.TextField.TextField_SelectNone(swigCPtr);
1295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296         }
1297
1298         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
1299         {
1300             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1301         }
1302
1303         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
1304         {
1305             SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(Interop.TextField.TextField_InputStyleChangedSignal(swigCPtr), false);
1306             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1307             return ret;
1308         }
1309
1310         /// <summary>
1311         /// Dispose.
1312         /// </summary>
1313         /// <since_tizen> 3 </since_tizen>
1314         protected override void Dispose(DisposeTypes type)
1315         {
1316             if (disposed)
1317             {
1318                 DisposeQueue.Instance.Add(this);
1319                 return;
1320             }
1321
1322             if (type == DisposeTypes.Explicit)
1323             {
1324                 //Called by User
1325                 //Release your own managed resources here.
1326                 //You should release all of your own disposable objects here.
1327                 selectorData?.Reset(this);
1328             }
1329
1330             //Release your own unmanaged resources here.
1331             //You should not access any managed member here except static instance.
1332             //because the execution order of Finalizes is non-deterministic.
1333             if (this.HasBody())
1334             {
1335                 if (_textFieldMaxLengthReachedCallbackDelegate != null)
1336                 {
1337                     this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
1338                 }
1339
1340                 if (_textFieldTextChangedCallbackDelegate != null)
1341                 {
1342                     TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
1343                 }
1344             }
1345
1346             base.Dispose(type);
1347         }
1348
1349         /// This will not be public opened.
1350         [EditorBrowsable(EditorBrowsableState.Never)]
1351         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1352         {
1353             // In order to speed up IME hide, temporarily add
1354             GetInputMethodContext()?.DestroyContext();
1355             Interop.TextField.delete_TextField(swigCPtr);
1356         }
1357
1358         private string SetTranslatable(string textFieldSid)
1359         {
1360             string translatableText = null;
1361             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1362             if (translatableText != null)
1363             {
1364                 if (systemlangTextFlag == false)
1365                 {
1366                     SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
1367                     systemlangTextFlag = true;
1368                 }
1369                 return translatableText;
1370             }
1371             else
1372             {
1373                 translatableText = "";
1374                 return translatableText;
1375             }
1376         }
1377
1378         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1379         {
1380             if (textFieldTextSid != null)
1381             {
1382                 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1383             }
1384             if (textFieldPlaceHolderTextSid != null)
1385             {
1386                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1387             }
1388         }
1389
1390         internal new class Property
1391         {
1392             internal static readonly int TEXT = Interop.TextField.TextField_Property_TEXT_get();
1393             internal static readonly int PLACEHOLDER_TEXT = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_get();
1394             internal static readonly int PLACEHOLDER_TEXT_FOCUSED = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
1395             internal static readonly int FONT_FAMILY = Interop.TextField.TextField_Property_FONT_FAMILY_get();
1396             internal static readonly int FONT_STYLE = Interop.TextField.TextField_Property_FONT_STYLE_get();
1397             internal static readonly int POINT_SIZE = Interop.TextField.TextField_Property_POINT_SIZE_get();
1398             internal static readonly int MAX_LENGTH = Interop.TextField.TextField_Property_MAX_LENGTH_get();
1399             internal static readonly int EXCEED_POLICY = Interop.TextField.TextField_Property_EXCEED_POLICY_get();
1400             internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextField.TextField_Property_HORIZONTAL_ALIGNMENT_get();
1401             internal static readonly int VERTICAL_ALIGNMENT = Interop.TextField.TextField_Property_VERTICAL_ALIGNMENT_get();
1402             internal static readonly int TEXT_COLOR = Interop.TextField.TextField_Property_TEXT_COLOR_get();
1403             internal static readonly int PLACEHOLDER_TEXT_COLOR = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
1404             internal static readonly int PRIMARY_CURSOR_COLOR = Interop.TextField.TextField_Property_PRIMARY_CURSOR_COLOR_get();
1405             internal static readonly int SECONDARY_CURSOR_COLOR = Interop.TextField.TextField_Property_SECONDARY_CURSOR_COLOR_get();
1406             internal static readonly int ENABLE_CURSOR_BLINK = Interop.TextField.TextField_Property_ENABLE_CURSOR_BLINK_get();
1407             internal static readonly int CURSOR_BLINK_INTERVAL = Interop.TextField.TextField_Property_CURSOR_BLINK_INTERVAL_get();
1408             internal static readonly int CURSOR_BLINK_DURATION = Interop.TextField.TextField_Property_CURSOR_BLINK_DURATION_get();
1409             internal static readonly int CURSOR_WIDTH = Interop.TextField.TextField_Property_CURSOR_WIDTH_get();
1410             internal static readonly int GRAB_HANDLE_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_IMAGE_get();
1411             internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
1412             internal static readonly int SCROLL_THRESHOLD = Interop.TextField.TextField_Property_SCROLL_THRESHOLD_get();
1413             internal static readonly int SCROLL_SPEED = Interop.TextField.TextField_Property_SCROLL_SPEED_get();
1414             internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
1415             internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
1416             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
1417             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
1418             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
1419             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
1420             internal static readonly int SELECTION_HIGHLIGHT_COLOR = Interop.TextField.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
1421             internal static readonly int DECORATION_BOUNDING_BOX = Interop.TextField.TextField_Property_DECORATION_BOUNDING_BOX_get();
1422             internal static readonly int INPUT_METHOD_SETTINGS = Interop.TextField.TextField_Property_INPUT_METHOD_SETTINGS_get();
1423             internal static readonly int INPUT_COLOR = Interop.TextField.TextField_Property_INPUT_COLOR_get();
1424             internal static readonly int ENABLE_MARKUP = Interop.TextField.TextField_Property_ENABLE_MARKUP_get();
1425             internal static readonly int INPUT_FONT_FAMILY = Interop.TextField.TextField_Property_INPUT_FONT_FAMILY_get();
1426             internal static readonly int INPUT_FONT_STYLE = Interop.TextField.TextField_Property_INPUT_FONT_STYLE_get();
1427             internal static readonly int INPUT_POINT_SIZE = Interop.TextField.TextField_Property_INPUT_POINT_SIZE_get();
1428             internal static readonly int UNDERLINE = Interop.TextField.TextField_Property_UNDERLINE_get();
1429             internal static readonly int INPUT_UNDERLINE = Interop.TextField.TextField_Property_INPUT_UNDERLINE_get();
1430             internal static readonly int SHADOW = Interop.TextField.TextField_Property_SHADOW_get();
1431             internal static readonly int INPUT_SHADOW = Interop.TextField.TextField_Property_INPUT_SHADOW_get();
1432             internal static readonly int EMBOSS = Interop.TextField.TextField_Property_EMBOSS_get();
1433             internal static readonly int INPUT_EMBOSS = Interop.TextField.TextField_Property_INPUT_EMBOSS_get();
1434             internal static readonly int OUTLINE = Interop.TextField.TextField_Property_OUTLINE_get();
1435             internal static readonly int INPUT_OUTLINE = Interop.TextField.TextField_Property_INPUT_OUTLINE_get();
1436             internal static readonly int HIDDEN_INPUT_SETTINGS = Interop.TextField.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
1437             internal static readonly int PIXEL_SIZE = Interop.TextField.TextField_Property_PIXEL_SIZE_get();
1438             internal static readonly int ENABLE_SELECTION = Interop.TextField.TextField_Property_ENABLE_SELECTION_get();
1439             internal static readonly int PLACEHOLDER = Interop.TextField.TextField_Property_PLACEHOLDER_get();
1440             internal static readonly int ELLIPSIS = Interop.TextField.TextField_Property_ELLIPSIS_get();
1441             internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextField.TextField_Property_ENABLE_SHIFT_SELECTION_get();
1442             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextField.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
1443             internal static readonly int ENABLE_GRAB_HANDLE = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_get();
1444             internal static readonly int ENABLE_GRAB_HANDLE_POPUP = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
1445             internal static readonly int SELECTED_TEXT = Interop.TextField.TextField_Property_SELECTED_TEXT_get();
1446         }
1447
1448         internal class InputStyle
1449         {
1450             internal enum Mask
1451             {
1452                 None = 0x0000,
1453                 Color = 0x0001,
1454                 FontFamily = 0x0002,
1455                 PointSize = 0x0004,
1456                 FontStyle = 0x0008,
1457                 Underline = 0x0010,
1458                 Shadow = 0x0020,
1459                 Emboss = 0x0040,
1460                 Outline = 0x0080
1461             }
1462         }
1463
1464         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
1465         {
1466             DecorationBoundingBox = new Rectangle(x, y, width, height);
1467         }
1468         private void OnInputColorChanged(float x, float y, float z, float w)
1469         {
1470             InputColor = new Vector4(x, y, z, w);
1471         }
1472         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
1473         {
1474             PlaceholderTextColor = new Vector4(r, g, b, a);
1475         }
1476         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
1477         {
1478             PrimaryCursorColor = new Vector4(x, y, z, w);
1479         }
1480         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
1481         {
1482             SecondaryCursorColor = new Vector4(x, y, z, w);
1483         }
1484         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
1485         {
1486             SelectionHighlightColor = new Vector4(x, y, z, w);
1487         }
1488         private void OnShadowColorChanged(float x, float y, float z, float w)
1489         {
1490             ShadowColor = new Vector4(x, y, z, w);
1491         }
1492         private void OnShadowOffsetChanged(float x, float y)
1493         {
1494             ShadowOffset = new Vector2(x, y);
1495         }
1496         private void OnTextColorChanged(float r, float g, float b, float a)
1497         {
1498             TextColor = new Color(r, g, b, a);
1499         }
1500     }
1501 }