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