[NUI] Add SelectionHandleImage struct to Text Components
[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             SetValue(FontStyleProperty, TextUtils.GetFontStyleMap(fontStyle));
331         }
332
333         /// <summary>
334         /// Get FontStyle from TextField. <br />
335         /// </summary>
336         /// <returns>The FontStyle</returns>
337         /// <remarks>
338         /// <see cref="Tizen.NUI.Text.FontStyle"/>
339         /// </remarks>
340         [EditorBrowsable(EditorBrowsableState.Never)]
341         public FontStyle GetFontStyle()
342         {
343             return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty));
344         }
345
346         /// <summary>
347         /// The PointSize property.
348         /// </summary>
349         /// <since_tizen> 3 </since_tizen>
350         public float PointSize
351         {
352             get
353             {
354                 return (float)GetValue(PointSizeProperty);
355             }
356             set
357             {
358                 SetValue(PointSizeProperty, value);
359                 NotifyPropertyChanged();
360             }
361         }
362
363         /// <summary>
364         /// The MaxLength property.
365         /// </summary>
366         /// <since_tizen> 3 </since_tizen>
367         public int MaxLength
368         {
369             get
370             {
371                 return (int)GetValue(MaxLengthProperty);
372             }
373             set
374             {
375                 SetValue(MaxLengthProperty, value);
376                 NotifyPropertyChanged();
377             }
378         }
379
380         /// <summary>
381         /// The ExceedPolicy property.
382         /// </summary>
383         /// <since_tizen> 3 </since_tizen>
384         public int ExceedPolicy
385         {
386             get
387             {
388                 return (int)GetValue(ExceedPolicyProperty);
389             }
390             set
391             {
392                 SetValue(ExceedPolicyProperty, value);
393                 NotifyPropertyChanged();
394             }
395         }
396
397         /// <summary>
398         /// The HorizontalAlignment property.
399         /// </summary>
400         /// <since_tizen> 3 </since_tizen>
401         public HorizontalAlignment HorizontalAlignment
402         {
403             get
404             {
405                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
406             }
407             set
408             {
409                 SetValue(HorizontalAlignmentProperty, value);
410                 NotifyPropertyChanged();
411             }
412         }
413
414         /// <summary>
415         /// The VerticalAlignment property.
416         /// </summary>
417         /// <since_tizen> 3 </since_tizen>
418         public VerticalAlignment VerticalAlignment
419         {
420             get
421             {
422                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
423             }
424             set
425             {
426                 SetValue(VerticalAlignmentProperty, value);
427                 NotifyPropertyChanged();
428                 NotifyPropertyChanged();
429             }
430         }
431
432         /// <summary>
433         /// The TextColor property.
434         /// </summary>
435         /// <remarks>
436         /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
437         /// </remarks>
438         /// <since_tizen> 3 </since_tizen>
439         public Color TextColor
440         {
441             get
442             {
443                 Color temp = (Color)GetValue(TextColorProperty);
444                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
445             }
446             set
447             {
448                 SetValue(TextColorProperty, value);
449                 NotifyPropertyChanged();
450             }
451         }
452
453         /// <summary>
454         /// The PlaceholderTextColor property.
455         /// </summary>
456         /// <remarks>
457         /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
458         /// </remarks>
459         /// <since_tizen> 3 </since_tizen>
460         public Vector4 PlaceholderTextColor
461         {
462             get
463             {
464                 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
465                 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
466             }
467             set
468             {
469                 SetValue(PlaceholderTextColorProperty, value);
470                 NotifyPropertyChanged();
471             }
472         }
473
474         /// <summary>
475         /// The ShadowOffset property.
476         /// </summary>
477         /// <since_tizen> 3 </since_tizen>
478         /// <remarks>
479         /// Deprecated.(API Level 6) Use Shadow instead.
480         /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
481         /// </remarks>
482         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
483         public Vector2 ShadowOffset
484         {
485             get
486             {
487                 PropertyMap map = new PropertyMap();
488                 GetProperty(TextField.Property.SHADOW).Get(map);
489                 Vector2 shadowOffset = new Vector2();
490                 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
491                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
492             }
493             set
494             {
495                 PropertyMap temp = new PropertyMap();
496                 temp.Insert("offset", new PropertyValue(value));
497                 SetValue(ShadowProperty, temp);
498                 NotifyPropertyChanged();
499             }
500         }
501
502         /// <summary>
503         /// The ShadowColor property.
504         /// </summary>
505         /// <since_tizen> 3 </since_tizen>
506         /// <remarks>
507         /// Deprecated.(API Level 6) Use Shadow instead.
508         /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
509         /// </remarks>
510         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
511         public Vector4 ShadowColor
512         {
513             get
514             {
515                 PropertyMap map = new PropertyMap();
516                 GetProperty(TextField.Property.SHADOW).Get(map);
517                 Vector4 shadowColor = new Vector4();
518                 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
519                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
520             }
521             set
522             {
523                 PropertyMap temp = new PropertyMap();
524                 temp.Insert("color", new PropertyValue(value));
525                 SetValue(ShadowProperty, temp);
526                 NotifyPropertyChanged();
527             }
528         }
529
530         /// <summary>
531         /// The PrimaryCursorColor property.
532         /// </summary>
533         /// <remarks>
534         /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
535         /// </remarks>
536         /// <since_tizen> 3 </since_tizen>
537         public Vector4 PrimaryCursorColor
538         {
539             get
540             {
541                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
542                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
543             }
544             set
545             {
546                 SetValue(PrimaryCursorColorProperty, value);
547                 NotifyPropertyChanged();
548             }
549         }
550
551         /// <summary>
552         /// The SecondaryCursorColor property.
553         /// </summary>
554         /// <remarks>
555         /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
556         /// </remarks>
557         /// <since_tizen> 3 </since_tizen>
558         public Vector4 SecondaryCursorColor
559         {
560             get
561             {
562                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
563                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
564             }
565             set
566             {
567                 SetValue(SecondaryCursorColorProperty, value);
568                 NotifyPropertyChanged();
569             }
570         }
571
572         /// <summary>
573         /// The EnableCursorBlink property.
574         /// </summary>
575         /// <since_tizen> 3 </since_tizen>
576         public bool EnableCursorBlink
577         {
578             get
579             {
580                 return (bool)GetValue(EnableCursorBlinkProperty);
581             }
582             set
583             {
584                 SetValue(EnableCursorBlinkProperty, value);
585                 NotifyPropertyChanged();
586             }
587         }
588
589         /// <summary>
590         /// The CursorBlinkInterval property.
591         /// </summary>
592         /// <since_tizen> 3 </since_tizen>
593         public float CursorBlinkInterval
594         {
595             get
596             {
597                 return (float)GetValue(CursorBlinkIntervalProperty);
598             }
599             set
600             {
601                 SetValue(CursorBlinkIntervalProperty, value);
602                 NotifyPropertyChanged();
603             }
604         }
605
606         /// <summary>
607         /// The CursorBlinkDuration property.
608         /// </summary>
609         /// <since_tizen> 3 </since_tizen>
610         public float CursorBlinkDuration
611         {
612             get
613             {
614                 return (float)GetValue(CursorBlinkDurationProperty);
615             }
616             set
617             {
618                 SetValue(CursorBlinkDurationProperty, value);
619                 NotifyPropertyChanged();
620             }
621         }
622
623         /// <summary>
624         /// The CursorWidth property.
625         /// </summary>
626         /// <since_tizen> 3 </since_tizen>
627         public int CursorWidth
628         {
629             get
630             {
631                 return (int)GetValue(CursorWidthProperty);
632             }
633             set
634             {
635                 SetValue(CursorWidthProperty, value);
636                 NotifyPropertyChanged();
637             }
638         }
639
640         /// <summary>
641         /// The GrabHandleImage property.
642         /// </summary>
643         /// <since_tizen> 3 </since_tizen>
644         public string GrabHandleImage
645         {
646             get
647             {
648                 return (string)GetValue(GrabHandleImageProperty);
649             }
650             set
651             {
652                 SetValue(GrabHandleImageProperty, value);
653                 NotifyPropertyChanged();
654             }
655         }
656
657         /// <summary>
658         /// The GrabHandlePressedImage property.
659         /// </summary>
660         /// <since_tizen> 3 </since_tizen>
661         public string GrabHandlePressedImage
662         {
663             get
664             {
665                 return (string)GetValue(GrabHandlePressedImageProperty);
666             }
667             set
668             {
669                 SetValue(GrabHandlePressedImageProperty, value);
670                 NotifyPropertyChanged();
671             }
672         }
673
674         /// <summary>
675         /// The ScrollThreshold property.
676         /// </summary>
677         /// <since_tizen> 3 </since_tizen>
678         public float ScrollThreshold
679         {
680             get
681             {
682                 return (float)GetValue(ScrollThresholdProperty);
683             }
684             set
685             {
686                 SetValue(ScrollThresholdProperty, value);
687                 NotifyPropertyChanged();
688             }
689         }
690
691         /// <summary>
692         /// The ScrollSpeed property.
693         /// </summary>
694         /// <since_tizen> 3 </since_tizen>
695         public float ScrollSpeed
696         {
697             get
698             {
699                 return (float)GetValue(ScrollSpeedProperty);
700             }
701             set
702             {
703                 SetValue(ScrollSpeedProperty, value);
704                 NotifyPropertyChanged();
705             }
706         }
707
708         /// <summary>
709         /// The SelectionHandleImageLeft property.
710         /// The selectionHandleImageLeft map contains the following key :<br />
711         /// <list type="table">
712         /// <item><term>filename (string)</term><description>The path of image file</description></item>
713         /// </list>
714         /// </summary>
715         /// <since_tizen> 3 </since_tizen>
716         public PropertyMap SelectionHandleImageLeft
717         {
718             get
719             {
720                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
721             }
722             set
723             {
724                 SetValue(SelectionHandleImageLeftProperty, value);
725                 NotifyPropertyChanged();
726             }
727         }
728
729         /// <summary>
730         /// The SelectionHandleImageRight property.
731         /// The selectionHandleImageRight map contains the following key :<br />
732         /// <list type="table">
733         /// <item><term>filename (string)</term><description>The path of image file</description></item>
734         /// </list>
735         /// </summary>
736         /// <since_tizen> 3 </since_tizen>
737         public PropertyMap SelectionHandleImageRight
738         {
739             get
740             {
741                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
742             }
743             set
744             {
745                 SetValue(SelectionHandleImageRightProperty, value);
746                 NotifyPropertyChanged();
747             }
748         }
749
750         /// <summary>
751         /// Set SelectionHandleImage to TextField. <br />
752         /// </summary>
753         /// <param name="selectionHandleImage">The SelectionHandleImage</param>
754         /// <remarks>
755         /// SetSelectionHandleImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
756         /// </remarks>
757         /// <example>
758         /// The following example demonstrates how to use the SetSelectionHandleImage method.
759         /// <code>
760         /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
761         /// selectionHandleImage.LeftImageUrl = "handle_downleft.png";
762         /// selectionHandleImage.RightImageUrl = "handle_downright.png";
763         /// field.SetSelectionHandleImage(selectionHandleImage);
764         /// </code>
765         /// </example>
766         [EditorBrowsable(EditorBrowsableState.Never)]
767         public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
768         {
769             if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
770             {
771                 SetValue(SelectionHandleImageLeftProperty, TextUtils.GetFileNameMap(selectionHandleImage.LeftImageUrl));
772             }
773
774             if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
775             {
776                 SetValue(SelectionHandleImageRightProperty, TextUtils.GetFileNameMap(selectionHandleImage.RightImageUrl));
777             }
778         }
779
780         /// <summary>
781         /// Get SelectionHandleImage from TextField. <br />
782         /// </summary>
783         /// <returns>The SelectionHandleImage</returns>
784         /// <remarks>
785         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
786         /// </remarks>
787         [EditorBrowsable(EditorBrowsableState.Never)]
788         public SelectionHandleImage GetSelectionHandleImage()
789         {
790             return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleImageLeftProperty), (PropertyMap)GetValue(SelectionHandleImageRightProperty));
791         }
792
793         /// <summary>
794         /// The SelectionHandlePressedImageLeft property.
795         /// The selectionHandlePressedImageLeft map contains the following key :<br />
796         /// <list type="table">
797         /// <item><term>filename (string)</term><description>The path of image file</description></item>
798         /// </list>
799         /// </summary>
800         /// <since_tizen> 3 </since_tizen>
801         public PropertyMap SelectionHandlePressedImageLeft
802         {
803             get
804             {
805                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
806             }
807             set
808             {
809                 SetValue(SelectionHandlePressedImageLeftProperty, value);
810                 NotifyPropertyChanged();
811             }
812         }
813
814         /// <summary>
815         /// The SelectionHandlePressedImageRight property.
816         /// The selectionHandlePressedImageRight map contains the following key :<br />
817         /// <list type="table">
818         /// <item><term>filename (string)</term><description>The path of image file</description></item>
819         /// </list>
820         /// </summary>
821         /// <since_tizen> 3 </since_tizen>
822         public PropertyMap SelectionHandlePressedImageRight
823         {
824             get
825             {
826                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
827             }
828             set
829             {
830                 SetValue(SelectionHandlePressedImageRightProperty, value);
831                 NotifyPropertyChanged();
832             }
833         }
834
835         /// <summary>
836         /// Set SelectionHandlePressedImage to TextField. <br />
837         /// </summary>
838         /// <param name="selectionHandlePressedImage">The SelectionHandleImage</param>
839         /// <remarks>
840         /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
841         /// </remarks>
842         /// <example>
843         /// The following example demonstrates how to use the SetSelectionHandlePressedImage method.
844         /// <code>
845         /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage();
846         /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png";
847         /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png";
848         /// field.SetSelectionHandlePressedImage(selectionHandlePressedImage);
849         /// </code>
850         /// </example>
851         [EditorBrowsable(EditorBrowsableState.Never)]
852         public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandlePressedImage)
853         {
854             if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
855             {
856                 SetValue(SelectionHandlePressedImageLeftProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl));
857             }
858
859             if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
860             {
861                 SetValue(SelectionHandlePressedImageRightProperty, TextUtils.GetFileNameMap(selectionHandlePressedImage.RightImageUrl));
862             }
863         }
864
865         /// <summary>
866         /// Get SelectionHandlePressedImage from TextField. <br />
867         /// </summary>
868         /// <returns>The SelectionHandlePressedImage</returns>
869         /// <remarks>
870         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
871         /// </remarks>
872         [EditorBrowsable(EditorBrowsableState.Never)]
873         public SelectionHandleImage GetSelectionHandlePressedImage()
874         {
875             return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty), (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty));
876         }
877
878         /// <summary>
879         /// The SelectionHandleMarkerImageLeft property.
880         /// The selectionHandleMarkerImageLeft map contains the following key :<br />
881         /// <list type="table">
882         /// <item><term>filename (string)</term><description>The path of image file</description></item>
883         /// </list>
884         /// </summary>
885         /// <since_tizen> 3 </since_tizen>
886         public PropertyMap SelectionHandleMarkerImageLeft
887         {
888             get
889             {
890                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
891             }
892             set
893             {
894                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
895                 NotifyPropertyChanged();
896             }
897         }
898
899         /// <summary>
900         /// The SelectionHandleMarkerImageRight property.
901         /// The selectionHandleMarkerImageRight map contains the following key :<br />
902         /// <list type="table">
903         /// <item><term>filename (string)</term><description>The path of image file</description></item>
904         /// </list>
905         /// </summary>
906         /// <since_tizen> 3 </since_tizen>
907         public PropertyMap SelectionHandleMarkerImageRight
908         {
909             get
910             {
911                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
912             }
913             set
914             {
915                 SetValue(SelectionHandleMarkerImageRightProperty, value);
916                 NotifyPropertyChanged();
917             }
918         }
919
920         /// <summary>
921         /// Set SelectionHandleMarkerImage to TextField. <br />
922         /// </summary>
923         /// <param name="selectionHandleMarkerImage">The SelectionHandleImage</param>
924         /// <remarks>
925         /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
926         /// </remarks>
927         /// <example>
928         /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method.
929         /// <code>
930         /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage();
931         /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png";
932         /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png";
933         /// field.SetSelectionHandleMarkerImage(selectionHandleMarkerImage);
934         /// </code>
935         /// </example>
936         [EditorBrowsable(EditorBrowsableState.Never)]
937         public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMarkerImage)
938         {
939             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
940             {
941                 SetValue(SelectionHandleMarkerImageLeftProperty, TextUtils.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl));
942             }
943
944             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
945             {
946                 SetValue(SelectionHandleMarkerImageRightProperty, TextUtils.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl));
947             }
948         }
949
950         /// <summary>
951         /// Get SelectionHandleMarkerImage from TextField. <br />
952         /// </summary>
953         /// <returns>The SelectionHandleMarkerImage</returns>
954         /// <remarks>
955         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
956         /// </remarks>
957         [EditorBrowsable(EditorBrowsableState.Never)]
958         public SelectionHandleImage GetSelectionHandleMarkerImage()
959         {
960             return TextUtils.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty), (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty));
961         }
962
963         /// <summary>
964         /// The SelectionHighlightColor property.
965         /// </summary>
966         /// <remarks>
967         /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
968         /// </remarks>
969         /// <since_tizen> 3 </since_tizen>
970         public Vector4 SelectionHighlightColor
971         {
972             get
973             {
974                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
975                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
976             }
977             set
978             {
979                 SetValue(SelectionHighlightColorProperty, value);
980                 NotifyPropertyChanged();
981             }
982         }
983
984         /// <summary>
985         /// The DecorationBoundingBox property.
986         /// </summary>
987         /// <remarks>
988         /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
989         /// </remarks>
990         /// <since_tizen> 3 </since_tizen>
991         public Rectangle DecorationBoundingBox
992         {
993             get
994             {
995                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
996                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
997             }
998             set
999             {
1000                 SetValue(DecorationBoundingBoxProperty, value);
1001                 NotifyPropertyChanged();
1002             }
1003         }
1004
1005         /// <summary>
1006         /// The InputMethodSettings property.
1007         /// </summary>
1008         /// <remarks>
1009         /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
1010         /// </remarks>
1011         /// <example>
1012         /// The following example demonstrates how to set the InputMethodSettings property.
1013         /// <code>
1014         /// InputMethod method = new InputMethod();
1015         /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
1016         /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
1017         /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
1018         /// method.Variation = 1;
1019         /// textField.InputMethodSettings = method.OutputMap;
1020         /// </code>
1021         /// </example>
1022         /// <since_tizen> 3 </since_tizen>
1023         public PropertyMap InputMethodSettings
1024         {
1025             get
1026             {
1027                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
1028             }
1029             set
1030             {
1031                 SetValue(InputMethodSettingsProperty, value);
1032                 NotifyPropertyChanged();
1033             }
1034         }
1035
1036         /// <summary>
1037         /// The InputColor property.
1038         /// </summary>
1039         /// <remarks>
1040         /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
1041         /// </remarks>
1042         /// <since_tizen> 3 </since_tizen>
1043         public Vector4 InputColor
1044         {
1045             get
1046             {
1047                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
1048                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
1049             }
1050             set
1051             {
1052                 SetValue(InputColorProperty, value);
1053                 NotifyPropertyChanged();
1054             }
1055         }
1056
1057         /// <summary>
1058         /// The EnableMarkup property.
1059         /// </summary>
1060         /// <since_tizen> 3 </since_tizen>
1061         public bool EnableMarkup
1062         {
1063             get
1064             {
1065                 return (bool)GetValue(EnableMarkupProperty);
1066             }
1067             set
1068             {
1069                 SetValue(EnableMarkupProperty, value);
1070                 NotifyPropertyChanged();
1071             }
1072         }
1073
1074         /// <summary>
1075         /// The InputFontFamily property.
1076         /// </summary>
1077         /// <since_tizen> 3 </since_tizen>
1078         public string InputFontFamily
1079         {
1080             get
1081             {
1082                 return (string)GetValue(InputFontFamilyProperty);
1083             }
1084             set
1085             {
1086                 SetValue(InputFontFamilyProperty, value);
1087                 NotifyPropertyChanged();
1088             }
1089         }
1090
1091         /// <summary>
1092         /// The InputFontStyle property.
1093         /// The inputFontStyle map contains the following keys :<br />
1094         /// <list type="table">
1095         /// <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>
1096         /// <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>
1097         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
1098         /// </list>
1099         /// </summary>
1100         /// <since_tizen> 3 </since_tizen>
1101         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1102         public PropertyMap InputFontStyle
1103         {
1104             get
1105             {
1106                 return (PropertyMap)GetValue(InputFontStyleProperty);
1107             }
1108             set
1109             {
1110                 SetValue(InputFontStyleProperty, value);
1111                 NotifyPropertyChanged();
1112             }
1113         }
1114
1115         /// <summary>
1116         /// Set InputFontStyle to TextField. <br />
1117         /// </summary>
1118         /// <param name="fontStyle">The FontStyle</param>
1119         /// <remarks>
1120         /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
1121         /// </remarks>
1122         /// <example>
1123         /// The following example demonstrates how to use the SetInputFontStyle method.
1124         /// <code>
1125         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
1126         /// fontStyle.Width = FontWidthType.Expanded;
1127         /// fontStyle.Weight = FontWeightType.Bold;
1128         /// fontStyle.Slant = FontSlantType.Italic;
1129         /// field.SetInputFontStyle(fontStyle);
1130         /// </code>
1131         /// </example>
1132         [EditorBrowsable(EditorBrowsableState.Never)]
1133         public void SetInputFontStyle(FontStyle fontStyle)
1134         {
1135             SetValue(InputFontStyleProperty, TextUtils.GetFontStyleMap(fontStyle));
1136         }
1137
1138         /// <summary>
1139         /// Get InputFontStyle from TextField. <br />
1140         /// </summary>
1141         /// <returns>The FontStyle</returns>
1142         /// <remarks>
1143         /// <see cref="Tizen.NUI.Text.FontStyle"/>
1144         /// </remarks>
1145         [EditorBrowsable(EditorBrowsableState.Never)]
1146         public FontStyle GetInputFontStyle()
1147         {
1148             return TextUtils.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty));
1149         }
1150
1151         /// <summary>
1152         /// The InputPointSize property.
1153         /// </summary>
1154         /// <since_tizen> 3 </since_tizen>
1155         public float InputPointSize
1156         {
1157             get
1158             {
1159                 return (float)GetValue(InputPointSizeProperty);
1160             }
1161             set
1162             {
1163                 SetValue(InputPointSizeProperty, value);
1164                 NotifyPropertyChanged();
1165             }
1166         }
1167
1168         /// <summary>
1169         /// The Underline property.
1170         /// The underline map contains the following keys :<br />
1171         /// <list type="table">
1172         /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
1173         /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
1174         /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
1175         /// </list>
1176         /// </summary>
1177         /// <since_tizen> 3 </since_tizen>
1178         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1179         public PropertyMap Underline
1180         {
1181             get
1182             {
1183                 return (PropertyMap)GetValue(UnderlineProperty);
1184             }
1185             set
1186             {
1187                 SetValue(UnderlineProperty, value);
1188                 NotifyPropertyChanged();
1189             }
1190         }
1191
1192         /// <summary>
1193         /// Set Underline to TextField. <br />
1194         /// </summary>
1195         /// <param name="underline">The Underline</param>
1196         /// <remarks>
1197         /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
1198         /// </remarks>
1199         /// <example>
1200         /// The following example demonstrates how to use the SetUnderline method.
1201         /// <code>
1202         /// var underline = new Tizen.NUI.Text.Underline();
1203         /// underline.Enable = true;
1204         /// underline.Color = new Color("#3498DB");
1205         /// underline.Height = 2.0f;
1206         /// field.SetUnderline(underline);
1207         /// </code>
1208         /// </example>
1209         [EditorBrowsable(EditorBrowsableState.Never)]
1210         public void SetUnderline(Underline underline)
1211         {
1212             SetValue(UnderlineProperty, TextUtils.GetUnderlineMap(underline));
1213         }
1214
1215         /// <summary>
1216         /// Get Underline from TextField. <br />
1217         /// </summary>
1218         /// <returns>The Underline</returns>
1219         /// <remarks>
1220         /// <see cref="Tizen.NUI.Text.Underline"/>
1221         /// </remarks>
1222         [EditorBrowsable(EditorBrowsableState.Never)]
1223         public Underline GetUnderline()
1224         {
1225             return TextUtils.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty));
1226         }
1227
1228         /// <summary>
1229         /// The InputUnderline property.
1230         /// </summary>
1231         /// <since_tizen> 3 </since_tizen>
1232         public string InputUnderline
1233         {
1234             get
1235             {
1236                 return (string)GetValue(InputUnderlineProperty);
1237             }
1238             set
1239             {
1240                 SetValue(InputUnderlineProperty, value);
1241                 NotifyPropertyChanged();
1242             }
1243         }
1244
1245         /// <summary>
1246         /// The Shadow property.
1247         /// The shadow map contains the following keys :<br />
1248         /// <list type="table">
1249         /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1250         /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1251         /// <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>
1252         /// </list>
1253         /// </summary>
1254         /// <since_tizen> 3 </since_tizen>
1255         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1256         public PropertyMap Shadow
1257         {
1258             get
1259             {
1260                 return (PropertyMap)GetValue(ShadowProperty);
1261             }
1262             set
1263             {
1264                 SetValue(ShadowProperty, value);
1265                 NotifyPropertyChanged();
1266             }
1267         }
1268
1269         /// <summary>
1270         /// Set Shadow to TextField. <br />
1271         /// </summary>
1272         /// <param name="shadow">The Shadow</param>
1273         /// <remarks>
1274         /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
1275         /// </remarks>
1276         /// <example>
1277         /// The following example demonstrates how to use the SetShadow method.
1278         /// <code>
1279         /// var shadow = new Tizen.NUI.Text.Shadow();
1280         /// shadow.Offset = new Vector2(3, 3);
1281         /// shadow.Color = new Color("#F1C40F");
1282         /// field.SetShadow(shadow);
1283         /// </code>
1284         /// </example>
1285         [EditorBrowsable(EditorBrowsableState.Never)]
1286         public void SetShadow(Tizen.NUI.Text.Shadow shadow)
1287         {
1288             SetValue(ShadowProperty, TextUtils.GetShadowMap(shadow));
1289         }
1290
1291         /// <summary>
1292         /// Get Shadow from TextField. <br />
1293         /// </summary>
1294         /// <returns>The Shadow</returns>
1295         /// <remarks>
1296         /// <see cref="Tizen.NUI.Text.Shadow"/>
1297         /// </remarks>
1298         [EditorBrowsable(EditorBrowsableState.Never)]
1299         public Tizen.NUI.Text.Shadow GetShadow()
1300         {
1301             return TextUtils.GetShadowStruct((PropertyMap)GetValue(ShadowProperty));
1302         }
1303
1304         /// <summary>
1305         /// The InputShadow property.
1306         /// </summary>
1307         /// <since_tizen> 3 </since_tizen>
1308         public string InputShadow
1309         {
1310             get
1311             {
1312                 return (string)GetValue(InputShadowProperty);
1313             }
1314             set
1315             {
1316                 SetValue(InputShadowProperty, value);
1317                 NotifyPropertyChanged();
1318             }
1319         }
1320
1321         /// <summary>
1322         /// The Emboss property.
1323         /// </summary>
1324         /// <since_tizen> 3 </since_tizen>
1325         public string Emboss
1326         {
1327             get
1328             {
1329                 return (string)GetValue(EmbossProperty);
1330             }
1331             set
1332             {
1333                 SetValue(EmbossProperty, value);
1334                 NotifyPropertyChanged();
1335             }
1336         }
1337
1338         /// <summary>
1339         /// The InputEmboss property.
1340         /// </summary>
1341         /// <since_tizen> 3 </since_tizen>
1342         public string InputEmboss
1343         {
1344             get
1345             {
1346                 return (string)GetValue(InputEmbossProperty);
1347             }
1348             set
1349             {
1350                 SetValue(InputEmbossProperty, value);
1351                 NotifyPropertyChanged();
1352             }
1353         }
1354
1355         /// <summary>
1356         /// The Outline property.
1357         /// The outline map contains the following keys :<br />
1358         /// <list type="table">
1359         /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1360         /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1361         /// </list>
1362         /// </summary>
1363         /// <since_tizen> 3 </since_tizen>
1364         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1365         public PropertyMap Outline
1366         {
1367             get
1368             {
1369                 return (PropertyMap)GetValue(OutlineProperty);
1370             }
1371             set
1372             {
1373                 SetValue(OutlineProperty, value);
1374                 NotifyPropertyChanged();
1375             }
1376         }
1377
1378         /// <summary>
1379         /// Set Outline to TextField. <br />
1380         /// </summary>
1381         /// <param name="outline">The Outline</param>
1382         /// <remarks>
1383         /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
1384         /// </remarks>
1385         /// <example>
1386         /// The following example demonstrates how to use the SetOutline method.
1387         /// <code>
1388         /// var outline = new Tizen.NUI.Text.Outline();
1389         /// outline.Width = 2.0f;
1390         /// outline.Color = new Color("#45B39D");
1391         /// field.SetOutline(outline);
1392         /// </code>
1393         /// </example>
1394         [EditorBrowsable(EditorBrowsableState.Never)]
1395         public void SetOutline(Outline outline)
1396         {
1397             SetValue(OutlineProperty, TextUtils.GetOutlineMap(outline));
1398         }
1399
1400         /// <summary>
1401         /// Get Outline from TextField. <br />
1402         /// </summary>
1403         /// <returns>The Outline</returns>
1404         /// <remarks>
1405         /// <see cref="Tizen.NUI.Text.Outline"/>
1406         /// </remarks>
1407         [EditorBrowsable(EditorBrowsableState.Never)]
1408         public Outline GetOutline()
1409         {
1410             return TextUtils.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty));
1411         }
1412
1413         /// <summary>
1414         /// The InputOutline property.
1415         /// </summary>
1416         /// <since_tizen> 3 </since_tizen>
1417         public string InputOutline
1418         {
1419             get
1420             {
1421                 return (string)GetValue(InputOutlineProperty);
1422             }
1423             set
1424             {
1425                 SetValue(InputOutlineProperty, value);
1426                 NotifyPropertyChanged();
1427             }
1428         }
1429
1430         /// <summary>
1431         /// The HiddenInputSettings property.
1432         /// The hiddenInputSettings map contains the following keys :<br />
1433         /// <list type="table">
1434         /// <item><term>HiddenInputProperty.Mode (int)</term><description>The mode for input text display (Use HiddenInputModeType)</description></item>
1435         /// <item><term>HiddenInputProperty.SubstituteCharacter (int)</term><description>All input characters are substituted by this character</description></item>
1436         /// <item><term>HiddenInputProperty.SubstituteCount (int)</term><description>Length of text to show or hide, available when HideCount/ShowCount mode is used</description></item>
1437         /// <item><term>HiddenInputProperty.ShowLastCharacterDuration (int)</term><description>Hide last character after this duration, available when ShowLastCharacter mode</description></item>
1438         /// </list>
1439         /// </summary>
1440         /// <remarks>
1441         /// See <see cref="HiddenInputProperty"/> and <see cref="HiddenInputModeType"/> for a detailed description.
1442         /// </remarks>
1443         /// <example>
1444         /// The following example demonstrates how to set the HiddenInputSettings property.
1445         /// <code>
1446         /// PropertyMap map = new PropertyMap();
1447         /// map.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter));
1448         /// map.Add(HiddenInputProperty.ShowLastCharacterDuration, new PropertyValue(500));
1449         /// map.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x2A));
1450         /// textField.HiddenInputSettings = map;
1451         /// </code>
1452         /// </example>
1453         /// <since_tizen> 3 </since_tizen>
1454         public Tizen.NUI.PropertyMap HiddenInputSettings
1455         {
1456             get
1457             {
1458                 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1459             }
1460             set
1461             {
1462                 SetValue(HiddenInputSettingsProperty, value);
1463                 NotifyPropertyChanged();
1464             }
1465         }
1466
1467         /// <summary>
1468         /// Set HiddenInput to TextField. <br />
1469         /// </summary>
1470         /// <param name="hiddenInput">The HiddenInput</param>
1471         /// <remarks>
1472         /// SetHiddenInput specifies the requested font style through <see cref="Tizen.NUI.Text.HiddenInput"/>. <br />
1473         /// </remarks>
1474         /// <example>
1475         /// The following example demonstrates how to use the SetHiddenInput method.
1476         /// <code>
1477         /// var hiddenInput = new Tizen.NUI.Text.HiddenInput();
1478         /// hiddenInput.Mode = HiddenInputModeType.ShowLastCharacter;
1479         /// hiddenInput.SubstituteCharacter = '★';
1480         /// hiddenInput.SubstituteCount = 0;
1481         /// hiddenInput.ShowLastCharacterDuration = 1000;
1482         /// field.SetHiddenInput(hiddenInput);
1483         /// </code>
1484         /// </example>
1485         [EditorBrowsable(EditorBrowsableState.Never)]
1486         public void SetHiddenInput(HiddenInput hiddenInput)
1487         {
1488             SetValue(HiddenInputSettingsProperty, TextUtils.GetHiddenInputMap(hiddenInput));
1489         }
1490
1491         /// <summary>
1492         /// Get HiddenInput from TextField. <br />
1493         /// </summary>
1494         /// <returns>The HiddenInput</returns>
1495         /// <remarks>
1496         /// <see cref="Tizen.NUI.Text.HiddenInput"/>
1497         /// </remarks>
1498         [EditorBrowsable(EditorBrowsableState.Never)]
1499         public HiddenInput GetHiddenInput()
1500         {
1501             return TextUtils.GetHiddenInputStruct((PropertyMap)GetValue(HiddenInputSettingsProperty));
1502         }
1503
1504         /// <summary>
1505         /// The PixelSize property.
1506         /// </summary>
1507         /// <since_tizen> 3 </since_tizen>
1508         public float PixelSize
1509         {
1510             get
1511             {
1512                 return (float)GetValue(PixelSizeProperty);
1513             }
1514             set
1515             {
1516                 SetValue(PixelSizeProperty, value);
1517                 NotifyPropertyChanged();
1518             }
1519         }
1520
1521         /// <summary>
1522         /// The Enable selection property.
1523         /// </summary>
1524         /// <since_tizen> 3 </since_tizen>
1525         public bool EnableSelection
1526         {
1527             get
1528             {
1529                 return (bool)GetValue(EnableSelectionProperty);
1530             }
1531             set
1532             {
1533                 SetValue(EnableSelectionProperty, value);
1534                 NotifyPropertyChanged();
1535             }
1536         }
1537
1538         /// <summary>
1539         /// The Enable selection property.
1540         /// </summary>
1541         /// <since_tizen> 6 </since_tizen>
1542         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1543         [EditorBrowsable(EditorBrowsableState.Never)]
1544         public bool EnableGrabHandle
1545         {
1546             get
1547             {
1548                 return (bool)GetValue(EnableGrabHandleProperty);
1549             }
1550             set
1551             {
1552                 SetValue(EnableGrabHandleProperty, value);
1553                 NotifyPropertyChanged();
1554             }
1555         }
1556
1557         /// <summary>
1558         /// The Enable selection property.
1559         /// </summary>
1560         /// <since_tizen> 6 </since_tizen>
1561         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1562         [EditorBrowsable(EditorBrowsableState.Never)]
1563         public bool EnableGrabHandlePopup
1564         {
1565             get
1566             {
1567                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1568             }
1569             set
1570             {
1571                 SetValue(EnableGrabHandlePopupProperty, value);
1572                 NotifyPropertyChanged();
1573             }
1574         }
1575
1576         /// <summary>
1577         /// The Selected Text property.
1578         /// </summary>
1579         /// <since_tizen> 8 </since_tizen>
1580         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1581         [EditorBrowsable(EditorBrowsableState.Never)]
1582         public string SelectedText
1583         {
1584             get
1585             {
1586                 string temp;
1587                 GetProperty(TextField.Property.SelectedText).Get(out temp);
1588                 return temp;
1589             }
1590         }
1591
1592         /// <summary>
1593         /// The start index for selection.
1594         /// </summary>
1595         /// <since_tizen> 8 </since_tizen>
1596         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1597         [EditorBrowsable(EditorBrowsableState.Never)]
1598         public int SelectedTextStart
1599         {
1600             get
1601             {
1602                 int temp;
1603                 GetProperty(TextField.Property.SelectedTextStart).Get(out temp);
1604                 return temp;
1605             }
1606             set
1607             {
1608                 SetProperty(TextField.Property.SelectedTextStart, new PropertyValue(value));
1609                 NotifyPropertyChanged();
1610             }
1611         }
1612
1613         /// <summary>
1614         /// The end index for selection.
1615         /// </summary>
1616         /// <since_tizen> 8 </since_tizen>
1617         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1618         [EditorBrowsable(EditorBrowsableState.Never)]
1619         public int SelectedTextEnd
1620         {
1621             get
1622             {
1623                 int temp;
1624                 GetProperty(TextField.Property.SelectedTextEnd).Get(out temp);
1625                 return temp;
1626             }
1627             set
1628             {
1629                 SetProperty(TextField.Property.SelectedTextEnd, new PropertyValue(value));
1630                 NotifyPropertyChanged();
1631             }
1632         }
1633
1634         /// <summary>
1635         /// Enable editing in text control.
1636         /// </summary>
1637         /// <since_tizen> 8 </since_tizen>
1638         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1639         [EditorBrowsable(EditorBrowsableState.Never)]
1640         public bool EnableEditing
1641         {
1642             get
1643             {
1644                 bool temp;
1645                 GetProperty(TextField.Property.EnableEditing).Get(out temp);
1646                 return temp;
1647             }
1648             set
1649             {
1650                 SetProperty(TextField.Property.EnableEditing, new PropertyValue(value));
1651                 NotifyPropertyChanged();
1652             }
1653         }
1654
1655         /// <summary>
1656         /// Specify primary cursor (caret) position in text control.
1657         /// </summary>
1658         [EditorBrowsable(EditorBrowsableState.Never)]
1659         public int PrimaryCursorPosition
1660         {
1661             get
1662             {
1663                 int temp;
1664                 using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
1665                 {
1666                     propertyValue.Get(out temp);
1667                 }
1668                 return temp;
1669             }
1670             set
1671             {
1672                 using (PropertyValue propertyValue = new PropertyValue(value))
1673                 {
1674                     SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue);
1675                     NotifyPropertyChanged();
1676                 }
1677             }
1678         }
1679
1680         /// <summary>
1681         /// The GrabHandleColor property.
1682         /// </summary>
1683         /// <remarks>
1684         /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
1685         /// </remarks>
1686         [EditorBrowsable(EditorBrowsableState.Never)]
1687         public Color GrabHandleColor
1688         {
1689             get
1690             {
1691                 Color temp = (Color)GetValue(GrabHandleColorProperty);
1692                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1693             }
1694             set
1695             {
1696                 SetValue(GrabHandleColorProperty, value);
1697                 NotifyPropertyChanged();
1698             }
1699         }
1700
1701         /// <summary>
1702         /// The ellipsis position of the text.
1703         /// The ellipsis position type when the text size over the layout size.<br />
1704         /// The ellipsis position: End, Start or Middle.<br />
1705         /// </summary>
1706         [EditorBrowsable(EditorBrowsableState.Never)]
1707         public EllipsisPosition EllipsisPosition
1708         {
1709             get
1710             {
1711                 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
1712             }
1713             set
1714             {
1715                 SetValue(EllipsisPositionProperty, value);
1716                 NotifyPropertyChanged();
1717             }
1718         }
1719
1720         /// <summary>
1721         /// Set InputFilter to TextField. <br />
1722         /// </summary>
1723         /// <param name="inputFilter">The InputFilter</param>
1724         /// <remarks>
1725         /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
1726         /// Users can set the Accepted or Rejected regular expression set, or both. <br />
1727         /// If both are used, Rejected has higher priority. <br />
1728         /// The character set must follow the regular expression rules. <br />
1729         /// Behaviour can not be guaranteed for incorrect grammars. <br />
1730         /// Refer the link below for detailed rules. <br />
1731         /// The functions in std::regex library use the ECMAScript grammar: <br />
1732         /// http://cplusplus.com/reference/regex/ECMAScript/ <br />
1733         /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
1734         /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description. <br />
1735         /// </remarks>
1736         /// <example>
1737         /// The following example demonstrates how to use the SetInputFilter method.
1738         /// <code>
1739         /// var inputFilter = new Tizen.NUI.Text.InputFilter();
1740         /// inputFilter.Accepted = @"[\d]"; // accept whole digits
1741         /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
1742         /// field.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
1743         /// </code>
1744         /// </example>
1745         [EditorBrowsable(EditorBrowsableState.Never)]
1746         public void SetInputFilter(InputFilter inputFilter)
1747         {
1748             SetProperty(TextField.Property.InputFilter, new PropertyValue(TextUtils.GetInputFilterMap(inputFilter)));
1749         }
1750
1751         /// <summary>
1752         /// Get InputFilter from TextField. <br />
1753         /// </summary>
1754         /// <returns>The InputFilter</returns>
1755         /// <remarks>
1756         /// <see cref="Tizen.NUI.Text.InputFilter"/>
1757         /// </remarks>
1758         [EditorBrowsable(EditorBrowsableState.Never)]
1759         public InputFilter GetInputFilter()
1760         {
1761             var map = new PropertyMap();
1762             GetProperty(TextField.Property.InputFilter).Get(map);
1763             return TextUtils.GetInputFilterStruct(map);
1764         }
1765
1766         /// <summary>
1767         /// The Placeholder property.
1768         /// The placeholder map contains the following keys :<br />
1769         /// <list type="table">
1770         /// <item><term>text (string)</term><description>The text to display when the TextField is empty and inactive</description></item>
1771         /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1772         /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1773         /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1774         /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1775         /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1776         /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1777         /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1778         /// </list>
1779         /// </summary>
1780         /// <example>
1781         /// The following example demonstrates how to set the Placeholder property.
1782         /// <code>
1783         /// PropertyMap propertyMap = new PropertyMap();
1784         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1785         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1786         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1787         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1788         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1789         ///
1790         /// PropertyMap fontStyleMap = new PropertyMap();
1791         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1792         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1793         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1794         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1795         ///
1796         /// TextField field = new TextField();
1797         /// field.Placeholder = propertyMap;
1798         /// </code>
1799         /// </example>
1800         /// <since_tizen> 3 </since_tizen>
1801         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1802         public Tizen.NUI.PropertyMap Placeholder
1803         {
1804             get
1805             {
1806                 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
1807                 PropertyValue value = null;
1808
1809                 // text
1810                 value = map.Find(0);
1811                 if (null != value)
1812                 {
1813                     value.Get(out string text);
1814                     map.Add("text", new PropertyValue(text));
1815                 }
1816
1817                 // textFocused
1818                 value = map.Find(1);
1819                 if (null != value)
1820                 {
1821                     value.Get(out string textFocused);
1822                     map.Add("textFocused", new PropertyValue(textFocused));
1823                 }
1824
1825                 // color
1826                 value = map.Find(2);
1827                 if (null != value)
1828                 {
1829                     Color color = new Color();
1830                     value.Get(color);
1831                     map.Add("color", new PropertyValue(color));
1832                 }
1833
1834                 // fontFamily
1835                 value = map.Find(3);
1836                 if (null != value)
1837                 {
1838                     value.Get(out string fontFamily);
1839                     map.Add("fontFamily", new PropertyValue(fontFamily));
1840                 }
1841
1842                 // fontStyle
1843                 value = map.Find(4);
1844                 if (null != value)
1845                 {
1846                     PropertyMap fontStyle = new PropertyMap();
1847                     value.Get(fontStyle);
1848                     map.Add("fontStyle", new PropertyValue(fontStyle));
1849                 }
1850
1851                 // pointSize
1852                 value = map.Find(5);
1853                 if (null != value)
1854                 {
1855                     value.Get(out float pointSize);
1856                     map.Add("pointSize", new PropertyValue(pointSize));
1857                 }
1858
1859                 // pixelSize
1860                 value = map.Find(6);
1861                 if (null != value)
1862                 {
1863                     value.Get(out float pixelSize);
1864                     map.Add("pixelSize", new PropertyValue(pixelSize));
1865                 }
1866
1867                 // ellipsis
1868                 value = map.Find(7);
1869                 if (null != value)
1870                 {
1871                     value.Get(out bool ellipsis);
1872                     map.Add("ellipsis", new PropertyValue(ellipsis));
1873                 }
1874
1875                 return map;
1876             }
1877             set
1878             {
1879                 SetValue(PlaceholderProperty, value);
1880                 NotifyPropertyChanged();
1881             }
1882         }
1883
1884         /// <summary>
1885         /// Set Placeholder to TextField. <br />
1886         /// </summary>
1887         /// <param name="placeholder">The Placeholder</param>
1888         /// <remarks>
1889         /// SetPlaceholder specifies the attributes of the placeholder property through <see cref="Tizen.NUI.Text.Placeholder"/>. <br />
1890         /// </remarks>
1891         /// <example>
1892         /// The following example demonstrates how to use the SetPlaceholder method.
1893         /// <code>
1894         /// var placeholder = new Tizen.NUI.Text.Placeholder();
1895         /// placeholder.Text = "placeholder text";
1896         /// placeholder.TextFocused = "placeholder textFocused";
1897         /// placeholder.Color = new Color("#45B39D");
1898         /// placeholder.FontFamily = "BreezeSans";
1899         /// placeholder.FontStyle = new Tizen.NUI.Text.FontStyle()
1900         /// {
1901         ///     Width = FontWidthType.Expanded,
1902         ///     Weight = FontWeightType.ExtraLight,
1903         ///     Slant = FontSlantType.Italic,
1904         /// };
1905         /// placeholder.PointSize = 25.0f;
1906         /// //placeholder.PixelSize = 50.0f;
1907         /// placeholder.Ellipsis = true;
1908         /// field.SetPlaceholder(placeholder);
1909         /// </code>
1910         /// </example>
1911         [EditorBrowsable(EditorBrowsableState.Never)]
1912         public void SetPlaceholder(Placeholder placeholder)
1913         {
1914             SetValue(PlaceholderProperty, TextUtils.GetPlaceholderMap(placeholder));
1915         }
1916
1917         /// <summary>
1918         /// Get Placeholder from TextField. <br />
1919         /// </summary>
1920         /// <returns>The Placeholder</returns>
1921         /// <remarks>
1922         /// <see cref="Tizen.NUI.Text.Placeholder"/>
1923         /// </remarks>
1924         [EditorBrowsable(EditorBrowsableState.Never)]
1925         public Placeholder GetPlaceholder()
1926         {
1927             return TextUtils.GetPlaceholderStruct((PropertyMap)GetValue(PlaceholderProperty));
1928         }
1929
1930         /// <summary>
1931         /// The Ellipsis property.<br />
1932         /// Enable or disable the ellipsis.<br />
1933         /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1934         /// </summary>
1935         /// <since_tizen> 4 </since_tizen>
1936         public bool Ellipsis
1937         {
1938             get
1939             {
1940                 return (bool)GetValue(EllipsisProperty);
1941             }
1942             set
1943             {
1944                 SetValue(EllipsisProperty, value);
1945                 NotifyPropertyChanged();
1946             }
1947         }
1948
1949         /// <summary>
1950         /// Enables selection of the text using the Shift key.
1951         /// </summary>
1952         /// <since_tizen> 5 </since_tizen>
1953         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1954         [EditorBrowsable(EditorBrowsableState.Never)]
1955         public bool EnableShiftSelection
1956         {
1957             get
1958             {
1959                 return (bool)GetValue(EnableShiftSelectionProperty);
1960             }
1961             set
1962             {
1963                 SetValue(EnableShiftSelectionProperty, value);
1964                 NotifyPropertyChanged();
1965             }
1966         }
1967
1968         /// <summary>
1969         /// The text alignment to match the direction of the system language.
1970         /// </summary>
1971         /// <since_tizen> 6 </since_tizen>
1972         public bool MatchSystemLanguageDirection
1973         {
1974             get
1975             {
1976                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1977             }
1978             set
1979             {
1980                 SetValue(MatchSystemLanguageDirectionProperty, value);
1981                 NotifyPropertyChanged();
1982             }
1983         }
1984
1985         /// <summary>
1986         /// The FontSizeScale property. <br />
1987         /// The default value is 1.0. <br />
1988         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1989         /// </summary>
1990         /// <since_tizen> 9 </since_tizen>
1991         public float FontSizeScale
1992         {
1993             get
1994             {
1995                 return fontSizeScale;
1996             }
1997             set
1998             {
1999                 float newFontSizeScale;
2000
2001                 if (fontSizeScale == value) return;
2002
2003                 fontSizeScale = value;
2004                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
2005                 {
2006                     SystemSettingsFontSize systemSettingsFontSize;
2007
2008                     try
2009                     {
2010                         systemSettingsFontSize = SystemSettings.FontSize;
2011                     }
2012                     catch (Exception e)
2013                     {
2014                         Console.WriteLine("{0} Exception caught.", e);
2015                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
2016                     }
2017                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
2018                     addFontSizeChangedCallback();
2019                 }
2020                 else
2021                 {
2022                     newFontSizeScale = fontSizeScale;
2023                     removeFontSizeChangedCallback();
2024                 }
2025
2026                 SetValue(FontSizeScaleProperty, newFontSizeScale);
2027                 NotifyPropertyChanged();
2028             }
2029         }
2030
2031         /// Only used by the IL of xaml, will never changed to not hidden.
2032         [EditorBrowsable(EditorBrowsableState.Never)]
2033         public override bool IsCreateByXaml
2034         {
2035             get
2036             {
2037                 return base.IsCreateByXaml;
2038             }
2039             set
2040             {
2041                 base.IsCreateByXaml = value;
2042
2043                 if (value == true)
2044                 {
2045                     this.TextChanged += (obj, e) =>
2046                     {
2047                         this.Text = e.TextField.Text;
2048                     };
2049                 }
2050             }
2051         }
2052
2053         /// <summary>
2054         /// Get the InputMethodContext instance.
2055         /// </summary>
2056         /// <returns>The InputMethodContext instance.</returns>
2057         /// <since_tizen> 5 </since_tizen>
2058         public InputMethodContext GetInputMethodContext()
2059         {
2060             if (inputMethodCotext == null)
2061             {
2062                 /*Avoid raising InputMethodContext reference count.*/
2063                 inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true);
2064                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2065             }
2066             return inputMethodCotext;
2067         }
2068
2069         /// <summary>
2070         /// Select the whole text.
2071         /// </summary>
2072         /// <since_tizen> 6 </since_tizen>
2073         /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
2074         [EditorBrowsable(EditorBrowsableState.Never)]
2075         public void SelectWholeText()
2076         {
2077             Interop.TextField.SelectWholeText(SwigCPtr);
2078             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2079         }
2080
2081         /// <summary>
2082         /// Select text from start to end index.
2083         /// </summary>
2084         /// <param name="start">The start index for selection.</param>
2085         /// <param name="end">The end index for selection.</param>
2086         [EditorBrowsable(EditorBrowsableState.Never)]
2087         public void SelectText(uint start, uint end)
2088         {
2089             Interop.TextField.SelectText(SwigCPtr, start, end);
2090             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2091         }
2092
2093         /// <summary>
2094         /// Clear selection of the text.
2095         /// </summary>
2096         /// <since_tizen> 8 </since_tizen>
2097         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
2098         [EditorBrowsable(EditorBrowsableState.Never)]
2099         public void SelectNone()
2100         {
2101             _ = Interop.TextField.SelectNone(SwigCPtr);
2102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2103         }
2104
2105         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
2106         {
2107             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
2108         }
2109
2110         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
2111         {
2112             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));
2113             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2114             return ret;
2115         }
2116
2117         /// <summary>
2118         /// Dispose.
2119         /// </summary>
2120         /// <since_tizen> 3 </since_tizen>
2121         protected override void Dispose(DisposeTypes type)
2122         {
2123             if (disposed)
2124             {
2125                 DisposeQueue.Instance.Add(this);
2126                 return;
2127             }
2128
2129             if (systemlangTextFlag)
2130             {
2131                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
2132             }
2133
2134             removeFontSizeChangedCallback();
2135
2136             if (type == DisposeTypes.Explicit)
2137             {
2138                 //Called by User
2139                 //Release your own managed resources here.
2140                 //You should release all of your own disposable objects here.
2141             }
2142
2143             //Release your own unmanaged resources here.
2144             //You should not access any managed member here except static instance.
2145             //because the execution order of Finalizes is non-deterministic.
2146             if (this.HasBody())
2147             {
2148                 if (textFieldCursorPositionChangedCallbackDelegate != null)
2149                 {
2150                     this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate);
2151                 }
2152
2153                 if (textFieldMaxLengthReachedCallbackDelegate != null)
2154                 {
2155                     this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
2156                 }
2157
2158                 if (textFieldSelectionClearedCallbackDelegate != null)
2159                 {
2160                     this.SelectionClearedSignal().Disconnect(textFieldSelectionClearedCallbackDelegate);
2161                 }
2162
2163                 if (textFieldSelectionChangedCallbackDelegate != null)
2164                 {
2165                     this.SelectionChangedSignal().Disconnect(textFieldSelectionChangedCallbackDelegate);
2166                 }
2167
2168                 if (textFieldTextChangedCallbackDelegate != null)
2169                 {
2170                     TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate);
2171                 }
2172             }
2173
2174             base.Dispose(type);
2175         }
2176
2177         /// This will not be public opened.
2178         [EditorBrowsable(EditorBrowsableState.Never)]
2179         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
2180         {
2181             // In order to speed up IME hide, temporarily add
2182             GetInputMethodContext()?.DestroyContext();
2183             Interop.TextField.DeleteTextField(swigCPtr);
2184         }
2185
2186         private string SetTranslatable(string textFieldSid)
2187         {
2188             string translatableText = null;
2189             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
2190             if (translatableText != null)
2191             {
2192                 if (systemlangTextFlag == false)
2193                 {
2194                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
2195                     systemlangTextFlag = true;
2196                 }
2197                 return translatableText;
2198             }
2199             else
2200             {
2201                 translatableText = "";
2202                 return translatableText;
2203             }
2204         }
2205
2206         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
2207         {
2208             if (textFieldTextSid != null)
2209             {
2210                 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2211             }
2212             if (textFieldPlaceHolderTextSid != null)
2213             {
2214                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2215             }
2216             if (textFieldPlaceHolderTextFocusedSid != null)
2217             {
2218                 PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
2219             }
2220         }
2221
2222         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
2223         {
2224             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
2225             SetValue(FontSizeScaleProperty, newFontSizeScale);
2226             NotifyPropertyChanged();
2227         }
2228
2229         private void addFontSizeChangedCallback()
2230         {
2231             if (hasFontSizeChangedCallback != true)
2232             {
2233                 try
2234                 {
2235                     SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
2236                     hasFontSizeChangedCallback = true;
2237                 }
2238                 catch (Exception e)
2239                 {
2240                     Console.WriteLine("{0} Exception caught.", e);
2241                     hasFontSizeChangedCallback = false;
2242                 }
2243             }
2244         }
2245
2246         private void removeFontSizeChangedCallback()
2247         {
2248             if (hasFontSizeChangedCallback == true)
2249             {
2250                 try
2251                 {
2252                     SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
2253                     hasFontSizeChangedCallback = false;
2254                 }
2255                 catch (Exception e)
2256                 {
2257                     Console.WriteLine("{0} Exception caught.", e);
2258                     hasFontSizeChangedCallback = true;
2259                 }
2260             }
2261         }
2262
2263         internal new class Property
2264         {
2265             internal static readonly int TEXT = Interop.TextField.TextGet();
2266             internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet();
2267             internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet();
2268             internal static readonly int FontFamily = Interop.TextField.FontFamilyGet();
2269             internal static readonly int FontStyle = Interop.TextField.FontStyleGet();
2270             internal static readonly int PointSize = Interop.TextField.PointSizeGet();
2271             internal static readonly int MaxLength = Interop.TextField.MaxLengthGet();
2272             internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet();
2273             internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet();
2274             internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet();
2275             internal static readonly int TextColor = Interop.TextField.TextColorGet();
2276             internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet();
2277             internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet();
2278             internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet();
2279             internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet();
2280             internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet();
2281             internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet();
2282             internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet();
2283             internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet();
2284             internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet();
2285             internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet();
2286             internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet();
2287             internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet();
2288             internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet();
2289             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet();
2290             internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet();
2291             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet();
2292             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet();
2293             internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet();
2294             internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet();
2295             internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet();
2296             internal static readonly int InputColor = Interop.TextField.InputColorGet();
2297             internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet();
2298             internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet();
2299             internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet();
2300             internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet();
2301             internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet();
2302             internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet();
2303             internal static readonly int SHADOW = Interop.TextField.ShadowGet();
2304             internal static readonly int InputShadow = Interop.TextField.InputShadowGet();
2305             internal static readonly int EMBOSS = Interop.TextField.EmbossGet();
2306             internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet();
2307             internal static readonly int OUTLINE = Interop.TextField.OutlineGet();
2308             internal static readonly int InputOutline = Interop.TextField.InputOutlineGet();
2309             internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet();
2310             internal static readonly int PixelSize = Interop.TextField.PixelSizeGet();
2311             internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet();
2312             internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet();
2313             internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet();
2314             internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet();
2315             internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet();
2316             internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet();
2317             internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet();
2318             internal static readonly int SelectedText = Interop.TextField.SelectedTextGet();
2319             internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet();
2320             internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet();
2321             internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
2322             internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
2323             internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
2324             internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
2325             internal static readonly int EllipsisPosition = Interop.TextField.EllipsisPositionGet();
2326             internal static readonly int InputFilter = Interop.TextField.InputFilterGet();
2327         }
2328
2329         internal class InputStyle
2330         {
2331             internal enum Mask
2332             {
2333                 None = 0x0000,
2334                 Color = 0x0001,
2335                 FontFamily = 0x0002,
2336                 PointSize = 0x0004,
2337                 FontStyle = 0x0008,
2338                 Underline = 0x0010,
2339                 Shadow = 0x0020,
2340                 Emboss = 0x0040,
2341                 Outline = 0x0080
2342             }
2343         }
2344
2345         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
2346         {
2347             DecorationBoundingBox = new Rectangle(x, y, width, height);
2348         }
2349         private void OnInputColorChanged(float x, float y, float z, float w)
2350         {
2351             InputColor = new Vector4(x, y, z, w);
2352         }
2353         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
2354         {
2355             PlaceholderTextColor = new Vector4(r, g, b, a);
2356         }
2357         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
2358         {
2359             PrimaryCursorColor = new Vector4(x, y, z, w);
2360         }
2361         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
2362         {
2363             SecondaryCursorColor = new Vector4(x, y, z, w);
2364         }
2365         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
2366         {
2367             SelectionHighlightColor = new Vector4(x, y, z, w);
2368         }
2369         private void OnShadowColorChanged(float x, float y, float z, float w)
2370         {
2371             ShadowColor = new Vector4(x, y, z, w);
2372         }
2373         private void OnShadowOffsetChanged(float x, float y)
2374         {
2375             ShadowOffset = new Vector2(x, y);
2376         }
2377         private void OnTextColorChanged(float r, float g, float b, float a)
2378         {
2379             TextColor = new Color(r, g, b, a);
2380         }
2381         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
2382         {
2383             GrabHandleColor = new Color(r, g, b, a);
2384         }
2385     }
2386 }