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