Revert "[NUI] Add SelectionChanged Event (#3397)" (#3440)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextField.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 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 using Tizen.NUI.Text;
25
26 namespace Tizen.NUI.BaseComponents
27 {
28     /// <summary>
29     /// A control which provides a single line editable text field.
30     /// </summary>
31     /// <since_tizen> 3 </since_tizen>
32     public partial class TextField : View
33     {
34         private string textFieldTextSid = null;
35         private string textFieldPlaceHolderTextSid = null;
36         private string textFieldPlaceHolderTextFocusedSid = null;
37         private bool systemlangTextFlag = false;
38         private InputMethodContext inputMethodCotext = null;
39         private float fontSizeScale = 1.0f;
40         private bool hasFontSizeChangedCallback = false;
41
42         static TextField() { }
43
44         /// <summary>
45         /// Creates the TextField control.
46         /// </summary>
47         /// <since_tizen> 3 </since_tizen>
48         public TextField() : this(Interop.TextField.New(), true)
49         {
50             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51         }
52
53         /// <summary>
54         /// Creates the TextField with setting the status of shown or hidden.
55         /// </summary>
56         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
57         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         public TextField(bool shown) : this(Interop.TextField.New(), true)
60         {
61             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62             SetVisible(shown);
63         }
64
65         /// <summary>
66         /// Get attributes, it is abstract function and must be override.
67         /// </summary>
68         [EditorBrowsable(EditorBrowsableState.Never)]
69         protected override ViewStyle CreateViewStyle()
70         {
71             return new TextFieldStyle();
72         }
73
74         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle)
75         {
76             if (!shown)
77             {
78                 SetVisible(false);
79             }
80         }
81
82         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null)
83         {
84             if (!shown)
85             {
86                 SetVisible(false);
87             }
88         }
89
90         internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.NewTextField(TextField.getCPtr(handle)), true)
91         {
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93
94             if (!shown)
95             {
96                 SetVisible(false);
97             }
98         }
99
100         internal enum ExceedPolicyType
101         {
102             ExceedPolicyOriginal,
103             ExceedPolicyClip
104         }
105
106         /// <summary>
107         /// The TranslatableText property.<br />
108         /// The text can set the SID value.<br />
109         /// </summary>
110         /// <exception cref='ArgumentNullException'>
111         /// ResourceManager about multilingual is null.
112         /// </exception>
113         /// <since_tizen> 4 </since_tizen>
114         public string TranslatableText
115         {
116             get
117             {
118                 return (string)GetValue(TranslatableTextProperty);
119             }
120             set
121             {
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             }
161         }
162         private string translatablePlaceholderText
163         {
164             get
165             {
166                 return textFieldPlaceHolderTextSid;
167             }
168             set
169             {
170                 if (NUIApplication.MultilingualResourceManager == null)
171                 {
172                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
173                 }
174                 textFieldPlaceHolderTextSid = value;
175                 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
176                 NotifyPropertyChanged();
177             }
178         }
179
180         /// <summary>
181         /// The TranslatablePlaceholderTextFocused property.<br />
182         /// The text can set the SID value.<br />
183         /// </summary>
184         /// <exception cref='ArgumentNullException'>
185         /// ResourceManager about multilingual is null.
186         /// </exception>
187         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
188         [EditorBrowsable(EditorBrowsableState.Never)]
189         public string TranslatablePlaceholderTextFocused
190         {
191             get
192             {
193                 return (string)GetValue(TranslatablePlaceholderTextFocusedProperty);
194             }
195             set
196             {
197                 SetValue(TranslatablePlaceholderTextFocusedProperty, value);
198             }
199         }
200         private string translatablePlaceholderTextFocused
201         {
202             get
203             {
204                 return textFieldPlaceHolderTextFocusedSid;
205             }
206             set
207             {
208                 if (NUIApplication.MultilingualResourceManager == null)
209                 {
210                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
211                 }
212                 textFieldPlaceHolderTextFocusedSid = value;
213                 PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid);
214                 NotifyPropertyChanged();
215             }
216         }
217
218         /// <summary>
219         /// The Text property.
220         /// </summary>
221         /// <since_tizen> 3 </since_tizen>
222         public string Text
223         {
224             get
225             {
226                 return (string)GetValue(TextProperty);
227             }
228             set
229             {
230                 SetValueAndForceSendChangeSignal(TextProperty, value);
231                 NotifyPropertyChanged();
232             }
233         }
234
235         /// <summary>
236         /// The PlaceholderText property.
237         /// </summary>
238         /// <since_tizen> 3 </since_tizen>
239         public string PlaceholderText
240         {
241             get
242             {
243                 return (string)GetValue(PlaceholderTextProperty);
244             }
245             set
246             {
247                 SetValue(PlaceholderTextProperty, value);
248                 NotifyPropertyChanged();
249             }
250         }
251
252         /// <summary>
253         /// The PlaceholderTextFocused property.
254         /// </summary>
255         /// <since_tizen> 3 </since_tizen>
256         public string PlaceholderTextFocused
257         {
258             get
259             {
260                 return (string)GetValue(PlaceholderTextFocusedProperty);
261             }
262             set
263             {
264                 SetValue(PlaceholderTextFocusedProperty, value);
265                 NotifyPropertyChanged();
266             }
267         }
268
269         /// <summary>
270         /// The FontFamily property.
271         /// </summary>
272         /// <since_tizen> 3 </since_tizen>
273         public string FontFamily
274         {
275             get
276             {
277                 return (string)GetValue(FontFamilyProperty);
278             }
279             set
280             {
281                 SetValue(FontFamilyProperty, value);
282                 NotifyPropertyChanged();
283             }
284         }
285
286         /// <summary>
287         /// The FontStyle property.
288         /// The fontStyle map contains the following keys :<br />
289         /// <list type="table">
290         /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
291         /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
292         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
293         /// </list>
294         /// </summary>
295         /// <since_tizen> 3 </since_tizen>
296         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
297         public PropertyMap FontStyle
298         {
299             get
300             {
301                 return (PropertyMap)GetValue(FontStyleProperty);
302             }
303             set
304             {
305                 SetValue(FontStyleProperty, value);
306                 NotifyPropertyChanged();
307             }
308         }
309
310         /// <summary>
311         /// Set FontStyle to TextField. <br />
312         /// </summary>
313         /// <param name="fontStyle">The FontStyle</param>
314         /// <remarks>
315         /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
316         /// </remarks>
317         /// <example>
318         /// The following example demonstrates how to use the SetFontStyle method.
319         /// <code>
320         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
321         /// fontStyle.Width = FontWidthType.Expanded;
322         /// fontStyle.Weight = FontWeightType.Bold;
323         /// fontStyle.Slant = FontSlantType.Italic;
324         /// field.SetFontStyle(fontStyle);
325         /// </code>
326         /// </example>
327         [EditorBrowsable(EditorBrowsableState.Never)]
328         public void SetFontStyle(FontStyle fontStyle)
329         {
330             SetProperty(TextField.Property.FontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
331             NotifyPropertyChanged();
332         }
333
334         /// <summary>
335         /// Get FontStyle from TextField. <br />
336         /// </summary>
337         /// <returns>The FontStyle</returns>
338         /// <remarks>
339         /// <see cref="Tizen.NUI.Text.FontStyle"/>
340         /// </remarks>
341         [EditorBrowsable(EditorBrowsableState.Never)]
342         public FontStyle GetFontStyle()
343         {
344             var map = new PropertyMap();
345             GetProperty(TextField.Property.FontStyle).Get(map);
346             return TextUtils.GetFontStyleStruct(map);
347         }
348
349         /// <summary>
350         /// The PointSize property.
351         /// </summary>
352         /// <since_tizen> 3 </since_tizen>
353         public float PointSize
354         {
355             get
356             {
357                 return (float)GetValue(PointSizeProperty);
358             }
359             set
360             {
361                 SetValue(PointSizeProperty, value);
362                 NotifyPropertyChanged();
363             }
364         }
365
366         /// <summary>
367         /// The MaxLength property.
368         /// </summary>
369         /// <since_tizen> 3 </since_tizen>
370         public int MaxLength
371         {
372             get
373             {
374                 return (int)GetValue(MaxLengthProperty);
375             }
376             set
377             {
378                 SetValue(MaxLengthProperty, value);
379                 NotifyPropertyChanged();
380             }
381         }
382
383         /// <summary>
384         /// The ExceedPolicy property.
385         /// </summary>
386         /// <since_tizen> 3 </since_tizen>
387         public int ExceedPolicy
388         {
389             get
390             {
391                 return (int)GetValue(ExceedPolicyProperty);
392             }
393             set
394             {
395                 SetValue(ExceedPolicyProperty, value);
396                 NotifyPropertyChanged();
397             }
398         }
399
400         /// <summary>
401         /// The HorizontalAlignment property.
402         /// </summary>
403         /// <since_tizen> 3 </since_tizen>
404         public HorizontalAlignment HorizontalAlignment
405         {
406             get
407             {
408                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
409             }
410             set
411             {
412                 SetValue(HorizontalAlignmentProperty, value);
413                 NotifyPropertyChanged();
414             }
415         }
416
417         /// <summary>
418         /// The VerticalAlignment property.
419         /// </summary>
420         /// <since_tizen> 3 </since_tizen>
421         public VerticalAlignment VerticalAlignment
422         {
423             get
424             {
425                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
426             }
427             set
428             {
429                 SetValue(VerticalAlignmentProperty, value);
430                 NotifyPropertyChanged();
431                 NotifyPropertyChanged();
432             }
433         }
434
435         /// <summary>
436         /// The TextColor property.
437         /// </summary>
438         /// <remarks>
439         /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
440         /// </remarks>
441         /// <since_tizen> 3 </since_tizen>
442         public Color TextColor
443         {
444             get
445             {
446                 Color temp = (Color)GetValue(TextColorProperty);
447                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
448             }
449             set
450             {
451                 SetValue(TextColorProperty, value);
452                 NotifyPropertyChanged();
453             }
454         }
455
456         /// <summary>
457         /// The PlaceholderTextColor property.
458         /// </summary>
459         /// <remarks>
460         /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
461         /// </remarks>
462         /// <since_tizen> 3 </since_tizen>
463         public Vector4 PlaceholderTextColor
464         {
465             get
466             {
467                 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
468                 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
469             }
470             set
471             {
472                 SetValue(PlaceholderTextColorProperty, value);
473                 NotifyPropertyChanged();
474             }
475         }
476
477         /// <summary>
478         /// The ShadowOffset property.
479         /// </summary>
480         /// <since_tizen> 3 </since_tizen>
481         /// <remarks>
482         /// Deprecated.(API Level 6) Use Shadow instead.
483         /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
484         /// </remarks>
485         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
486         public Vector2 ShadowOffset
487         {
488             get
489             {
490                 PropertyMap map = new PropertyMap();
491                 GetProperty(TextField.Property.SHADOW).Get(map);
492                 Vector2 shadowOffset = new Vector2();
493                 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
494                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
495             }
496             set
497             {
498                 PropertyMap temp = new PropertyMap();
499                 temp.Insert("offset", new PropertyValue(value));
500                 SetValue(ShadowProperty, temp);
501                 NotifyPropertyChanged();
502             }
503         }
504
505         /// <summary>
506         /// The ShadowColor property.
507         /// </summary>
508         /// <since_tizen> 3 </since_tizen>
509         /// <remarks>
510         /// Deprecated.(API Level 6) Use Shadow instead.
511         /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
512         /// </remarks>
513         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
514         public Vector4 ShadowColor
515         {
516             get
517             {
518                 PropertyMap map = new PropertyMap();
519                 GetProperty(TextField.Property.SHADOW).Get(map);
520                 Vector4 shadowColor = new Vector4();
521                 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
522                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
523             }
524             set
525             {
526                 PropertyMap temp = new PropertyMap();
527                 temp.Insert("color", new PropertyValue(value));
528                 SetValue(ShadowProperty, temp);
529                 NotifyPropertyChanged();
530             }
531         }
532
533         /// <summary>
534         /// The PrimaryCursorColor property.
535         /// </summary>
536         /// <remarks>
537         /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
538         /// </remarks>
539         /// <since_tizen> 3 </since_tizen>
540         public Vector4 PrimaryCursorColor
541         {
542             get
543             {
544                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
545                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
546             }
547             set
548             {
549                 SetValue(PrimaryCursorColorProperty, value);
550                 NotifyPropertyChanged();
551             }
552         }
553
554         /// <summary>
555         /// The SecondaryCursorColor property.
556         /// </summary>
557         /// <remarks>
558         /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
559         /// </remarks>
560         /// <since_tizen> 3 </since_tizen>
561         public Vector4 SecondaryCursorColor
562         {
563             get
564             {
565                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
566                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
567             }
568             set
569             {
570                 SetValue(SecondaryCursorColorProperty, value);
571                 NotifyPropertyChanged();
572             }
573         }
574
575         /// <summary>
576         /// The EnableCursorBlink property.
577         /// </summary>
578         /// <since_tizen> 3 </since_tizen>
579         public bool EnableCursorBlink
580         {
581             get
582             {
583                 return (bool)GetValue(EnableCursorBlinkProperty);
584             }
585             set
586             {
587                 SetValue(EnableCursorBlinkProperty, value);
588                 NotifyPropertyChanged();
589             }
590         }
591
592         /// <summary>
593         /// The CursorBlinkInterval property.
594         /// </summary>
595         /// <since_tizen> 3 </since_tizen>
596         public float CursorBlinkInterval
597         {
598             get
599             {
600                 return (float)GetValue(CursorBlinkIntervalProperty);
601             }
602             set
603             {
604                 SetValue(CursorBlinkIntervalProperty, value);
605                 NotifyPropertyChanged();
606             }
607         }
608
609         /// <summary>
610         /// The CursorBlinkDuration property.
611         /// </summary>
612         /// <since_tizen> 3 </since_tizen>
613         public float CursorBlinkDuration
614         {
615             get
616             {
617                 return (float)GetValue(CursorBlinkDurationProperty);
618             }
619             set
620             {
621                 SetValue(CursorBlinkDurationProperty, value);
622                 NotifyPropertyChanged();
623             }
624         }
625
626         /// <summary>
627         /// The CursorWidth property.
628         /// </summary>
629         /// <since_tizen> 3 </since_tizen>
630         public int CursorWidth
631         {
632             get
633             {
634                 return (int)GetValue(CursorWidthProperty);
635             }
636             set
637             {
638                 SetValue(CursorWidthProperty, value);
639                 NotifyPropertyChanged();
640             }
641         }
642
643         /// <summary>
644         /// The GrabHandleImage property.
645         /// </summary>
646         /// <since_tizen> 3 </since_tizen>
647         public string GrabHandleImage
648         {
649             get
650             {
651                 return (string)GetValue(GrabHandleImageProperty);
652             }
653             set
654             {
655                 SetValue(GrabHandleImageProperty, value);
656                 NotifyPropertyChanged();
657             }
658         }
659
660         /// <summary>
661         /// The GrabHandlePressedImage property.
662         /// </summary>
663         /// <since_tizen> 3 </since_tizen>
664         public string GrabHandlePressedImage
665         {
666             get
667             {
668                 return (string)GetValue(GrabHandlePressedImageProperty);
669             }
670             set
671             {
672                 SetValue(GrabHandlePressedImageProperty, value);
673                 NotifyPropertyChanged();
674             }
675         }
676
677         /// <summary>
678         /// The ScrollThreshold property.
679         /// </summary>
680         /// <since_tizen> 3 </since_tizen>
681         public float ScrollThreshold
682         {
683             get
684             {
685                 return (float)GetValue(ScrollThresholdProperty);
686             }
687             set
688             {
689                 SetValue(ScrollThresholdProperty, value);
690                 NotifyPropertyChanged();
691             }
692         }
693
694         /// <summary>
695         /// The ScrollSpeed property.
696         /// </summary>
697         /// <since_tizen> 3 </since_tizen>
698         public float ScrollSpeed
699         {
700             get
701             {
702                 return (float)GetValue(ScrollSpeedProperty);
703             }
704             set
705             {
706                 SetValue(ScrollSpeedProperty, value);
707                 NotifyPropertyChanged();
708             }
709         }
710
711         /// <summary>
712         /// The SelectionHandleImageLeft property.
713         /// The selectionHandleImageLeft map contains the following key :<br />
714         /// <list type="table">
715         /// <item><term>filename (string)</term><description>The path of image file</description></item>
716         /// </list>
717         /// </summary>
718         /// <since_tizen> 3 </since_tizen>
719         public PropertyMap SelectionHandleImageLeft
720         {
721             get
722             {
723                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
724             }
725             set
726             {
727                 SetValue(SelectionHandleImageLeftProperty, value);
728                 NotifyPropertyChanged();
729             }
730         }
731
732         /// <summary>
733         /// The SelectionHandleImageRight property.
734         /// The selectionHandleImageRight map contains the following key :<br />
735         /// <list type="table">
736         /// <item><term>filename (string)</term><description>The path of image file</description></item>
737         /// </list>
738         /// </summary>
739         /// <since_tizen> 3 </since_tizen>
740         public PropertyMap SelectionHandleImageRight
741         {
742             get
743             {
744                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
745             }
746             set
747             {
748                 SetValue(SelectionHandleImageRightProperty, value);
749                 NotifyPropertyChanged();
750             }
751         }
752
753         /// <summary>
754         /// The SelectionHandlePressedImageLeft property.
755         /// The selectionHandlePressedImageLeft map contains the following key :<br />
756         /// <list type="table">
757         /// <item><term>filename (string)</term><description>The path of image file</description></item>
758         /// </list>
759         /// </summary>
760         /// <since_tizen> 3 </since_tizen>
761         public PropertyMap SelectionHandlePressedImageLeft
762         {
763             get
764             {
765                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
766             }
767             set
768             {
769                 SetValue(SelectionHandlePressedImageLeftProperty, value);
770                 NotifyPropertyChanged();
771             }
772         }
773
774         /// <summary>
775         /// The SelectionHandlePressedImageRight property.
776         /// The selectionHandlePressedImageRight map contains the following key :<br />
777         /// <list type="table">
778         /// <item><term>filename (string)</term><description>The path of image file</description></item>
779         /// </list>
780         /// </summary>
781         /// <since_tizen> 3 </since_tizen>
782         public PropertyMap SelectionHandlePressedImageRight
783         {
784             get
785             {
786                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
787             }
788             set
789             {
790                 SetValue(SelectionHandlePressedImageRightProperty, value);
791                 NotifyPropertyChanged();
792             }
793         }
794
795         /// <summary>
796         /// The SelectionHandleMarkerImageLeft property.
797         /// The selectionHandleMarkerImageLeft map contains the following key :<br />
798         /// <list type="table">
799         /// <item><term>filename (string)</term><description>The path of image file</description></item>
800         /// </list>
801         /// </summary>
802         /// <since_tizen> 3 </since_tizen>
803         public PropertyMap SelectionHandleMarkerImageLeft
804         {
805             get
806             {
807                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
808             }
809             set
810             {
811                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
812                 NotifyPropertyChanged();
813             }
814         }
815
816         /// <summary>
817         /// The SelectionHandleMarkerImageRight property.
818         /// The selectionHandleMarkerImageRight map contains the following key :<br />
819         /// <list type="table">
820         /// <item><term>filename (string)</term><description>The path of image file</description></item>
821         /// </list>
822         /// </summary>
823         /// <since_tizen> 3 </since_tizen>
824         public PropertyMap SelectionHandleMarkerImageRight
825         {
826             get
827             {
828                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
829             }
830             set
831             {
832                 SetValue(SelectionHandleMarkerImageRightProperty, value);
833                 NotifyPropertyChanged();
834             }
835         }
836
837         /// <summary>
838         /// The SelectionHighlightColor property.
839         /// </summary>
840         /// <remarks>
841         /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
842         /// </remarks>
843         /// <since_tizen> 3 </since_tizen>
844         public Vector4 SelectionHighlightColor
845         {
846             get
847             {
848                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
849                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
850             }
851             set
852             {
853                 SetValue(SelectionHighlightColorProperty, value);
854                 NotifyPropertyChanged();
855             }
856         }
857
858         /// <summary>
859         /// The DecorationBoundingBox property.
860         /// </summary>
861         /// <remarks>
862         /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
863         /// </remarks>
864         /// <since_tizen> 3 </since_tizen>
865         public Rectangle DecorationBoundingBox
866         {
867             get
868             {
869                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
870                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
871             }
872             set
873             {
874                 SetValue(DecorationBoundingBoxProperty, value);
875                 NotifyPropertyChanged();
876             }
877         }
878
879         /// <summary>
880         /// The InputMethodSettings property.
881         /// </summary>
882         /// <remarks>
883         /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
884         /// </remarks>
885         /// <example>
886         /// The following example demonstrates how to set the InputMethodSettings property.
887         /// <code>
888         /// InputMethod method = new InputMethod();
889         /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
890         /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
891         /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
892         /// method.Variation = 1;
893         /// textField.InputMethodSettings = method.OutputMap;
894         /// </code>
895         /// </example>
896         /// <since_tizen> 3 </since_tizen>
897         public PropertyMap InputMethodSettings
898         {
899             get
900             {
901                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
902             }
903             set
904             {
905                 SetValue(InputMethodSettingsProperty, value);
906                 NotifyPropertyChanged();
907             }
908         }
909
910         /// <summary>
911         /// The InputColor property.
912         /// </summary>
913         /// <remarks>
914         /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
915         /// </remarks>
916         /// <since_tizen> 3 </since_tizen>
917         public Vector4 InputColor
918         {
919             get
920             {
921                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
922                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
923             }
924             set
925             {
926                 SetValue(InputColorProperty, value);
927                 NotifyPropertyChanged();
928             }
929         }
930
931         /// <summary>
932         /// The EnableMarkup property.
933         /// </summary>
934         /// <since_tizen> 3 </since_tizen>
935         public bool EnableMarkup
936         {
937             get
938             {
939                 return (bool)GetValue(EnableMarkupProperty);
940             }
941             set
942             {
943                 SetValue(EnableMarkupProperty, value);
944                 NotifyPropertyChanged();
945             }
946         }
947
948         /// <summary>
949         /// The InputFontFamily property.
950         /// </summary>
951         /// <since_tizen> 3 </since_tizen>
952         public string InputFontFamily
953         {
954             get
955             {
956                 return (string)GetValue(InputFontFamilyProperty);
957             }
958             set
959             {
960                 SetValue(InputFontFamilyProperty, value);
961                 NotifyPropertyChanged();
962             }
963         }
964
965         /// <summary>
966         /// The InputFontStyle property.
967         /// The inputFontStyle map contains the following keys :<br />
968         /// <list type="table">
969         /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
970         /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
971         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
972         /// </list>
973         /// </summary>
974         /// <since_tizen> 3 </since_tizen>
975         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
976         public PropertyMap InputFontStyle
977         {
978             get
979             {
980                 return (PropertyMap)GetValue(InputFontStyleProperty);
981             }
982             set
983             {
984                 SetValue(InputFontStyleProperty, value);
985                 NotifyPropertyChanged();
986             }
987         }
988
989         /// <summary>
990         /// Set InputFontStyle to TextField. <br />
991         /// </summary>
992         /// <param name="fontStyle">The FontStyle</param>
993         /// <remarks>
994         /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
995         /// </remarks>
996         /// <example>
997         /// The following example demonstrates how to use the SetInputFontStyle method.
998         /// <code>
999         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
1000         /// fontStyle.Width = FontWidthType.Expanded;
1001         /// fontStyle.Weight = FontWeightType.Bold;
1002         /// fontStyle.Slant = FontSlantType.Italic;
1003         /// field.SetInputFontStyle(fontStyle);
1004         /// </code>
1005         /// </example>
1006         [EditorBrowsable(EditorBrowsableState.Never)]
1007         public void SetInputFontStyle(FontStyle fontStyle)
1008         {
1009             SetProperty(TextField.Property.InputFontStyle, new PropertyValue(TextUtils.GetFontStyleMap(fontStyle)));
1010             NotifyPropertyChanged();
1011         }
1012
1013         /// <summary>
1014         /// Get InputFontStyle from TextField. <br />
1015         /// </summary>
1016         /// <returns>The FontStyle</returns>
1017         /// <remarks>
1018         /// <see cref="Tizen.NUI.Text.FontStyle"/>
1019         /// </remarks>
1020         [EditorBrowsable(EditorBrowsableState.Never)]
1021         public FontStyle GetInputFontStyle()
1022         {
1023             var map = new PropertyMap();
1024             GetProperty(TextField.Property.InputFontStyle).Get(map);
1025             return TextUtils.GetFontStyleStruct(map);
1026         }
1027
1028         /// <summary>
1029         /// The InputPointSize property.
1030         /// </summary>
1031         /// <since_tizen> 3 </since_tizen>
1032         public float InputPointSize
1033         {
1034             get
1035             {
1036                 return (float)GetValue(InputPointSizeProperty);
1037             }
1038             set
1039             {
1040                 SetValue(InputPointSizeProperty, value);
1041                 NotifyPropertyChanged();
1042             }
1043         }
1044
1045         /// <summary>
1046         /// The Underline property.
1047         /// The underline map contains the following keys :<br />
1048         /// <list type="table">
1049         /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
1050         /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
1051         /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
1052         /// </list>
1053         /// </summary>
1054         /// <since_tizen> 3 </since_tizen>
1055         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1056         public PropertyMap Underline
1057         {
1058             get
1059             {
1060                 return (PropertyMap)GetValue(UnderlineProperty);
1061             }
1062             set
1063             {
1064                 SetValue(UnderlineProperty, value);
1065                 NotifyPropertyChanged();
1066             }
1067         }
1068
1069         /// <summary>
1070         /// Set Underline to TextField. <br />
1071         /// </summary>
1072         /// <param name="underline">The Underline</param>
1073         /// <remarks>
1074         /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
1075         /// </remarks>
1076         /// <example>
1077         /// The following example demonstrates how to use the SetUnderline method.
1078         /// <code>
1079         /// var underline = new Tizen.NUI.Text.Underline();
1080         /// underline.Enable = true;
1081         /// underline.Color = new Color("#3498DB");
1082         /// underline.Height = 2.0f;
1083         /// field.SetUnderline(underline);
1084         /// </code>
1085         /// </example>
1086         [EditorBrowsable(EditorBrowsableState.Never)]
1087         public void SetUnderline(Underline underline)
1088         {
1089             SetProperty(TextField.Property.UNDERLINE, new PropertyValue(TextUtils.GetUnderlineMap(underline)));
1090         }
1091
1092         /// <summary>
1093         /// Get Underline from TextField. <br />
1094         /// </summary>
1095         /// <returns>The Underline</returns>
1096         /// <remarks>
1097         /// <see cref="Tizen.NUI.Text.Underline"/>
1098         /// </remarks>
1099         [EditorBrowsable(EditorBrowsableState.Never)]
1100         public Underline GetUnderline()
1101         {
1102             var map = new PropertyMap();
1103             GetProperty(TextField.Property.UNDERLINE).Get(map);
1104             return TextUtils.GetUnderlineStruct(map);
1105         }
1106
1107         /// <summary>
1108         /// The InputUnderline property.
1109         /// </summary>
1110         /// <since_tizen> 3 </since_tizen>
1111         public string InputUnderline
1112         {
1113             get
1114             {
1115                 return (string)GetValue(InputUnderlineProperty);
1116             }
1117             set
1118             {
1119                 SetValue(InputUnderlineProperty, value);
1120                 NotifyPropertyChanged();
1121             }
1122         }
1123
1124         /// <summary>
1125         /// The Shadow property.
1126         /// The shadow map contains the following keys :<br />
1127         /// <list type="table">
1128         /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1129         /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1130         /// <item><term>blurRadius (float)</term><description>The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled)</description></item>
1131         /// </list>
1132         /// </summary>
1133         /// <since_tizen> 3 </since_tizen>
1134         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1135         public PropertyMap Shadow
1136         {
1137             get
1138             {
1139                 return (PropertyMap)GetValue(ShadowProperty);
1140             }
1141             set
1142             {
1143                 SetValue(ShadowProperty, value);
1144                 NotifyPropertyChanged();
1145             }
1146         }
1147
1148         /// <summary>
1149         /// Set Shadow to TextField. <br />
1150         /// </summary>
1151         /// <param name="shadow">The Shadow</param>
1152         /// <remarks>
1153         /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
1154         /// </remarks>
1155         /// <example>
1156         /// The following example demonstrates how to use the SetShadow method.
1157         /// <code>
1158         /// var shadow = new Tizen.NUI.Text.Shadow();
1159         /// shadow.Offset = new Vector2(3, 3);
1160         /// shadow.Color = new Color("#F1C40F");
1161         /// field.SetShadow(shadow);
1162         /// </code>
1163         /// </example>
1164         [EditorBrowsable(EditorBrowsableState.Never)]
1165         public void SetShadow(Tizen.NUI.Text.Shadow shadow)
1166         {
1167             SetProperty(TextField.Property.SHADOW, new PropertyValue(TextUtils.GetShadowMap(shadow)));
1168         }
1169
1170         /// <summary>
1171         /// Get Shadow from TextField. <br />
1172         /// </summary>
1173         /// <returns>The Shadow</returns>
1174         /// <remarks>
1175         /// <see cref="Tizen.NUI.Text.Shadow"/>
1176         /// </remarks>
1177         [EditorBrowsable(EditorBrowsableState.Never)]
1178         public Tizen.NUI.Text.Shadow GetShadow()
1179         {
1180             var map = new PropertyMap();
1181             GetProperty(TextField.Property.SHADOW).Get(map);
1182             return TextUtils.GetShadowStruct(map);
1183         }
1184
1185         /// <summary>
1186         /// The InputShadow property.
1187         /// </summary>
1188         /// <since_tizen> 3 </since_tizen>
1189         public string InputShadow
1190         {
1191             get
1192             {
1193                 return (string)GetValue(InputShadowProperty);
1194             }
1195             set
1196             {
1197                 SetValue(InputShadowProperty, value);
1198                 NotifyPropertyChanged();
1199             }
1200         }
1201
1202         /// <summary>
1203         /// The Emboss property.
1204         /// </summary>
1205         /// <since_tizen> 3 </since_tizen>
1206         public string Emboss
1207         {
1208             get
1209             {
1210                 return (string)GetValue(EmbossProperty);
1211             }
1212             set
1213             {
1214                 SetValue(EmbossProperty, value);
1215                 NotifyPropertyChanged();
1216             }
1217         }
1218
1219         /// <summary>
1220         /// The InputEmboss property.
1221         /// </summary>
1222         /// <since_tizen> 3 </since_tizen>
1223         public string InputEmboss
1224         {
1225             get
1226             {
1227                 return (string)GetValue(InputEmbossProperty);
1228             }
1229             set
1230             {
1231                 SetValue(InputEmbossProperty, value);
1232                 NotifyPropertyChanged();
1233             }
1234         }
1235
1236         /// <summary>
1237         /// The Outline property.
1238         /// The outline map contains the following keys :<br />
1239         /// <list type="table">
1240         /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1241         /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1242         /// </list>
1243         /// </summary>
1244         /// <since_tizen> 3 </since_tizen>
1245         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1246         public PropertyMap Outline
1247         {
1248             get
1249             {
1250                 return (PropertyMap)GetValue(OutlineProperty);
1251             }
1252             set
1253             {
1254                 SetValue(OutlineProperty, value);
1255                 NotifyPropertyChanged();
1256             }
1257         }
1258
1259         /// <summary>
1260         /// Set Outline to TextField. <br />
1261         /// </summary>
1262         /// <param name="outline">The Outline</param>
1263         /// <remarks>
1264         /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
1265         /// </remarks>
1266         /// <example>
1267         /// The following example demonstrates how to use the SetOutline method.
1268         /// <code>
1269         /// var outline = new Tizen.NUI.Text.Outline();
1270         /// outline.Width = 2.0f;
1271         /// outline.Color = new Color("#45B39D");
1272         /// field.SetOutline(outline);
1273         /// </code>
1274         /// </example>
1275         [EditorBrowsable(EditorBrowsableState.Never)]
1276         public void SetOutline(Outline outline)
1277         {
1278             SetProperty(TextField.Property.OUTLINE, new PropertyValue(TextUtils.GetOutlineMap(outline)));
1279         }
1280
1281         /// <summary>
1282         /// Get Outline from TextField. <br />
1283         /// </summary>
1284         /// <returns>The Outline</returns>
1285         /// <remarks>
1286         /// <see cref="Tizen.NUI.Text.Outline"/>
1287         /// </remarks>
1288         [EditorBrowsable(EditorBrowsableState.Never)]
1289         public Outline GetOutline()
1290         {
1291             var map = new PropertyMap();
1292             GetProperty(TextField.Property.OUTLINE).Get(map);
1293             return TextUtils.GetOutlineStruct(map);
1294         }
1295
1296         /// <summary>
1297         /// The InputOutline property.
1298         /// </summary>
1299         /// <since_tizen> 3 </since_tizen>
1300         public string InputOutline
1301         {
1302             get
1303             {
1304                 return (string)GetValue(InputOutlineProperty);
1305             }
1306             set
1307             {
1308                 SetValue(InputOutlineProperty, value);
1309                 NotifyPropertyChanged();
1310             }
1311         }
1312
1313         /// <summary>
1314         /// The HiddenInputSettings property.
1315         /// The hiddenInputSettings map contains the following keys :<br />
1316         /// <list type="table">
1317         /// <item><term>HiddenInputProperty.Mode (int)</term><description>The mode for input text display (Use HiddenInputModeType)</description></item>
1318         /// <item><term>HiddenInputProperty.SubstituteCharacter (int)</term><description>All input characters are substituted by this character</description></item>
1319         /// <item><term>HiddenInputProperty.SubstituteCount (int)</term><description>Length of text to show or hide, available when HideCount/ShowCount mode is used</description></item>
1320         /// <item><term>HiddenInputProperty.ShowLastCharacterDuration (int)</term><description>Hide last character after this duration, available when ShowLastCharacter mode</description></item>
1321         /// </list>
1322         /// </summary>
1323         /// <remarks>
1324         /// See <see cref="HiddenInputProperty"/> and <see cref="HiddenInputModeType"/> for a detailed description.
1325         /// </remarks>
1326         /// <example>
1327         /// The following example demonstrates how to set the HiddenInputSettings property.
1328         /// <code>
1329         /// PropertyMap map = new PropertyMap();
1330         /// map.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter));
1331         /// map.Add(HiddenInputProperty.ShowLastCharacterDuration, new PropertyValue(500));
1332         /// map.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x2A));
1333         /// textField.HiddenInputSettings = map;
1334         /// </code>
1335         /// </example>
1336         /// <since_tizen> 3 </since_tizen>
1337         public Tizen.NUI.PropertyMap HiddenInputSettings
1338         {
1339             get
1340             {
1341                 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1342             }
1343             set
1344             {
1345                 SetValue(HiddenInputSettingsProperty, value);
1346                 NotifyPropertyChanged();
1347             }
1348         }
1349
1350         /// <summary>
1351         /// The PixelSize property.
1352         /// </summary>
1353         /// <since_tizen> 3 </since_tizen>
1354         public float PixelSize
1355         {
1356             get
1357             {
1358                 return (float)GetValue(PixelSizeProperty);
1359             }
1360             set
1361             {
1362                 SetValue(PixelSizeProperty, value);
1363                 NotifyPropertyChanged();
1364             }
1365         }
1366
1367         /// <summary>
1368         /// The Enable selection property.
1369         /// </summary>
1370         /// <since_tizen> 3 </since_tizen>
1371         public bool EnableSelection
1372         {
1373             get
1374             {
1375                 return (bool)GetValue(EnableSelectionProperty);
1376             }
1377             set
1378             {
1379                 SetValue(EnableSelectionProperty, value);
1380                 NotifyPropertyChanged();
1381             }
1382         }
1383
1384         /// <summary>
1385         /// The Enable selection property.
1386         /// </summary>
1387         /// <since_tizen> 6 </since_tizen>
1388         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1389         [EditorBrowsable(EditorBrowsableState.Never)]
1390         public bool EnableGrabHandle
1391         {
1392             get
1393             {
1394                 return (bool)GetValue(EnableGrabHandleProperty);
1395             }
1396             set
1397             {
1398                 SetValue(EnableGrabHandleProperty, value);
1399                 NotifyPropertyChanged();
1400             }
1401         }
1402
1403         /// <summary>
1404         /// The Enable selection property.
1405         /// </summary>
1406         /// <since_tizen> 6 </since_tizen>
1407         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1408         [EditorBrowsable(EditorBrowsableState.Never)]
1409         public bool EnableGrabHandlePopup
1410         {
1411             get
1412             {
1413                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1414             }
1415             set
1416             {
1417                 SetValue(EnableGrabHandlePopupProperty, value);
1418                 NotifyPropertyChanged();
1419             }
1420         }
1421
1422         /// <summary>
1423         /// The Selected Text property.
1424         /// </summary>
1425         /// <since_tizen> 8 </since_tizen>
1426         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1427         [EditorBrowsable(EditorBrowsableState.Never)]
1428         public string SelectedText
1429         {
1430             get
1431             {
1432                 string temp;
1433                 GetProperty(TextField.Property.SelectedText).Get(out temp);
1434                 return temp;
1435             }
1436         }
1437
1438         /// <summary>
1439         /// The start index for selection.
1440         /// </summary>
1441         /// <since_tizen> 8 </since_tizen>
1442         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1443         [EditorBrowsable(EditorBrowsableState.Never)]
1444         public int SelectedTextStart
1445         {
1446             get
1447             {
1448                 int temp;
1449                 GetProperty(TextField.Property.SelectedTextStart).Get(out temp);
1450                 return temp;
1451             }
1452             set
1453             {
1454                 SetProperty(TextField.Property.SelectedTextStart, new PropertyValue(value));
1455                 NotifyPropertyChanged();
1456             }
1457         }
1458
1459         /// <summary>
1460         /// The end index for selection.
1461         /// </summary>
1462         /// <since_tizen> 8 </since_tizen>
1463         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1464         [EditorBrowsable(EditorBrowsableState.Never)]
1465         public int SelectedTextEnd
1466         {
1467             get
1468             {
1469                 int temp;
1470                 GetProperty(TextField.Property.SelectedTextEnd).Get(out temp);
1471                 return temp;
1472             }
1473             set
1474             {
1475                 SetProperty(TextField.Property.SelectedTextEnd, new PropertyValue(value));
1476                 NotifyPropertyChanged();
1477             }
1478         }
1479
1480         /// <summary>
1481         /// Enable editing in text control.
1482         /// </summary>
1483         /// <since_tizen> 8 </since_tizen>
1484         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1485         [EditorBrowsable(EditorBrowsableState.Never)]
1486         public bool EnableEditing
1487         {
1488             get
1489             {
1490                 bool temp;
1491                 GetProperty(TextField.Property.EnableEditing).Get(out temp);
1492                 return temp;
1493             }
1494             set
1495             {
1496                 SetProperty(TextField.Property.EnableEditing, new PropertyValue(value));
1497                 NotifyPropertyChanged();
1498             }
1499         }
1500
1501         /// <summary>
1502         /// Specify primary cursor (caret) position in text control.
1503         /// </summary>
1504         [EditorBrowsable(EditorBrowsableState.Never)]
1505         public int PrimaryCursorPosition
1506         {
1507             get
1508             {
1509                 int temp;
1510                 using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
1511                 {
1512                     propertyValue.Get(out temp);
1513                 }
1514                 return temp;
1515             }
1516             set
1517             {
1518                 using (PropertyValue propertyValue = new PropertyValue(value))
1519                 {
1520                     SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue);
1521                     NotifyPropertyChanged();
1522                 }
1523             }
1524         }
1525
1526         /// <summary>
1527         /// The GrabHandleColor property.
1528         /// </summary>
1529         /// <remarks>
1530         /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
1531         /// </remarks>
1532         [EditorBrowsable(EditorBrowsableState.Never)]
1533         public Color GrabHandleColor
1534         {
1535             get
1536             {
1537                 Color temp = (Color)GetValue(GrabHandleColorProperty);
1538                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1539             }
1540             set
1541             {
1542                 SetValue(GrabHandleColorProperty, value);
1543                 NotifyPropertyChanged();
1544             }
1545         }
1546
1547         /// <summary>
1548         /// The ellipsis position of the text.
1549         /// The ellipsis position type when the text size over the layout size.<br />
1550         /// The ellipsis position: End, Start or Middle.<br />
1551         /// </summary>
1552         [EditorBrowsable(EditorBrowsableState.Never)]
1553         public EllipsisPosition EllipsisPosition
1554         {
1555             get
1556             {
1557                 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
1558             }
1559             set
1560             {
1561                 SetValue(EllipsisPositionProperty, value);
1562                 NotifyPropertyChanged();
1563             }
1564         }
1565
1566         /// <summary>
1567         /// Set InputFilter to TextField. <br />
1568         /// </summary>
1569         /// <param name="inputFilter">The InputFilter</param>
1570         /// <remarks>
1571         /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
1572         /// Users can set the Accepted or Rejected regular expression set, or both. <br />
1573         /// If both are used, Rejected has higher priority. <br />
1574         /// The character set must follow the regular expression rules. <br />
1575         /// Behaviour can not be guaranteed for incorrect grammars. <br />
1576         /// Refer the link below for detailed rules. <br />
1577         /// The functions in std::regex library use the ECMAScript grammar: <br />
1578         /// http://cplusplus.com/reference/regex/ECMAScript/ <br />
1579         /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
1580         /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description. <br />
1581         /// </remarks>
1582         /// <example>
1583         /// The following example demonstrates how to use the SetInputFilter method.
1584         /// <code>
1585         /// var inputFilter = new Tizen.NUI.Text.InputFilter();
1586         /// inputFilter.Accepted = @"[\d]"; // accept whole digits
1587         /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
1588         /// field.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
1589         /// </code>
1590         /// </example>
1591         [EditorBrowsable(EditorBrowsableState.Never)]
1592         public void SetInputFilter(InputFilter inputFilter)
1593         {
1594             SetProperty(TextField.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter)));
1595         }
1596
1597         /// <summary>
1598         /// Get InputFilter from TextField. <br />
1599         /// </summary>
1600         /// <returns>The InputFilter</returns>
1601         /// <remarks>
1602         /// <see cref="Tizen.NUI.Text.InputFilter"/>
1603         /// </remarks>
1604         [EditorBrowsable(EditorBrowsableState.Never)]
1605         public InputFilter GetInputFilter()
1606         {
1607             var map = new PropertyMap();
1608             GetProperty(TextField.Property.InputFilter).Get(map);
1609             return TextUtils.GetInputFilterStruct(map);
1610         }
1611
1612         /// <summary>
1613         /// The Placeholder property.
1614         /// The placeholder map contains the following keys :<br />
1615         /// <list type="table">
1616         /// <item><term>text (string)</term><description>The text to display when the TextField is empty and inactive</description></item>
1617         /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1618         /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1619         /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1620         /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1621         /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1622         /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1623         /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1624         /// </list>
1625         /// </summary>
1626         /// <example>
1627         /// The following example demonstrates how to set the Placeholder property.
1628         /// <code>
1629         /// PropertyMap propertyMap = new PropertyMap();
1630         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1631         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1632         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1633         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1634         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1635         ///
1636         /// PropertyMap fontStyleMap = new PropertyMap();
1637         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1638         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1639         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1640         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1641         ///
1642         /// TextField field = new TextField();
1643         /// field.Placeholder = propertyMap;
1644         /// </code>
1645         /// </example>
1646         /// <since_tizen> 3 </since_tizen>
1647         public Tizen.NUI.PropertyMap Placeholder
1648         {
1649             get
1650             {
1651                 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
1652                 PropertyValue value = null;
1653
1654                 // text
1655                 value = map.Find(0);
1656                 if (null != value)
1657                 {
1658                     value.Get(out string text);
1659                     map.Add("text", new PropertyValue(text));
1660                 }
1661
1662                 // textFocused
1663                 value = map.Find(1);
1664                 if (null != value)
1665                 {
1666                     value.Get(out string textFocused);
1667                     map.Add("textFocused", new PropertyValue(textFocused));
1668                 }
1669
1670                 // color
1671                 value = map.Find(2);
1672                 if (null != value)
1673                 {
1674                     Color color = new Color();
1675                     value.Get(color);
1676                     map.Add("color", new PropertyValue(color));
1677                 }
1678
1679                 // fontFamily
1680                 value = map.Find(3);
1681                 if (null != value)
1682                 {
1683                     value.Get(out string fontFamily);
1684                     map.Add("fontFamily", new PropertyValue(fontFamily));
1685                 }
1686
1687                 // fontStyle
1688                 value = map.Find(4);
1689                 if (null != value)
1690                 {
1691                     PropertyMap fontStyle = new PropertyMap();
1692                     value.Get(fontStyle);
1693                     map.Add("fontStyle", new PropertyValue(fontStyle));
1694                 }
1695
1696                 // pointSize
1697                 value = map.Find(5);
1698                 if (null != value)
1699                 {
1700                     value.Get(out float pointSize);
1701                     map.Add("pointSize", new PropertyValue(pointSize));
1702                 }
1703
1704                 // pixelSize
1705                 value = map.Find(6);
1706                 if (null != value)
1707                 {
1708                     value.Get(out float pixelSize);
1709                     map.Add("pixelSize", new PropertyValue(pixelSize));
1710                 }
1711
1712                 // ellipsis
1713                 value = map.Find(7);
1714                 if (null != value)
1715                 {
1716                     value.Get(out bool ellipsis);
1717                     map.Add("ellipsis", new PropertyValue(ellipsis));
1718                 }
1719
1720                 return map;
1721             }
1722             set
1723             {
1724                 SetValue(PlaceholderProperty, value);
1725                 NotifyPropertyChanged();
1726             }
1727         }
1728
1729         /// <summary>
1730         /// The Ellipsis property.<br />
1731         /// Enable or disable the ellipsis.<br />
1732         /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1733         /// </summary>
1734         /// <since_tizen> 4 </since_tizen>
1735         public bool Ellipsis
1736         {
1737             get
1738             {
1739                 return (bool)GetValue(EllipsisProperty);
1740             }
1741             set
1742             {
1743                 SetValue(EllipsisProperty, value);
1744                 NotifyPropertyChanged();
1745             }
1746         }
1747
1748         /// <summary>
1749         /// Enables selection of the text using the Shift key.
1750         /// </summary>
1751         /// <since_tizen> 5 </since_tizen>
1752         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1753         [EditorBrowsable(EditorBrowsableState.Never)]
1754         public bool EnableShiftSelection
1755         {
1756             get
1757             {
1758                 return (bool)GetValue(EnableShiftSelectionProperty);
1759             }
1760             set
1761             {
1762                 SetValue(EnableShiftSelectionProperty, value);
1763                 NotifyPropertyChanged();
1764             }
1765         }
1766
1767         /// <summary>
1768         /// The text alignment to match the direction of the system language.
1769         /// </summary>
1770         /// <since_tizen> 6 </since_tizen>
1771         public bool MatchSystemLanguageDirection
1772         {
1773             get
1774             {
1775                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1776             }
1777             set
1778             {
1779                 SetValue(MatchSystemLanguageDirectionProperty, value);
1780                 NotifyPropertyChanged();
1781             }
1782         }
1783
1784         /// <summary>
1785         /// The FontSizeScale property. <br />
1786         /// The default value is 1.0. <br />
1787         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1788         /// </summary>
1789         /// <since_tizen> 9 </since_tizen>
1790         public float FontSizeScale
1791         {
1792             get
1793             {
1794                 return fontSizeScale;
1795             }
1796             set
1797             {
1798                 float newFontSizeScale;
1799
1800                 if (fontSizeScale == value) return;
1801
1802                 fontSizeScale = value;
1803                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1804                 {
1805                     SystemSettingsFontSize systemSettingsFontSize;
1806
1807                     try
1808                     {
1809                         systemSettingsFontSize = SystemSettings.FontSize;
1810                     }
1811                     catch (Exception e)
1812                     {
1813                         Console.WriteLine("{0} Exception caught.", e);
1814                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
1815                     }
1816                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1817                     addFontSizeChangedCallback();
1818                 }
1819                 else
1820                 {
1821                     newFontSizeScale = fontSizeScale;
1822                     removeFontSizeChangedCallback();
1823                 }
1824
1825                 SetValue(FontSizeScaleProperty, newFontSizeScale);
1826                 NotifyPropertyChanged();
1827             }
1828         }
1829
1830         /// Only used by the IL of xaml, will never changed to not hidden.
1831         [EditorBrowsable(EditorBrowsableState.Never)]
1832         public override bool IsCreateByXaml
1833         {
1834             get
1835             {
1836                 return base.IsCreateByXaml;
1837             }
1838             set
1839             {
1840                 base.IsCreateByXaml = value;
1841
1842                 if (value == true)
1843                 {
1844                     this.TextChanged += (obj, e) =>
1845                     {
1846                         this.Text = e.TextField.Text;
1847                     };
1848                 }
1849             }
1850         }
1851
1852         /// <summary>
1853         /// Get the InputMethodContext instance.
1854         /// </summary>
1855         /// <returns>The InputMethodContext instance.</returns>
1856         /// <since_tizen> 5 </since_tizen>
1857         public InputMethodContext GetInputMethodContext()
1858         {
1859             if (inputMethodCotext == null)
1860             {
1861                 /*Avoid raising InputMethodContext reference count.*/
1862                 inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true);
1863                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1864             }
1865             return inputMethodCotext;
1866         }
1867
1868         /// <summary>
1869         /// Select the whole text.
1870         /// </summary>
1871         /// <since_tizen> 6 </since_tizen>
1872         /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
1873         [EditorBrowsable(EditorBrowsableState.Never)]
1874         public void SelectWholeText()
1875         {
1876             Interop.TextField.SelectWholeText(SwigCPtr);
1877             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1878         }
1879
1880         /// <summary>
1881         /// Select text from start to end index.
1882         /// </summary>
1883         /// <param name="start">The start index for selection.</param>
1884         /// <param name="end">The end index for selection.</param>
1885         [EditorBrowsable(EditorBrowsableState.Never)]
1886         public void SelectText(uint start, uint end)
1887         {
1888             Interop.TextField.SelectText(SwigCPtr, start, end);
1889             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1890         }
1891
1892         /// <summary>
1893         /// Clear selection of the text.
1894         /// </summary>
1895         /// <since_tizen> 8 </since_tizen>
1896         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1897         [EditorBrowsable(EditorBrowsableState.Never)]
1898         public void SelectNone()
1899         {
1900             _ = Interop.TextField.SelectNone(SwigCPtr);
1901             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1902         }
1903
1904         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
1905         {
1906             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
1907         }
1908
1909         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
1910         {
1911             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));
1912             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1913             return ret;
1914         }
1915
1916         /// <summary>
1917         /// Dispose.
1918         /// </summary>
1919         /// <since_tizen> 3 </since_tizen>
1920         protected override void Dispose(DisposeTypes type)
1921         {
1922             if (disposed)
1923             {
1924                 DisposeQueue.Instance.Add(this);
1925                 return;
1926             }
1927
1928             if (systemlangTextFlag)
1929             {
1930                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1931             }
1932
1933             removeFontSizeChangedCallback();
1934
1935             if (type == DisposeTypes.Explicit)
1936             {
1937                 //Called by User
1938                 //Release your own managed resources here.
1939                 //You should release all of your own disposable objects here.
1940             }
1941
1942             //Release your own unmanaged resources here.
1943             //You should not access any managed member here except static instance.
1944             //because the execution order of Finalizes is non-deterministic.
1945             if (this.HasBody())
1946             {
1947                 if (textFieldMaxLengthReachedCallbackDelegate != null)
1948                 {
1949                     this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
1950                 }
1951
1952                 if (textFieldTextChangedCallbackDelegate != null)
1953                 {
1954                     TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate);
1955                 }
1956             }
1957
1958             base.Dispose(type);
1959         }
1960
1961         /// This will not be public opened.
1962         [EditorBrowsable(EditorBrowsableState.Never)]
1963         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1964         {
1965             // In order to speed up IME hide, temporarily add
1966             GetInputMethodContext()?.DestroyContext();
1967             Interop.TextField.DeleteTextField(swigCPtr);
1968         }
1969
1970         private string SetTranslatable(string textFieldSid)
1971         {
1972             string translatableText = null;
1973             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1974             if (translatableText != null)
1975             {
1976                 if (systemlangTextFlag == false)
1977                 {
1978                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1979                     systemlangTextFlag = true;
1980                 }
1981                 return translatableText;
1982             }
1983             else
1984             {
1985                 translatableText = "";
1986                 return translatableText;
1987             }
1988         }
1989
1990         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1991         {
1992             if (textFieldTextSid != null)
1993             {
1994                 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1995             }
1996             if (textFieldPlaceHolderTextSid != null)
1997             {
1998                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1999             }
2000             if (textFieldPlaceHolderTextFocusedSid != null)
2001             {
2002                 PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
2003             }
2004         }
2005
2006         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
2007         {
2008             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
2009             SetValue(FontSizeScaleProperty, newFontSizeScale);
2010             NotifyPropertyChanged();
2011         }
2012
2013         private void addFontSizeChangedCallback()
2014         {
2015             if (hasFontSizeChangedCallback != true)
2016             {
2017                 try
2018                 {
2019                     SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
2020                     hasFontSizeChangedCallback = true;
2021                 }
2022                 catch (Exception e)
2023                 {
2024                     Console.WriteLine("{0} Exception caught.", e);
2025                     hasFontSizeChangedCallback = false;
2026                 }
2027             }
2028         }
2029
2030         private void removeFontSizeChangedCallback()
2031         {
2032             if (hasFontSizeChangedCallback == true)
2033             {
2034                 try
2035                 {
2036                     SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
2037                     hasFontSizeChangedCallback = false;
2038                 }
2039                 catch (Exception e)
2040                 {
2041                     Console.WriteLine("{0} Exception caught.", e);
2042                     hasFontSizeChangedCallback = true;
2043                 }
2044             }
2045         }
2046
2047         internal new class Property
2048         {
2049             internal static readonly int TEXT = Interop.TextField.TextGet();
2050             internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet();
2051             internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet();
2052             internal static readonly int FontFamily = Interop.TextField.FontFamilyGet();
2053             internal static readonly int FontStyle = Interop.TextField.FontStyleGet();
2054             internal static readonly int PointSize = Interop.TextField.PointSizeGet();
2055             internal static readonly int MaxLength = Interop.TextField.MaxLengthGet();
2056             internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet();
2057             internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet();
2058             internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet();
2059             internal static readonly int TextColor = Interop.TextField.TextColorGet();
2060             internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet();
2061             internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet();
2062             internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet();
2063             internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet();
2064             internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet();
2065             internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet();
2066             internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet();
2067             internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet();
2068             internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet();
2069             internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet();
2070             internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet();
2071             internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet();
2072             internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet();
2073             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet();
2074             internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet();
2075             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet();
2076             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet();
2077             internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet();
2078             internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet();
2079             internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet();
2080             internal static readonly int InputColor = Interop.TextField.InputColorGet();
2081             internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet();
2082             internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet();
2083             internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet();
2084             internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet();
2085             internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet();
2086             internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet();
2087             internal static readonly int SHADOW = Interop.TextField.ShadowGet();
2088             internal static readonly int InputShadow = Interop.TextField.InputShadowGet();
2089             internal static readonly int EMBOSS = Interop.TextField.EmbossGet();
2090             internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet();
2091             internal static readonly int OUTLINE = Interop.TextField.OutlineGet();
2092             internal static readonly int InputOutline = Interop.TextField.InputOutlineGet();
2093             internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet();
2094             internal static readonly int PixelSize = Interop.TextField.PixelSizeGet();
2095             internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet();
2096             internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet();
2097             internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet();
2098             internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet();
2099             internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet();
2100             internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet();
2101             internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet();
2102             internal static readonly int SelectedText = Interop.TextField.SelectedTextGet();
2103             internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet();
2104             internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet();
2105             internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
2106             internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
2107             internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
2108             internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
2109             internal static readonly int EllipsisPosition = Interop.TextField.EllipsisPositionGet();
2110             internal static readonly int InputFilter = Interop.TextField.InputFilterGet();
2111         }
2112
2113         internal class InputStyle
2114         {
2115             internal enum Mask
2116             {
2117                 None = 0x0000,
2118                 Color = 0x0001,
2119                 FontFamily = 0x0002,
2120                 PointSize = 0x0004,
2121                 FontStyle = 0x0008,
2122                 Underline = 0x0010,
2123                 Shadow = 0x0020,
2124                 Emboss = 0x0040,
2125                 Outline = 0x0080
2126             }
2127         }
2128
2129         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
2130         {
2131             DecorationBoundingBox = new Rectangle(x, y, width, height);
2132         }
2133         private void OnInputColorChanged(float x, float y, float z, float w)
2134         {
2135             InputColor = new Vector4(x, y, z, w);
2136         }
2137         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
2138         {
2139             PlaceholderTextColor = new Vector4(r, g, b, a);
2140         }
2141         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
2142         {
2143             PrimaryCursorColor = new Vector4(x, y, z, w);
2144         }
2145         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
2146         {
2147             SecondaryCursorColor = new Vector4(x, y, z, w);
2148         }
2149         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
2150         {
2151             SelectionHighlightColor = new Vector4(x, y, z, w);
2152         }
2153         private void OnShadowColorChanged(float x, float y, float z, float w)
2154         {
2155             ShadowColor = new Vector4(x, y, z, w);
2156         }
2157         private void OnShadowOffsetChanged(float x, float y)
2158         {
2159             ShadowOffset = new Vector2(x, y);
2160         }
2161         private void OnTextColorChanged(float r, float g, float b, float a)
2162         {
2163             TextColor = new Color(r, g, b, a);
2164         }
2165         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
2166         {
2167             GrabHandleColor = new Color(r, g, b, a);
2168         }
2169     }
2170 }