[NUI] Implement missing properties for LottieAnimationView.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextEditor.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
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20
21 using System;
22 using System.Globalization;
23 using System.ComponentModel;
24 using Tizen.NUI.Text;
25 using Tizen.NUI.Binding;
26
27 namespace Tizen.NUI.BaseComponents
28 {
29     /// <summary>
30     /// A control which provides a multi-line editable text editor.
31     /// </summary>
32     /// <since_tizen> 3 </since_tizen>
33     public partial class TextEditor : View
34     {
35         private string textEditorTextSid = null;
36         private string textEditorPlaceHolderTextSid = null;
37         private bool systemlangTextFlag = false;
38         private InputMethodContext inputMethodContext = null;
39         private float fontSizeScale = 1.0f;
40         private bool hasFontSizeChangedCallback = false;
41         private bool isSettingTextInCSharp = false;
42
43 #if NUI_PROPERTY_CHANGE_2
44         private Color internalPlaceholderTextColor = null;
45         private Vector4 internalPrimaryCursorColor = null;
46         private Vector4 internalSecondaryCursorColor = null;
47         private Vector4 internalSelectionHighlightColor = null;
48         private Vector4 internalInputColor = null;
49         private Vector4 internalTextColor = null;
50         private Color internalGrabHandleColor = null;
51
52 #endif
53
54         static TextEditor() { }
55
56         /// <summary>
57         /// Creates the TextEditor control.
58         /// </summary>
59         /// <since_tizen> 3 </since_tizen>
60         public TextEditor() : this(Interop.TextEditor.New(), true)
61         {
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63         }
64
65         /// <summary>
66         /// Creates the TextEditor with specified style.
67         /// </summary>
68         [EditorBrowsable(EditorBrowsableState.Never)]
69         public TextEditor(TextEditorStyle style) : this(Interop.TextLabel.New(), true, style: style)
70         {
71         }
72
73         /// <summary>
74         /// Creates the TextEditor with setting the status of shown or hidden.
75         /// </summary>
76         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
77         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public TextEditor(bool shown) : this(Interop.TextEditor.New(), true)
80         {
81             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82             SetVisible(shown);
83         }
84
85         internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.NewTextEditor(TextEditor.getCPtr(handle)), true)
86         {
87             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88         }
89
90         internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true, TextEditorStyle style = null) : base(cPtr, cMemoryOwn, style)
91         {
92             if (!shown)
93             {
94                 SetVisible(false);
95             }
96             Focusable = true;
97             TextChanged += TextEditorTextChanged;
98         }
99
100         /// <summary>
101         /// The TranslatableText property.<br />
102         /// The text can set the SID value.<br />
103         /// </summary>
104         /// <exception cref='ArgumentNullException'>
105         /// ResourceManager about multilingual is null.
106         /// </exception>
107         /// <since_tizen> 4 </since_tizen>
108         public string TranslatableText
109         {
110             get
111             {
112                 return GetValue(TranslatableTextProperty) as string;
113             }
114             set
115             {
116                 SetValue(TranslatableTextProperty, value);
117             }
118         }
119
120         private string InternalTranslatableText
121         {
122             get
123             {
124                 return textEditorTextSid;
125             }
126             set
127             {
128                 if (NUIApplication.MultilingualResourceManager == null)
129                 {
130                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
131                 }
132                 textEditorTextSid = value;
133                 Text = SetTranslatable(textEditorTextSid);
134                 NotifyPropertyChanged();
135             }
136         }
137         /// <summary>
138         /// The TranslatablePlaceholderText property.<br />
139         /// The text can set the SID value.<br />
140         /// </summary>
141         /// <exception cref='ArgumentNullException'>
142         /// ResourceManager about multilingual is null.
143         /// </exception>
144         /// <since_tizen> 4 </since_tizen>
145         public string TranslatablePlaceholderText
146         {
147             get
148             {
149                 return GetValue(TranslatablePlaceholderTextProperty) as string;
150             }
151             set
152             {
153                 SetValue(TranslatablePlaceholderTextProperty, value);
154             }
155         }
156
157         private string InternalTranslatablePlaceholderText
158         {
159             get
160             {
161                 return textEditorPlaceHolderTextSid;
162             }
163             set
164             {
165                 if (NUIApplication.MultilingualResourceManager == null)
166                 {
167                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
168                 }
169                 textEditorPlaceHolderTextSid = value;
170                 PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
171                 NotifyPropertyChanged();
172             }
173         }
174
175         /// <summary>
176         /// The Text property.<br />
177         /// The text to display in the UTF-8 format.<br />
178         /// </summary>
179         /// <since_tizen> 3 </since_tizen>
180         public string Text
181         {
182             get
183             {
184                 return (string)GetValue(TextProperty);
185             }
186             set
187             {
188                 SetValue(TextProperty, value);
189                 NotifyPropertyChanged();
190             }
191         }
192
193         /// <summary>
194         /// The TextColor property.<br />
195         /// The color of the text.<br />
196         /// </summary>
197         /// <remarks>
198         /// The property cascade chaining set is possible. For example, this (textEditor.TextColor.X = 0.1f;) is possible.
199         /// </remarks>
200         /// <since_tizen> 3 </since_tizen>
201         public Vector4 TextColor
202         {
203             get
204             {
205                 Vector4 temp = (Vector4)GetValue(TextColorProperty);
206                 return new Vector4(OnTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
207             }
208             set
209             {
210                 SetValue(TextColorProperty, value);
211                 NotifyPropertyChanged();
212             }
213         }
214
215         /// <summary>
216         /// The FontFamily property.<br />
217         /// The requested font family to use.<br />
218         /// </summary>
219         /// <since_tizen> 3 </since_tizen>
220         public string FontFamily
221         {
222             get
223             {
224                 return (string)GetValue(FontFamilyProperty);
225             }
226             set
227             {
228                 SetValue(FontFamilyProperty, value);
229                 NotifyPropertyChanged();
230             }
231         }
232
233         /// <summary>
234         /// The FontStyle property.<br />
235         /// The requested font style to use.<br />
236         /// The fontStyle map contains the following keys :<br />
237         /// <list type="table">
238         /// <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>
239         /// <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>
240         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
241         /// </list>
242         /// </summary>
243         /// <since_tizen> 3 </since_tizen>
244         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
245         public PropertyMap FontStyle
246         {
247             get
248             {
249                 return (PropertyMap)GetValue(FontStyleProperty);
250             }
251             set
252             {
253                 SetValue(FontStyleProperty, value);
254                 NotifyPropertyChanged();
255             }
256         }
257
258         /// <summary>
259         /// Set FontStyle to TextEditor. <br />
260         /// </summary>
261         /// <param name="fontStyle">The FontStyle</param>
262         /// <remarks>
263         /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
264         /// </remarks>
265         /// <example>
266         /// The following example demonstrates how to use the SetFontStyle method.
267         /// <code>
268         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
269         /// fontStyle.Width = FontWidthType.Expanded;
270         /// fontStyle.Weight = FontWeightType.Bold;
271         /// fontStyle.Slant = FontSlantType.Italic;
272         /// editor.SetFontStyle(fontStyle);
273         /// </code>
274         /// </example>
275         [EditorBrowsable(EditorBrowsableState.Never)]
276         public void SetFontStyle(FontStyle fontStyle)
277         {
278             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
279             {
280                 SetValue(FontStyleProperty, fontStyleMap);
281             }
282         }
283
284         /// <summary>
285         /// Get FontStyle from TextEditor. <br />
286         /// </summary>
287         /// <returns>The FontStyle</returns>
288         /// <remarks>
289         /// <see cref="Tizen.NUI.Text.FontStyle"/>
290         /// </remarks>
291         [EditorBrowsable(EditorBrowsableState.Never)]
292         public FontStyle GetFontStyle()
293         {
294             FontStyle fontStyle;
295             using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
296             {
297                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
298             }
299             return fontStyle;
300         }
301
302         /// <summary>
303         /// The PointSize property.<br />
304         /// The size of font in points.<br />
305         /// </summary>
306         /// <since_tizen> 3 </since_tizen>
307         [Binding.TypeConverter(typeof(PointSizeTypeConverter))]
308         public float PointSize
309         {
310             get
311             {
312                 return (float)GetValue(PointSizeProperty);
313             }
314             set
315             {
316                 SetValue(PointSizeProperty, value);
317                 NotifyPropertyChanged();
318             }
319         }
320
321         /// <summary>
322         /// The HorizontalAlignment property.<br />
323         /// The line horizontal alignment.<br />
324         /// </summary>
325         /// <since_tizen> 3 </since_tizen>
326         public HorizontalAlignment HorizontalAlignment
327         {
328             get
329             {
330                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
331             }
332             set
333             {
334                 SetValue(HorizontalAlignmentProperty, value);
335                 NotifyPropertyChanged();
336             }
337         }
338
339         /// <summary>
340         /// The VerticalAlignment property.<br />
341         /// The line vertical alignment.
342         /// </summary>
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public VerticalAlignment VerticalAlignment
345         {
346             get
347             {
348                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
349             }
350             set
351             {
352                 SetValue(VerticalAlignmentProperty, value);
353                 NotifyPropertyChanged();
354             }
355         }
356
357         /// <summary>
358         /// The ScrollThreshold property.<br />
359         /// Horizontal scrolling will occur if the cursor is this close to the control border.<br />
360         /// </summary>
361         /// <since_tizen> 3 </since_tizen>
362         public float ScrollThreshold
363         {
364             get
365             {
366                 return (float)GetValue(ScrollThresholdProperty);
367             }
368             set
369             {
370                 SetValue(ScrollThresholdProperty, value);
371                 NotifyPropertyChanged();
372             }
373         }
374
375         /// <summary>
376         /// The ScrollSpeed property.<br />
377         /// The scroll speed in pixels per second.<br />
378         /// </summary>
379         /// <since_tizen> 3 </since_tizen>
380         public float ScrollSpeed
381         {
382             get
383             {
384                 return (float)GetValue(ScrollSpeedProperty);
385             }
386             set
387             {
388                 SetValue(ScrollSpeedProperty, value);
389                 NotifyPropertyChanged();
390             }
391         }
392
393         /// <summary>
394         /// The PrimaryCursorColor property.<br />
395         /// The color to apply to the primary cursor.<br />
396         /// </summary>
397         /// <remarks>
398         /// The property cascade chaining set is possible. For example, this (textEditor.PrimaryCursorColor.X = 0.1f;) is possible.
399         /// </remarks>
400         /// <since_tizen> 3 </since_tizen>
401         public Vector4 PrimaryCursorColor
402         {
403             get
404             {
405                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
406                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
407             }
408             set
409             {
410                 SetValue(PrimaryCursorColorProperty, value);
411                 NotifyPropertyChanged();
412             }
413         }
414
415         /// <summary>
416         /// The SecondaryCursorColor property.<br />
417         /// The color to apply to the secondary cursor.<br />
418         /// </summary>
419         /// <remarks>
420         /// The property cascade chaining set is possible. For example, this (textEditor.SecondaryCursorColor.X = 0.1f;) is possible.
421         /// </remarks>
422         /// <since_tizen> 3 </since_tizen>
423         public Vector4 SecondaryCursorColor
424         {
425             get
426             {
427                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
428                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
429             }
430             set
431             {
432                 SetValue(SecondaryCursorColorProperty, value);
433                 NotifyPropertyChanged();
434             }
435         }
436
437         /// <summary>
438         /// The EnableCursorBlink property.<br />
439         /// Whether the cursor should blink or not.<br />
440         /// </summary>
441         /// <since_tizen> 3 </since_tizen>
442         public bool EnableCursorBlink
443         {
444             get
445             {
446                 return (bool)GetValue(EnableCursorBlinkProperty);
447             }
448             set
449             {
450                 SetValue(EnableCursorBlinkProperty, value);
451                 NotifyPropertyChanged();
452             }
453         }
454
455         /// <summary>
456         /// The CursorBlinkInterval property.<br />
457         /// The time interval in seconds between cursor on/off states.<br />
458         /// </summary>
459         /// <since_tizen> 3 </since_tizen>
460         public float CursorBlinkInterval
461         {
462             get
463             {
464                 return (float)GetValue(CursorBlinkIntervalProperty);
465             }
466             set
467             {
468                 SetValue(CursorBlinkIntervalProperty, value);
469                 NotifyPropertyChanged();
470             }
471         }
472
473         /// <summary>
474         /// The CursorBlinkDuration property.<br />
475         /// The cursor will stop blinking after this number of seconds (if non-zero).<br />
476         /// </summary>
477         /// <since_tizen> 3 </since_tizen>
478         public float CursorBlinkDuration
479         {
480             get
481             {
482                 return (float)GetValue(CursorBlinkDurationProperty);
483             }
484             set
485             {
486                 SetValue(CursorBlinkDurationProperty, value);
487                 NotifyPropertyChanged();
488             }
489         }
490
491         /// <summary>
492         /// The CursorWidth property.
493         /// </summary>
494         /// <since_tizen> 3 </since_tizen>
495         public int CursorWidth
496         {
497             get
498             {
499                 return (int)GetValue(CursorWidthProperty);
500             }
501             set
502             {
503                 SetValue(CursorWidthProperty, value);
504                 NotifyPropertyChanged();
505             }
506         }
507
508         /// <summary>
509         /// The GrabHandleImage property.<br />
510         /// The image to display for the grab handle.<br />
511         /// </summary>
512         /// <since_tizen> 3 </since_tizen>
513         public string GrabHandleImage
514         {
515             get
516             {
517                 return (string)GetValue(GrabHandleImageProperty);
518             }
519             set
520             {
521                 SetValue(GrabHandleImageProperty, value);
522                 NotifyPropertyChanged();
523             }
524         }
525
526         /// <summary>
527         /// The GrabHandlePressedImage property.<br />
528         /// The image to display when the grab handle is pressed.<br />
529         /// </summary>
530         /// <since_tizen> 3 </since_tizen>
531         public string GrabHandlePressedImage
532         {
533             get
534             {
535                 return (string)GetValue(GrabHandlePressedImageProperty);
536             }
537             set
538             {
539                 SetValue(GrabHandlePressedImageProperty, value);
540                 NotifyPropertyChanged();
541             }
542         }
543
544         /// <summary>
545         /// The SelectionPopupStyle property.<br />
546         /// The style of the text selection popup can be set through SelectionPopupStyle property.
547         /// </summary>
548         [EditorBrowsable(EditorBrowsableState.Never)]
549         public PropertyMap SelectionPopupStyle
550         {
551             get
552             {
553                 return (PropertyMap)GetValue(SelectionPopupStyleProperty);
554             }
555             set
556             {
557                 SetValue(SelectionPopupStyleProperty, value);
558                 NotifyPropertyChanged();
559             }
560         }
561
562         /// <summary>
563         /// The SelectionHandleImageLeft property.<br />
564         /// The image to display for the left selection handle.<br />
565         /// The selectionHandleImageLeft map contains the following key :<br />
566         /// <list type="table">
567         /// <item><term>filename (string)</term><description>The path of image file</description></item>
568         /// </list>
569         /// </summary>
570         /// <since_tizen> 3 </since_tizen>
571         public PropertyMap SelectionHandleImageLeft
572         {
573             get
574             {
575                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
576             }
577             set
578             {
579                 SetValue(SelectionHandleImageLeftProperty, value);
580                 NotifyPropertyChanged();
581             }
582         }
583
584         /// <summary>
585         /// The SelectionHandleImageRight property.<br />
586         /// The image to display for the right selection handle.<br />
587         /// The selectionHandleImageRight map contains the following key :<br />
588         /// <list type="table">
589         /// <item><term>filename (string)</term><description>The path of image file</description></item>
590         /// </list>
591         /// </summary>
592         /// <since_tizen> 3 </since_tizen>
593         public PropertyMap SelectionHandleImageRight
594         {
595             get
596             {
597                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
598             }
599             set
600             {
601                 SetValue(SelectionHandleImageRightProperty, value);
602                 NotifyPropertyChanged();
603             }
604         }
605
606         /// <summary>
607         /// Set SelectionHandleImage to TextEditor. <br />
608         /// </summary>
609         /// <param name="selectionHandleImage">The SelectionHandleImage</param>
610         /// <remarks>
611         /// SetSelectionHandleImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
612         /// </remarks>
613         /// <example>
614         /// The following example demonstrates how to use the SetSelectionHandleImage method.
615         /// <code>
616         /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
617         /// selectionHandleImage.LeftImageUrl = "handle_downleft.png";
618         /// selectionHandleImage.RightImageUrl = "handle_downright.png";
619         /// editor.SetSelectionHandleImage(selectionHandleImage);
620         /// </code>
621         /// </example>
622         [EditorBrowsable(EditorBrowsableState.Never)]
623         public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
624         {
625             if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
626             {
627                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
628                 {
629                     SetValue(SelectionHandleImageLeftProperty, leftImageMap);
630                 }
631             }
632
633             if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
634             {
635                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
636                 {
637                     SetValue(SelectionHandleImageRightProperty, rightImageMap);
638                 }
639             }
640         }
641
642         /// <summary>
643         /// Get SelectionHandleImage from TextEditor. <br />
644         /// </summary>
645         /// <returns>The SelectionHandleImage</returns>
646         /// <remarks>
647         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
648         /// </remarks>
649         [EditorBrowsable(EditorBrowsableState.Never)]
650         public SelectionHandleImage GetSelectionHandleImage()
651         {
652             SelectionHandleImage selectionHandleImage;
653             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
654             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
655             {
656                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
657             }
658             return selectionHandleImage;
659         }
660
661         /// <summary>
662         /// The SelectionHandlePressedImageLeft property.<br />
663         /// The image to display when the left selection handle is pressed.<br />
664         /// The selectionHandlePressedImageLeft map contains the following key :<br />
665         /// <list type="table">
666         /// <item><term>filename (string)</term><description>The path of image file</description></item>
667         /// </list>
668         /// </summary>
669         /// <since_tizen> 3 </since_tizen>
670         public PropertyMap SelectionHandlePressedImageLeft
671         {
672             get
673             {
674                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
675             }
676             set
677             {
678                 SetValue(SelectionHandlePressedImageLeftProperty, value);
679                 NotifyPropertyChanged();
680             }
681         }
682
683         /// <summary>
684         /// The SelectionHandlePressedImageRight property.<br />
685         /// The image to display when the right selection handle is pressed.<br />
686         /// The selectionHandlePressedImageRight map contains the following key :<br />
687         /// <list type="table">
688         /// <item><term>filename (string)</term><description>The path of image file</description></item>
689         /// </list>
690         /// </summary>
691         /// <since_tizen> 3 </since_tizen>
692         public PropertyMap SelectionHandlePressedImageRight
693         {
694             get
695             {
696                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
697             }
698             set
699             {
700                 SetValue(SelectionHandlePressedImageRightProperty, value);
701                 NotifyPropertyChanged();
702             }
703         }
704
705         /// <summary>
706         /// Set SelectionHandlePressedImage to TextEditor. <br />
707         /// </summary>
708         /// <param name="selectionHandlePressedImage">The SelectionHandleImage</param>
709         /// <remarks>
710         /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
711         /// </remarks>
712         /// <example>
713         /// The following example demonstrates how to use the SetSelectionHandlePressedImage method.
714         /// <code>
715         /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage();
716         /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png";
717         /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png";
718         /// editor.SetSelectionHandlePressedImage(selectionHandlePressedImage);
719         /// </code>
720         /// </example>
721         [EditorBrowsable(EditorBrowsableState.Never)]
722         public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandlePressedImage)
723         {
724             if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
725             {
726                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
727                 {
728                     SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
729                 }
730             }
731
732             if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
733             {
734                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
735                 {
736                     SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
737                 }
738             }
739         }
740
741         /// <summary>
742         /// Get SelectionHandlePressedImage from TextEditor. <br />
743         /// </summary>
744         /// <returns>The SelectionHandlePressedImage</returns>
745         /// <remarks>
746         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
747         /// </remarks>
748         [EditorBrowsable(EditorBrowsableState.Never)]
749         public SelectionHandleImage GetSelectionHandlePressedImage()
750         {
751             SelectionHandleImage selectionHandleImage;
752             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
753             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
754             {
755                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
756             }
757             return selectionHandleImage;
758         }
759
760         /// <summary>
761         /// The SelectionHandleMarkerImageLeft property.<br />
762         /// The image to display for the left selection handle marker.<br />
763         /// The selectionHandleMarkerImageLeft map contains the following key :<br />
764         /// <list type="table">
765         /// <item><term>filename (string)</term><description>The path of image file</description></item>
766         /// </list>
767         /// </summary>
768         /// <since_tizen> 3 </since_tizen>
769         public PropertyMap SelectionHandleMarkerImageLeft
770         {
771             get
772             {
773                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
774             }
775             set
776             {
777                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
778                 NotifyPropertyChanged();
779             }
780         }
781
782         /// <summary>
783         /// The SelectionHandleMarkerImageRight property.<br />
784         /// The image to display for the right selection handle marker.<br />
785         /// The selectionHandleMarkerImageRight map contains the following key :<br />
786         /// <list type="table">
787         /// <item><term>filename (string)</term><description>The path of image file</description></item>
788         /// </list>
789         /// </summary>
790         /// <since_tizen> 3 </since_tizen>
791         public PropertyMap SelectionHandleMarkerImageRight
792         {
793             get
794             {
795                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
796             }
797             set
798             {
799                 SetValue(SelectionHandleMarkerImageRightProperty, value);
800                 NotifyPropertyChanged();
801             }
802         }
803
804         /// <summary>
805         /// Set SelectionHandleMarkerImage to TextEditor. <br />
806         /// </summary>
807         /// <param name="selectionHandleMarkerImage">The SelectionHandleImage</param>
808         /// <remarks>
809         /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
810         /// </remarks>
811         /// <example>
812         /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method.
813         /// <code>
814         /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage();
815         /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png";
816         /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png";
817         /// editor.SetSelectionHandleMarkerImage(selectionHandleMarkerImage);
818         /// </code>
819         /// </example>
820         [EditorBrowsable(EditorBrowsableState.Never)]
821         public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMarkerImage)
822         {
823             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
824             {
825                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
826                 {
827                     SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
828                 }
829             }
830
831             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
832             {
833                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
834                 {
835                     SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
836                 }
837             }
838         }
839
840         /// <summary>
841         /// Get SelectionHandleMarkerImage from TextEditor. <br />
842         /// </summary>
843         /// <returns>The SelectionHandleMarkerImage</returns>
844         /// <remarks>
845         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
846         /// </remarks>
847         [EditorBrowsable(EditorBrowsableState.Never)]
848         public SelectionHandleImage GetSelectionHandleMarkerImage()
849         {
850             SelectionHandleImage selectionHandleImage;
851             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
852             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
853             {
854                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
855             }
856             return selectionHandleImage;
857         }
858
859         /// <summary>
860         /// The SelectionHighlightColor property.<br />
861         /// The color of the selection highlight.<br />
862         /// </summary>
863         /// <remarks>
864         /// The property cascade chaining set is possible. For example, this (textEditor.SelectionHighlightColor.X = 0.1f;) is possible.
865         /// </remarks>
866         /// <since_tizen> 3 </since_tizen>
867         public Vector4 SelectionHighlightColor
868         {
869             get
870             {
871                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
872                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
873             }
874             set
875             {
876                 SetValue(SelectionHighlightColorProperty, value);
877                 NotifyPropertyChanged();
878             }
879         }
880
881         /// <summary>
882         /// The DecorationBoundingBox property.<br />
883         /// The decorations (handles etc) will positioned within this area on-screen.<br />
884         /// </summary>
885         /// <remarks>
886         /// The property cascade chaining set is possible. For example, this (textEditor.DecorationBoundingBox.X = 1;) is possible.
887         /// </remarks>
888         /// <since_tizen> 3 </since_tizen>
889         public Rectangle DecorationBoundingBox
890         {
891             get
892             {
893                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
894                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
895             }
896             set
897             {
898                 SetValue(DecorationBoundingBoxProperty, value);
899                 NotifyPropertyChanged();
900             }
901         }
902
903         /// <summary>
904         /// The EnableMarkup property.<br />
905         /// Whether the mark-up processing is enabled.<br />
906         /// </summary>
907         /// <since_tizen> 3 </since_tizen>
908         public bool EnableMarkup
909         {
910             get
911             {
912                 return (bool)GetValue(EnableMarkupProperty);
913             }
914             set
915             {
916                 SetValue(EnableMarkupProperty, value);
917                 NotifyPropertyChanged();
918             }
919         }
920
921         /// <summary>
922         /// The InputColor property.<br />
923         /// The color of the new input text.<br />
924         /// </summary>
925         /// <remarks>
926         /// The property cascade chaining set is possible. For example, this (textEditor.InputColor.X = 0.1f;) is possible.
927         /// </remarks>
928         /// <since_tizen> 3 </since_tizen>
929         public Vector4 InputColor
930         {
931             get
932             {
933                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
934                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
935             }
936             set
937             {
938                 SetValue(InputColorProperty, value);
939                 NotifyPropertyChanged();
940             }
941         }
942
943         /// <summary>
944         /// The InputFontFamily property.<br />
945         /// The font's family of the new input text.<br />
946         /// </summary>
947         /// <since_tizen> 3 </since_tizen>
948         public string InputFontFamily
949         {
950             get
951             {
952                 return (string)GetValue(InputFontFamilyProperty);
953             }
954             set
955             {
956                 SetValue(InputFontFamilyProperty, value);
957                 NotifyPropertyChanged();
958             }
959         }
960
961         /// <summary>
962         /// The InputFontStyle property.<br />
963         /// The font's style of the new input text.<br />
964         /// The inputFontStyle map contains the following keys :<br />
965         /// <list type="table">
966         /// <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>
967         /// <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>
968         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
969         /// </list>
970         /// </summary>
971         /// <since_tizen> 3 </since_tizen>
972         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
973         public PropertyMap InputFontStyle
974         {
975             get
976             {
977                 return (PropertyMap)GetValue(InputFontStyleProperty);
978             }
979             set
980             {
981                 SetValue(InputFontStyleProperty, value);
982                 NotifyPropertyChanged();
983             }
984         }
985
986         /// <summary>
987         /// Set InputFontStyle to TextEditor. <br />
988         /// </summary>
989         /// <param name="fontStyle">The FontStyle</param>
990         /// <remarks>
991         /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
992         /// </remarks>
993         /// <example>
994         /// The following example demonstrates how to use the SetInputFontStyle method.
995         /// <code>
996         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
997         /// fontStyle.Width = FontWidthType.Expanded;
998         /// fontStyle.Weight = FontWeightType.Bold;
999         /// fontStyle.Slant = FontSlantType.Italic;
1000         /// editor.SetInputFontStyle(fontStyle);
1001         /// </code>
1002         /// </example>
1003         [EditorBrowsable(EditorBrowsableState.Never)]
1004         public void SetInputFontStyle(FontStyle fontStyle)
1005         {
1006             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
1007             {
1008                 SetValue(InputFontStyleProperty, fontStyleMap);
1009             }
1010         }
1011
1012         /// <summary>
1013         /// Get InputFontStyle from TextEditor. <br />
1014         /// </summary>
1015         /// <returns>The FontStyle</returns>
1016         /// <remarks>
1017         /// <see cref="Tizen.NUI.Text.FontStyle"/>
1018         /// </remarks>
1019         [EditorBrowsable(EditorBrowsableState.Never)]
1020         public FontStyle GetInputFontStyle()
1021         {
1022             FontStyle fontStyle;
1023             using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
1024             {
1025                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
1026             }
1027             return fontStyle;
1028         }
1029
1030         /// <summary>
1031         /// The InputPointSize property.<br />
1032         /// The font's size of the new input text in points.<br />
1033         /// </summary>
1034         /// <since_tizen> 3 </since_tizen>
1035         [Binding.TypeConverter(typeof(PointSizeTypeConverter))]
1036         public float InputPointSize
1037         {
1038             get
1039             {
1040                 return (float)GetValue(InputPointSizeProperty);
1041             }
1042             set
1043             {
1044                 SetValue(InputPointSizeProperty, value);
1045                 NotifyPropertyChanged();
1046             }
1047         }
1048
1049         /// <summary>
1050         /// The LineSpacing property.<br />
1051         /// The default extra space between lines in points.<br />
1052         /// </summary>
1053         /// <since_tizen> 3 </since_tizen>
1054         public float LineSpacing
1055         {
1056             get
1057             {
1058                 return (float)GetValue(LineSpacingProperty);
1059             }
1060             set
1061             {
1062                 SetValue(LineSpacingProperty, value);
1063                 NotifyPropertyChanged();
1064             }
1065         }
1066
1067         /// <summary>
1068         /// The InputLineSpacing property.<br />
1069         /// The extra space between lines in points.<br />
1070         /// </summary>
1071         /// <since_tizen> 3 </since_tizen>
1072         public float InputLineSpacing
1073         {
1074             get
1075             {
1076                 return (float)GetValue(InputLineSpacingProperty);
1077             }
1078             set
1079             {
1080                 SetValue(InputLineSpacingProperty, value);
1081                 NotifyPropertyChanged();
1082             }
1083         }
1084
1085         /// <summary>
1086         /// The relative height of the line (a factor that will be multiplied by text height). <br />
1087         /// If the value is less than 1, the lines could to be overlapped.
1088         /// </summary>
1089         [EditorBrowsable(EditorBrowsableState.Never)]
1090         public float RelativeLineHeight
1091         {
1092             get
1093             {
1094                 return (float)GetValue(RelativeLineHeightProperty);
1095             }
1096             set
1097             {
1098                 SetValue(RelativeLineHeightProperty, value);
1099                 NotifyPropertyChanged();
1100             }
1101         }
1102
1103         /// <summary>
1104         /// The Underline property.<br />
1105         /// The default underline parameters.<br />
1106         /// The underline map contains the following keys :<br />
1107         /// <list type="table">
1108         /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
1109         /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
1110         /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
1111         /// </list>
1112         /// </summary>
1113         /// <since_tizen> 3 </since_tizen>
1114         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1115         public PropertyMap Underline
1116         {
1117             get
1118             {
1119                 return (PropertyMap)GetValue(UnderlineProperty);
1120             }
1121             set
1122             {
1123                 SetValue(UnderlineProperty, value);
1124                 NotifyPropertyChanged();
1125             }
1126         }
1127
1128         /// <summary>
1129         /// Set Underline to TextEditor. <br />
1130         /// </summary>
1131         /// <param name="underline">The Underline</param>
1132         /// <remarks>
1133         /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
1134         /// </remarks>
1135         /// <example>
1136         /// The following example demonstrates how to use the SetUnderline method.
1137         /// <code>
1138         /// var underline = new Tizen.NUI.Text.Underline();
1139         /// underline.Enable = true;
1140         /// underline.Color = new Color("#3498DB");
1141         /// underline.Height = 2.0f;
1142         /// editor.SetUnderline(underline);
1143         /// </code>
1144         /// </example>
1145         [EditorBrowsable(EditorBrowsableState.Never)]
1146         public void SetUnderline(Underline underline)
1147         {
1148             using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
1149             {
1150                 SetValue(UnderlineProperty, underlineMap);
1151             }
1152         }
1153
1154         /// <summary>
1155         /// Get Underline from TextEditor. <br />
1156         /// </summary>
1157         /// <returns>The Underline</returns>
1158         /// <remarks>
1159         /// <see cref="Tizen.NUI.Text.Underline"/>
1160         /// </remarks>
1161         [EditorBrowsable(EditorBrowsableState.Never)]
1162         public Underline GetUnderline()
1163         {
1164             Underline underline;
1165             using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
1166             {
1167                 underline = TextMapHelper.GetUnderlineStruct(underlineMap);
1168             }
1169             return underline;
1170         }
1171
1172         /// <summary>
1173         /// The InputUnderline property.<br />
1174         /// The underline parameters of the new input text.<br />
1175         /// </summary>
1176         /// <since_tizen> 3 </since_tizen>
1177         public string InputUnderline
1178         {
1179             get
1180             {
1181                 return (string)GetValue(InputUnderlineProperty);
1182             }
1183             set
1184             {
1185                 SetValue(InputUnderlineProperty, value);
1186                 NotifyPropertyChanged();
1187             }
1188         }
1189
1190         /// <summary>
1191         /// The Shadow property.<br />
1192         /// The default shadow parameters.<br />
1193         /// The shadow map contains the following keys :<br />
1194         /// <list type="table">
1195         /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1196         /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1197         /// <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>
1198         /// </list>
1199         /// </summary>
1200         /// <since_tizen> 3 </since_tizen>
1201         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1202         public PropertyMap Shadow
1203         {
1204             get
1205             {
1206                 return (PropertyMap)GetValue(ShadowProperty);
1207             }
1208             set
1209             {
1210                 SetValue(ShadowProperty, value);
1211                 NotifyPropertyChanged();
1212             }
1213         }
1214
1215         /// <summary>
1216         /// Set Shadow to TextEditor. <br />
1217         /// </summary>
1218         /// <param name="shadow">The Shadow</param>
1219         /// <remarks>
1220         /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
1221         /// </remarks>
1222         /// <example>
1223         /// The following example demonstrates how to use the SetShadow method.
1224         /// <code>
1225         /// var shadow = new Tizen.NUI.Text.Shadow();
1226         /// shadow.Offset = new Vector2(3, 3);
1227         /// shadow.Color = new Color("#F1C40F");
1228         /// editor.SetShadow(shadow);
1229         /// </code>
1230         /// </example>
1231         [EditorBrowsable(EditorBrowsableState.Never)]
1232         public void SetShadow(Tizen.NUI.Text.Shadow shadow)
1233         {
1234             using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
1235             {
1236                 SetValue(ShadowProperty, shadowMap);
1237             }
1238         }
1239
1240         /// <summary>
1241         /// Get Shadow from TextEditor. <br />
1242         /// </summary>
1243         /// <returns>The Shadow</returns>
1244         /// <remarks>
1245         /// <see cref="Tizen.NUI.Text.Shadow"/>
1246         /// </remarks>
1247         [EditorBrowsable(EditorBrowsableState.Never)]
1248         public Tizen.NUI.Text.Shadow GetShadow()
1249         {
1250             Tizen.NUI.Text.Shadow shadow;
1251             using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
1252             {
1253                 shadow = TextMapHelper.GetShadowStruct(shadowMap);
1254             }
1255             return shadow;
1256         }
1257
1258         /// <summary>
1259         /// The InputShadow property.<br />
1260         /// The shadow parameters of the new input text.<br />
1261         /// </summary>
1262         /// <since_tizen> 3 </since_tizen>
1263         public string InputShadow
1264         {
1265             get
1266             {
1267                 return (string)GetValue(InputShadowProperty);
1268             }
1269             set
1270             {
1271                 SetValue(InputShadowProperty, value);
1272                 NotifyPropertyChanged();
1273             }
1274         }
1275
1276         /// <summary>
1277         /// The Emboss property.<br />
1278         /// The default emboss parameters.<br />
1279         /// </summary>
1280         /// <since_tizen> 3 </since_tizen>
1281         public string Emboss
1282         {
1283             get
1284             {
1285                 return (string)GetValue(EmbossProperty);
1286             }
1287             set
1288             {
1289                 SetValue(EmbossProperty, value);
1290                 NotifyPropertyChanged();
1291             }
1292         }
1293
1294         /// <summary>
1295         /// The InputEmboss property.<br />
1296         /// The emboss parameters of the new input text.<br />
1297         /// </summary>
1298         /// <since_tizen> 3 </since_tizen>
1299         public string InputEmboss
1300         {
1301             get
1302             {
1303                 return (string)GetValue(InputEmbossProperty);
1304             }
1305             set
1306             {
1307                 SetValue(InputEmbossProperty, value);
1308                 NotifyPropertyChanged();
1309             }
1310         }
1311
1312         /// <summary>
1313         /// The Outline property.<br />
1314         /// The default outline parameters.<br />
1315         /// The outline map contains the following keys :<br />
1316         /// <list type="table">
1317         /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1318         /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1319         /// </list>
1320         /// </summary>
1321         /// <since_tizen> 3 </since_tizen>
1322         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1323         public PropertyMap Outline
1324         {
1325             get
1326             {
1327                 return (PropertyMap)GetValue(OutlineProperty);
1328             }
1329             set
1330             {
1331                 SetValue(OutlineProperty, value);
1332                 NotifyPropertyChanged();
1333             }
1334         }
1335
1336         /// <summary>
1337         /// Set Outline to TextEditor. <br />
1338         /// </summary>
1339         /// <param name="outline">The Outline</param>
1340         /// <remarks>
1341         /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
1342         /// </remarks>
1343         /// <example>
1344         /// The following example demonstrates how to use the SetOutline method.
1345         /// <code>
1346         /// var outline = new Tizen.NUI.Text.Outline();
1347         /// outline.Width = 2.0f;
1348         /// outline.Color = new Color("#45B39D");
1349         /// editor.SetOutline(outline);
1350         /// </code>
1351         /// </example>
1352         [EditorBrowsable(EditorBrowsableState.Never)]
1353         public void SetOutline(Outline outline)
1354         {
1355             using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
1356             {
1357                 SetValue(OutlineProperty, outlineMap);
1358             }
1359         }
1360
1361         /// <summary>
1362         /// Get Outline from TextEditor. <br />
1363         /// </summary>
1364         /// <returns>The Outline</returns>
1365         /// <remarks>
1366         /// <see cref="Tizen.NUI.Text.Outline"/>
1367         /// </remarks>
1368         [EditorBrowsable(EditorBrowsableState.Never)]
1369         public Outline GetOutline()
1370         {
1371             Outline outline;
1372             using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
1373             {
1374                 outline = TextMapHelper.GetOutlineStruct(outlineMap);
1375             }
1376             return outline;
1377         }
1378
1379         /// <summary>
1380         /// The InputOutline property.<br />
1381         /// The outline parameters of the new input text.<br />
1382         /// </summary>
1383         /// <since_tizen> 3 </since_tizen>
1384         public string InputOutline
1385         {
1386             get
1387             {
1388                 return (string)GetValue(InputOutlineProperty);
1389             }
1390             set
1391             {
1392                 SetValue(InputOutlineProperty, value);
1393                 NotifyPropertyChanged();
1394             }
1395         }
1396
1397         /// <summary>
1398         /// The SmoothScroll property.<br />
1399         /// Enable or disable the smooth scroll animation.<br />
1400         /// </summary>
1401         /// <since_tizen> 3 </since_tizen>
1402         public bool SmoothScroll
1403         {
1404             get
1405             {
1406                 return (bool)GetValue(SmoothScrollProperty);
1407             }
1408             set
1409             {
1410                 SetValue(SmoothScrollProperty, value);
1411                 NotifyPropertyChanged();
1412             }
1413         }
1414
1415         /// <summary>
1416         /// The SmoothScrollDuration property.<br />
1417         /// Sets the duration of smooth scroll animation.<br />
1418         /// </summary>
1419         /// <since_tizen> 3 </since_tizen>
1420         public float SmoothScrollDuration
1421         {
1422             get
1423             {
1424                 return (float)GetValue(SmoothScrollDurationProperty);
1425             }
1426             set
1427             {
1428                 SetValue(SmoothScrollDurationProperty, value);
1429                 NotifyPropertyChanged();
1430             }
1431         }
1432
1433         /// <summary>
1434         /// The EnableScrollBar property.<br />
1435         /// Enable or disable the scroll bar.<br />
1436         /// </summary>
1437         /// <since_tizen> 3 </since_tizen>
1438         public bool EnableScrollBar
1439         {
1440             get
1441             {
1442                 return (bool)GetValue(EnableScrollBarProperty);
1443             }
1444             set
1445             {
1446                 SetValue(EnableScrollBarProperty, value);
1447                 NotifyPropertyChanged();
1448             }
1449         }
1450
1451         /// <summary>
1452         /// The ScrollBarShowDuration property.<br />
1453         /// Sets the duration of scroll bar to show.<br />
1454         /// </summary>
1455         /// <since_tizen> 3 </since_tizen>
1456         public float ScrollBarShowDuration
1457         {
1458             get
1459             {
1460                 return (float)GetValue(ScrollBarShowDurationProperty);
1461             }
1462             set
1463             {
1464                 SetValue(ScrollBarShowDurationProperty, value);
1465                 NotifyPropertyChanged();
1466             }
1467         }
1468
1469         /// <summary>
1470         /// The ScrollBarFadeDuration property.<br />
1471         /// Sets the duration of scroll bar to fade out.<br />
1472         /// </summary>
1473         /// <since_tizen> 3 </since_tizen>
1474         public float ScrollBarFadeDuration
1475         {
1476             get
1477             {
1478                 return (float)GetValue(ScrollBarFadeDurationProperty);
1479             }
1480             set
1481             {
1482                 SetValue(ScrollBarFadeDurationProperty, value);
1483                 NotifyPropertyChanged();
1484             }
1485         }
1486
1487         /// <summary>
1488         /// The PixelSize property.<br />
1489         /// The size of font in pixels.<br />
1490         /// </summary>
1491         /// <since_tizen> 3 </since_tizen>
1492         [Binding.TypeConverter(typeof(FloatGraphicsTypeConverter))]
1493         public float PixelSize
1494         {
1495             get
1496             {
1497                 return (float)GetValue(PixelSizeProperty);
1498             }
1499             set
1500             {
1501                 SetValue(PixelSizeProperty, value);
1502                 NotifyPropertyChanged();
1503             }
1504         }
1505
1506         /// <summary>
1507         /// The line count of the text.
1508         /// </summary>
1509         /// <since_tizen> 3 </since_tizen>
1510         public int LineCount
1511         {
1512             get
1513             {
1514                 int lineCount = 0;
1515                 using (var propertyValue = GetProperty(TextEditor.Property.LineCount))
1516                 {
1517                     propertyValue.Get(out lineCount);
1518                 }
1519                 return lineCount;
1520             }
1521         }
1522
1523         /// <summary>
1524         /// The text to display when the TextEditor is empty and inactive.
1525         /// </summary>
1526         /// <since_tizen> 3 </since_tizen>
1527         public string PlaceholderText
1528         {
1529             get
1530             {
1531                 return (string)GetValue(PlaceholderTextProperty);
1532             }
1533             set
1534             {
1535                 SetValue(PlaceholderTextProperty, value);
1536                 NotifyPropertyChanged();
1537             }
1538         }
1539
1540         /// <summary>
1541         /// The portion of the text that has been selected by the user.
1542         /// </summary>
1543         /// <remarks>
1544         /// Empty string when nothing is selected.
1545         /// </remarks>
1546         /// <since_tizen> 9 </since_tizen>
1547         public string SelectedText
1548         {
1549             get
1550             {
1551                 string selectedText;
1552                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedText))
1553                 {
1554                     propertyValue.Get(out selectedText);
1555                 }
1556                 return selectedText;
1557             }
1558         }
1559
1560         /// <summary>
1561         /// The Placeholder text color.
1562         /// </summary>
1563         /// <remarks>
1564         /// The property cascade chaining set is possible. For example, this (textEditor.PlaceholderTextColor.X = 0.1f;) is possible.
1565         /// </remarks>
1566         /// <since_tizen> 3 </since_tizen>
1567         public Color PlaceholderTextColor
1568         {
1569             get
1570             {
1571                 Color temp = (Color)GetValue(PlaceholderTextColorProperty);
1572                 return new Color(OnPlaceholderTextColorChanged, temp.R, temp.G, temp.B, temp.A);
1573             }
1574             set
1575             {
1576                 SetValue(PlaceholderTextColorProperty, value);
1577                 NotifyPropertyChanged();
1578             }
1579         }
1580
1581         /// <summary>
1582         /// The Enable selection property.<br />
1583         /// Enables Text selection, such as the cursor, handle, clipboard, and highlight color.<br />
1584         /// </summary>
1585         /// <since_tizen> 3 </since_tizen>
1586         public bool EnableSelection
1587         {
1588             get
1589             {
1590                 return (bool)GetValue(EnableSelectionProperty);
1591             }
1592             set
1593             {
1594                 SetValue(EnableSelectionProperty, value);
1595                 NotifyPropertyChanged();
1596             }
1597         }
1598
1599         /// <summary>
1600         /// The start index for selection.
1601         /// </summary>
1602         /// <remarks>
1603         /// When there is no selection, the index is current cursor position.
1604         /// </remarks>
1605         /// <since_tizen> 9 </since_tizen>
1606         public int SelectedTextStart
1607         {
1608             get
1609             {
1610                 int selectedTextStart;
1611                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextStart))
1612                 {
1613                     propertyValue.Get(out selectedTextStart);
1614                 }
1615                 return selectedTextStart;
1616             }
1617         }
1618
1619         /// <summary>
1620         /// The end index for selection.
1621         /// </summary>
1622         /// <remarks>
1623         /// When there is no selection, the index is current cursor position.
1624         /// </remarks>
1625         /// <since_tizen> 9 </since_tizen>
1626         public int SelectedTextEnd
1627         {
1628             get
1629             {
1630                 int selectedTextEnd;
1631                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextEnd))
1632                 {
1633                     propertyValue.Get(out selectedTextEnd);
1634                 }
1635                 return selectedTextEnd;
1636             }
1637         }
1638
1639         /// <summary>
1640         /// Enable editing in text control.
1641         /// </summary>
1642         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1643         [EditorBrowsable(EditorBrowsableState.Never)]
1644         public bool EnableEditing
1645         {
1646             get
1647             {
1648                 return (bool)GetValue(EnableEditingProperty);
1649             }
1650             set
1651             {
1652                 SetValue(EnableEditingProperty, value);
1653             }
1654         }
1655
1656         private bool InternalEnableEditing
1657         {
1658             get
1659             {
1660                 bool enableEditing;
1661                 using (var propertyValue = GetProperty(TextEditor.Property.EnableEditing))
1662                 {
1663                     propertyValue.Get(out enableEditing);
1664                 }
1665                 return enableEditing;
1666             }
1667             set
1668             {
1669                 using (var propertyValue = new PropertyValue(value))
1670                 {
1671                     SetProperty(TextEditor.Property.EnableEditing, propertyValue);
1672                     NotifyPropertyChanged();
1673                 }
1674             }
1675         }
1676
1677         /// <summary>
1678         /// Specify horizontal scroll position in text control.
1679         /// </summary>
1680         [EditorBrowsable(EditorBrowsableState.Never)]
1681         public int HorizontalScrollPosition
1682         {
1683             get
1684             {
1685                 return (int)GetValue(HorizontalScrollPositionProperty);
1686             }
1687             set
1688             {
1689                 SetValue(HorizontalScrollPositionProperty, value);
1690             }
1691         }
1692
1693         private int InternalHorizontalScrollPosition
1694         {
1695             get
1696             {
1697                 int horizontalScrollPosition;
1698                 using (var propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
1699                 {
1700                     propertyValue.Get(out horizontalScrollPosition);
1701                 }
1702                 return horizontalScrollPosition;
1703             }
1704             set
1705             {
1706                 using (var propertyValue = new PropertyValue(value))
1707                 {
1708                     SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
1709                     NotifyPropertyChanged();
1710                 }
1711             }
1712         }
1713
1714         /// <summary>
1715         /// Specify vertical scroll position in text control.
1716         /// </summary>
1717         [EditorBrowsable(EditorBrowsableState.Never)]
1718         public int VerticalScrollPosition
1719         {
1720             get
1721             {
1722                 return (int)GetValue(VerticalScrollPositionProperty);
1723             }
1724             set
1725             {
1726                 SetValue(VerticalScrollPositionProperty, value);
1727             }
1728         }
1729
1730         private int InternalVerticalScrollPosition
1731         {
1732             get
1733             {
1734                 int verticalScrollPosition;
1735                 using (var propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
1736                 {
1737                     propertyValue.Get(out verticalScrollPosition);
1738                 }
1739                 return verticalScrollPosition;
1740             }
1741             set
1742             {
1743                 using (var propertyValue = new PropertyValue(value))
1744                 {
1745                     SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
1746                     NotifyPropertyChanged();
1747                 }
1748             }
1749         }
1750
1751         /// <summary>
1752         /// PrimaryCursorPosition property.<br />
1753         /// Specify the position of the primary cursor (caret) in text control.
1754         /// </summary>
1755         /// <remarks>
1756         /// If the value set is out of range (negative or greater than or equal the number of characters in Text) then the PrimaryCursorPosition is moved to the end of Text (the number of characters in Text).
1757         /// </remarks>
1758         /// <since_tizen> 10 </since_tizen>
1759         public int PrimaryCursorPosition
1760         {
1761             get
1762             {
1763                 return (int)GetValue(PrimaryCursorPositionProperty);
1764             }
1765             set
1766             {
1767                 SetValue(PrimaryCursorPositionProperty, value);
1768             }
1769         }
1770
1771         private int InternalPrimaryCursorPosition
1772         {
1773             get
1774             {
1775                 int primaryCursorPosition;
1776                 using (var propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
1777                 {
1778                     propertyValue.Get(out primaryCursorPosition);
1779                 }
1780                 return primaryCursorPosition;
1781             }
1782             set
1783             {
1784                 using (var propertyValue = new PropertyValue(value))
1785                 {
1786                     SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
1787                     NotifyPropertyChanged();
1788                 }
1789             }
1790         }
1791
1792         /// <summary>
1793         /// The GrabHandleColor property.
1794         /// </summary>
1795         /// <remarks>
1796         /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
1797         /// </remarks>
1798         [EditorBrowsable(EditorBrowsableState.Never)]
1799         public Color GrabHandleColor
1800         {
1801             get
1802             {
1803                 Color temp = (Color)GetValue(GrabHandleColorProperty);
1804                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1805             }
1806             set
1807             {
1808                 SetValue(GrabHandleColorProperty, value);
1809                 NotifyPropertyChanged();
1810             }
1811         }
1812
1813         /// <summary>
1814         /// Set InputFilter to TextEditor.
1815         /// </summary>
1816         /// <param name="inputFilter">The InputFilter</param>
1817         /// <remarks>
1818         /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
1819         /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
1820         /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description.
1821         /// </remarks>
1822         /// <example>
1823         /// The following example demonstrates how to use the SetInputFilter method.
1824         /// <code>
1825         /// var inputFilter = new Tizen.NUI.Text.InputFilter();
1826         /// inputFilter.Accepted = @"[\d]"; // accept whole digits
1827         /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
1828         /// editor.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
1829         /// </code>
1830         /// </example>
1831         /// <since_tizen> 9 </since_tizen>
1832         public void SetInputFilter(InputFilter inputFilter)
1833         {
1834             using (var map = TextMapHelper.GetInputFilterMap(inputFilter))
1835             using (var propertyValue = new PropertyValue(map))
1836             {
1837                 SetProperty(TextEditor.Property.InputFilter, propertyValue);
1838             }
1839         }
1840
1841         /// <summary>
1842         /// Get InputFilter from TextEditor. <br />
1843         /// </summary>
1844         /// <returns>The InputFilter</returns>
1845         /// <remarks>
1846         /// <see cref="Tizen.NUI.Text.InputFilter"/>
1847         /// </remarks>
1848         /// <since_tizen> 9 </since_tizen>
1849         public InputFilter GetInputFilter()
1850         {
1851             InputFilter inputFilter;
1852             using (var propertyValue = GetProperty(TextEditor.Property.InputFilter))
1853             using (var map = new PropertyMap())
1854             {
1855                 propertyValue.Get(map);
1856                 inputFilter = TextMapHelper.GetInputFilterStruct(map);
1857             }
1858             return inputFilter;
1859         }
1860
1861         /// <summary>
1862         /// Set Strikethrough to TextEditor. <br />
1863         /// </summary>
1864         /// <param name="strikethrough">The Strikethrough</param>
1865         /// <remarks>
1866         /// SetStrikethrough specifies the strikethrough of the text through <see cref="Tizen.NUI.Text.Strikethrough"/>. <br />
1867         /// </remarks>
1868         /// <example>
1869         /// The following example demonstrates how to use the SetStrikethrough method.
1870         /// <code>
1871         /// var strikethrough = new Tizen.NUI.Text.Strikethrough();
1872         /// strikethrough.Enable = true;
1873         /// strikethrough.Color = new Color("#3498DB");
1874         /// strikethrough.Height = 2.0f;
1875         /// editor.SetStrikethrough(strikethrough);
1876         /// </code>
1877         /// </example>
1878         [EditorBrowsable(EditorBrowsableState.Never)]
1879         public void SetStrikethrough(Strikethrough strikethrough)
1880         {
1881             using (var map = TextMapHelper.GetStrikethroughMap(strikethrough))
1882             using (var propertyValue = new PropertyValue(map))
1883             {
1884                 SetProperty(TextEditor.Property.Strikethrough, propertyValue);
1885             }
1886         }
1887
1888         /// <summary>
1889         /// Get Strikethrough from TextEditor. <br />
1890         /// </summary>
1891         /// <returns>The Strikethrough</returns>
1892         /// <remarks>
1893         /// <see cref="Tizen.NUI.Text.Strikethrough"/>
1894         /// </remarks>
1895         [EditorBrowsable(EditorBrowsableState.Never)]
1896         public Strikethrough GetStrikethrough()
1897         {
1898             Strikethrough strikethrough;
1899             using (var propertyValue = GetProperty(TextEditor.Property.Strikethrough))
1900             using (var map = new PropertyMap())
1901             {
1902                 propertyValue.Get(map);
1903                 strikethrough = TextMapHelper.GetStrikethroughStruct(map);
1904             }
1905             return strikethrough;
1906         }
1907
1908         /// <summary>
1909         /// The Placeholder property.
1910         /// The placeholder map contains the following keys :<br />
1911         /// <list type="table">
1912         /// <item><term>text (string)</term><description>The text to display when the TextEditor is empty and inactive</description></item>
1913         /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1914         /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1915         /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1916         /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1917         /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1918         /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1919         /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1920         /// </list>
1921         /// </summary>
1922         /// <example>
1923         /// The following example demonstrates how to set the placeholder property.
1924         /// <code>
1925         /// PropertyMap propertyMap = new PropertyMap();
1926         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1927         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1928         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1929         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1930         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1931         ///
1932         /// PropertyMap fontStyleMap = new PropertyMap();
1933         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1934         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1935         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1936         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1937         ///
1938         /// TextEditor editor = new TextEditor();
1939         /// editor.Placeholder = propertyMap;
1940         /// </code>
1941         /// </example>
1942         /// <since_tizen> 3 </since_tizen>
1943         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1944         public Tizen.NUI.PropertyMap Placeholder
1945         {
1946             get
1947             {
1948                 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
1949                 string defalutText = "";
1950
1951                 if (TextMapHelper.IsValue(map, 0))
1952                     map.Add("text", TextMapHelper.GetStringFromMap(map, 0, defalutText));
1953
1954                 if (TextMapHelper.IsValue(map, 1))
1955                     map.Add("textFocused", TextMapHelper.GetStringFromMap(map, 1, defalutText));
1956
1957                 if (TextMapHelper.IsValue(map, 2))
1958                 {
1959                     using (var color = TextMapHelper.GetColorFromMap(map, 2))
1960                     {
1961                         map.Add("color", color);
1962                     }
1963                 }
1964
1965                 if (TextMapHelper.IsValue(map, 3))
1966                     map.Add("fontFamily", TextMapHelper.GetStringFromMap(map, 3, defalutText));
1967
1968                 if (TextMapHelper.IsValue(map, 4))
1969                 {
1970                     using (var properyValue = map.Find(4))
1971                     using (var fontStyle = new PropertyMap())
1972                     {
1973                         properyValue.Get(fontStyle);
1974                         using (var fontStyleValue = new PropertyValue(fontStyle))
1975                         {
1976                             map.Add("fontStyle", fontStyleValue);
1977                         }
1978                     }
1979                 }
1980
1981                 if (TextMapHelper.IsValue(map, 5))
1982                     map.Add("pointSize", TextMapHelper.GetNullableFloatFromMap(map, 5));
1983
1984                 if (TextMapHelper.IsValue(map, 6))
1985                     map.Add("pixelSize", TextMapHelper.GetNullableFloatFromMap(map, 6));
1986
1987                 if (TextMapHelper.IsValue(map, 7))
1988                     map.Add("ellipsis", TextMapHelper.GetBoolFromMap(map, 7, false));
1989
1990                 return map;
1991             }
1992             set
1993             {
1994                 SetValue(PlaceholderProperty, value);
1995                 NotifyPropertyChanged();
1996             }
1997         }
1998
1999         /// <summary>
2000         /// Set Placeholder to TextEditor. <br />
2001         /// </summary>
2002         /// <param name="placeholder">The Placeholder</param>
2003         /// <remarks>
2004         /// SetPlaceholder specifies the attributes of the placeholder property through <see cref="Tizen.NUI.Text.Placeholder"/>. <br />
2005         /// </remarks>
2006         /// <example>
2007         /// The following example demonstrates how to use the SetPlaceholder method.
2008         /// <code>
2009         /// var placeholder = new Tizen.NUI.Text.Placeholder();
2010         /// placeholder.Text = "placeholder text";
2011         /// placeholder.TextFocused = "placeholder textFocused";
2012         /// placeholder.Color = new Color("#45B39D");
2013         /// placeholder.FontFamily = "BreezeSans";
2014         /// placeholder.FontStyle = new Tizen.NUI.Text.FontStyle()
2015         /// {
2016         ///     Width = FontWidthType.Expanded,
2017         ///     Weight = FontWeightType.ExtraLight,
2018         ///     Slant = FontSlantType.Italic,
2019         /// };
2020         /// placeholder.PointSize = 25.0f;
2021         /// //placeholder.PixelSize = 50.0f;
2022         /// placeholder.Ellipsis = true;
2023         /// editor.SetPlaceholder(placeholder);
2024         /// </code>
2025         /// </example>
2026         [EditorBrowsable(EditorBrowsableState.Never)]
2027         public void SetPlaceholder(Placeholder placeholder)
2028         {
2029             using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
2030             {
2031                 SetValue(PlaceholderProperty, placeholderMap);
2032             }
2033         }
2034
2035         /// <summary>
2036         /// Get Placeholder from TextEditor. <br />
2037         /// </summary>
2038         /// <returns>The Placeholder</returns>
2039         /// <remarks>
2040         /// <see cref="Tizen.NUI.Text.Placeholder"/>
2041         /// </remarks>
2042         [EditorBrowsable(EditorBrowsableState.Never)]
2043         public Placeholder GetPlaceholder()
2044         {
2045             Placeholder placeholder;
2046             using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
2047             {
2048                 placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
2049             }
2050             return placeholder;
2051         }
2052
2053         /// <summary>
2054         /// The Ellipsis property.<br />
2055         /// Enable or disable the ellipsis.<br />
2056         /// </summary>
2057         /// <since_tizen> 9 </since_tizen>
2058         public bool Ellipsis
2059         {
2060             get
2061             {
2062                 return (bool)GetValue(EllipsisProperty);
2063             }
2064             set
2065             {
2066                 SetValue(EllipsisProperty, value);
2067                 NotifyPropertyChanged();
2068             }
2069         }
2070
2071
2072         /// <summary>
2073         /// The ellipsis position of the text.
2074         /// Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.<br />
2075         /// </summary>
2076         /// <since_tizen> 9 </since_tizen>
2077         public EllipsisPosition EllipsisPosition
2078         {
2079             get
2080             {
2081                 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
2082             }
2083             set
2084             {
2085                 SetValue(EllipsisPositionProperty, value);
2086                 NotifyPropertyChanged();
2087             }
2088         }
2089
2090         /// <summary>
2091         /// The LineWrapMode property.<br />
2092         /// The line wrap mode when the text lines over the layout width.<br />
2093         /// </summary>
2094         /// <since_tizen> 4 </since_tizen>
2095         public LineWrapMode LineWrapMode
2096         {
2097             get
2098             {
2099                 return (LineWrapMode)GetValue(LineWrapModeProperty);
2100             }
2101             set
2102             {
2103                 SetValue(LineWrapModeProperty, value);
2104                 NotifyPropertyChanged();
2105             }
2106         }
2107
2108         /// <summary>
2109         /// Enables Text selection using Shift key.
2110         /// </summary>
2111         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
2112         [EditorBrowsable(EditorBrowsableState.Never)]
2113         public bool EnableShiftSelection
2114         {
2115             get
2116             {
2117                 return (bool)GetValue(EnableShiftSelectionProperty);
2118             }
2119             set
2120             {
2121                 SetValue(EnableShiftSelectionProperty, value);
2122                 NotifyPropertyChanged();
2123             }
2124         }
2125
2126         /// <summary>
2127         /// The text alignment to match the direction of the system language.
2128         /// </summary>
2129         /// <since_tizen> 6 </since_tizen>
2130         public bool MatchSystemLanguageDirection
2131         {
2132             get
2133             {
2134                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
2135             }
2136             set
2137             {
2138                 SetValue(MatchSystemLanguageDirectionProperty, value);
2139                 NotifyPropertyChanged();
2140             }
2141         }
2142
2143         /// <summary>
2144         /// The MaxLength property.<br />
2145         /// The maximum number of characters that can be inserted.<br />
2146         /// </summary>
2147         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
2148         [EditorBrowsable(EditorBrowsableState.Never)]
2149         public int MaxLength
2150         {
2151             get
2152             {
2153                 return (int)GetValue(MaxLengthProperty);
2154             }
2155             set
2156             {
2157                 SetValue(MaxLengthProperty, value);
2158                 NotifyPropertyChanged();
2159             }
2160         }
2161
2162         /// <summary>
2163         /// The FontSizeScale property. <br />
2164         /// The default value is 1.0. <br />
2165         /// The given font size scale value is used for multiplying the specified font size before querying fonts. <br />
2166         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
2167         /// </summary>
2168         /// <since_tizen> 9 </since_tizen>
2169         public float FontSizeScale
2170         {
2171             get
2172             {
2173                 return fontSizeScale;
2174             }
2175             set
2176             {
2177                 float newFontSizeScale;
2178
2179                 if (fontSizeScale == value) return;
2180
2181                 fontSizeScale = value;
2182                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
2183                 {
2184                     SystemSettingsFontSize systemSettingsFontSize;
2185
2186                     try
2187                     {
2188                         systemSettingsFontSize = SystemSettings.FontSize;
2189                     }
2190                     catch (Exception e)
2191                     {
2192                         Console.WriteLine("{0} Exception caught.", e);
2193                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
2194                     }
2195                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
2196                     addFontSizeChangedCallback();
2197                 }
2198                 else
2199                 {
2200                     newFontSizeScale = fontSizeScale;
2201                     removeFontSizeChangedCallback();
2202                 }
2203
2204                 SetValue(FontSizeScaleProperty, newFontSizeScale);
2205                 NotifyPropertyChanged();
2206             }
2207         }
2208
2209         /// <summary>
2210         /// The EnableFontSizeScale property.<br />
2211         /// Whether the font size scale is enabled. (The default value is true)
2212         /// </summary>
2213         [EditorBrowsable(EditorBrowsableState.Never)]
2214         public bool EnableFontSizeScale
2215         {
2216             get
2217             {
2218                 return (bool)GetValue(EnableFontSizeScaleProperty);
2219             }
2220             set
2221             {
2222                 SetValue(EnableFontSizeScaleProperty, value);
2223                 NotifyPropertyChanged();
2224             }
2225         }
2226
2227         /// <summary>
2228         /// The InputMethodSettings property.<br />
2229         /// The settings to relating to the System's Input Method, Key and Value.<br />
2230         /// </summary>
2231         /// <remarks>
2232         /// <see cref="InputMethod"/> is a class encapsulating the input method map. Use the <see cref="InputMethod"/> class for this property.
2233         /// </remarks>
2234         /// <example>
2235         /// The following example demonstrates how to set the InputMethodSettings property.
2236         /// <code>
2237         /// InputMethod method = new InputMethod();
2238         /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
2239         /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
2240         /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
2241         /// method.Variation = 1;
2242         /// textEditor.InputMethodSettings = method.OutputMap;
2243         /// </code>
2244         /// </example>
2245         [EditorBrowsable(EditorBrowsableState.Never)]
2246         public PropertyMap InputMethodSettings
2247         {
2248             get
2249             {
2250                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
2251             }
2252             set
2253             {
2254                 SetValue(InputMethodSettingsProperty, value);
2255                 NotifyPropertyChanged();
2256             }
2257         }
2258
2259         /// <summary>
2260         /// Scroll the text control by specific amount..
2261         /// </summary>
2262         /// <param name="scroll">The amount (in pixels) of scrolling in horizontal &amp; vertical directions.</param>
2263         [EditorBrowsable(EditorBrowsableState.Never)]
2264         public void ScrollBy(Vector2 scroll)
2265         {
2266             Interop.TextEditor.ScrollBy(SwigCPtr, Vector2.getCPtr(scroll));
2267             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2268         }
2269
2270         /// <summary>
2271         /// Get the InputMethodContext instance.
2272         /// </summary>
2273         /// <returns>The InputMethodContext instance.</returns>
2274         /// <since_tizen> 5 </since_tizen>
2275         public InputMethodContext GetInputMethodContext()
2276         {
2277             if (inputMethodContext == null)
2278             {
2279                 /*Avoid raising InputMethodContext reference count.*/
2280                 inputMethodContext = new InputMethodContext(Interop.TextEditor.GetInputMethodContext(SwigCPtr), true);
2281                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2282             }
2283             return inputMethodContext;
2284         }
2285
2286         /// <summary>
2287         /// Select the whole text.
2288         /// </summary>
2289         /// <since_tizen> 9 </since_tizen>
2290         public void SelectWholeText()
2291         {
2292             Interop.TextEditor.SelectWholeText(SwigCPtr);
2293             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2294         }
2295
2296         /// <summary>
2297         /// Select text from start to end index. <br />
2298         /// The index is valid when 0 or positive.
2299         /// </summary>
2300         /// <param name="start">The start index for selection.</param>
2301         /// <param name="end">The end index for selection.</param>
2302         /// <remarks>
2303         /// If the end index exceeds the maximum value, it is set to the length of the text.
2304         /// </remarks>
2305         /// <since_tizen> 9 </since_tizen>
2306         public void SelectText(int start, int end)
2307         {
2308             if (start < 0)
2309                 throw new global::System.ArgumentOutOfRangeException(nameof(start), "Value is less than zero");
2310             if (end < 0)
2311                 throw new global::System.ArgumentOutOfRangeException(nameof(end), "Value is less than zero");
2312
2313             Interop.TextEditor.SelectText(SwigCPtr, (uint)start, (uint)end);
2314             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2315         }
2316
2317         /// <summary>
2318         /// Clear selection of the text. <br />
2319         /// Valid when selection is activate.
2320         /// </summary>
2321         /// <since_tizen> 9 </since_tizen>
2322         public void SelectNone()
2323         {
2324             _ = Interop.TextEditor.SelectNone(SwigCPtr);
2325             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2326         }
2327
2328         /// <summary>
2329         /// The Enable grab handle property.<br />
2330         /// Enables the grab handles for text selection.<br />
2331         /// The default value is true, which means the grab handles are enabled by default.<br />
2332         /// </summary>
2333         [EditorBrowsable(EditorBrowsableState.Never)]
2334         public bool EnableGrabHandle
2335         {
2336             get
2337             {
2338                 return (bool)GetValue(EnableGrabHandleProperty);
2339             }
2340             set
2341             {
2342                 SetValue(EnableGrabHandleProperty, value);
2343                 NotifyPropertyChanged();
2344             }
2345         }
2346
2347         /// <summary>
2348         /// The Enable grab handle popup property.<br />
2349         /// Enables the grab handle popup for text selection.<br />
2350         /// The default value is true, which means the grab handle popup is enabled by default.<br />
2351         /// </summary>
2352         [EditorBrowsable(EditorBrowsableState.Never)]
2353         public bool EnableGrabHandlePopup
2354         {
2355             get
2356             {
2357                 return (bool)GetValue(EnableGrabHandlePopupProperty);
2358             }
2359             set
2360             {
2361                 SetValue(EnableGrabHandlePopupProperty, value);
2362                 NotifyPropertyChanged();
2363             }
2364         }
2365
2366         /// <summary>
2367         /// Minimum line size to be used.<br />
2368         /// The height of the line in points. <br />
2369         /// If the font size is larger than the line size, it works with the font size. <br />
2370         /// </summary>
2371         [EditorBrowsable(EditorBrowsableState.Never)]
2372         public float MinLineSize
2373         {
2374             get
2375             {
2376                 return (float)GetValue(MinLineSizeProperty);
2377             }
2378             set
2379             {
2380                 SetValue(MinLineSizeProperty, value);
2381                 NotifyPropertyChanged();
2382             }
2383         }
2384
2385         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
2386         {
2387             SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.InputStyleChangedSignal(SwigCPtr));
2388             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2389             return ret;
2390         }
2391
2392         /// <summary>
2393         /// The spaces between characters in Pixels.
2394         /// <remarks>
2395         /// A positive value will make the characters far apart (expanded) and a negative value will bring them closer (condensed).<br />
2396         /// The default value is 0.f which does nothing.
2397         ///</remarks>
2398         /// </summary>
2399         [EditorBrowsable(EditorBrowsableState.Never)]
2400         public float CharacterSpacing
2401         {
2402             get
2403             {
2404                 return (float)GetValue(CharacterSpacingProperty);
2405             }
2406             set
2407             {
2408                 SetValue(CharacterSpacingProperty, value);
2409                 NotifyPropertyChanged();
2410             }
2411         }
2412
2413         /// <summary>
2414         /// Dispose.
2415         /// </summary>
2416         /// <since_tizen> 3 </since_tizen>
2417         protected override void Dispose(DisposeTypes type)
2418         {
2419             if (disposed)
2420             {
2421                 return;
2422             }
2423
2424 #if NUI_PROPERTY_CHANGE_2
2425             internalPlaceholderTextColor?.Dispose();
2426             internalPrimaryCursorColor?.Dispose();
2427             internalSecondaryCursorColor?.Dispose();
2428             internalSelectionHighlightColor?.Dispose();
2429             internalInputColor?.Dispose();
2430             internalTextColor?.Dispose();
2431             internalGrabHandleColor?.Dispose();
2432 #endif
2433
2434             if (systemlangTextFlag)
2435             {
2436                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
2437             }
2438
2439             removeFontSizeChangedCallback();
2440
2441             //Release your own unmanaged resources here.
2442             //You should not access any managed member here except static instance.
2443             //because the execution order of Finalizes is non-deterministic.
2444
2445             if (this.HasBody())
2446             {
2447                 if (textEditorTextChangedCallbackDelegate != null)
2448                 {
2449                     TextChangedSignal().Disconnect(textEditorTextChangedCallbackDelegate);
2450                 }
2451
2452                 if (textEditorMaxLengthReachedCallbackDelegate != null)
2453                 {
2454                     this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
2455                 }
2456
2457                 if (textEditorSelectionStartedCallbackDelegate != null)
2458                 {
2459                     this.SelectionStartedSignal().Disconnect(textEditorSelectionStartedCallbackDelegate);
2460                 }
2461
2462                 if (textEditorSelectionClearedCallbackDelegate != null)
2463                 {
2464                     this.SelectionClearedSignal().Disconnect(textEditorSelectionClearedCallbackDelegate);
2465                 }
2466
2467                 if (textEditorCursorPositionChangedCallbackDelegate != null)
2468                 {
2469                     this.CursorPositionChangedSignal().Disconnect(textEditorCursorPositionChangedCallbackDelegate);
2470                 }
2471
2472                 if (textEditorSelectionChangedCallbackDelegate != null)
2473                 {
2474                     this.SelectionChangedSignal().Disconnect(textEditorSelectionChangedCallbackDelegate);
2475                 }
2476             }
2477
2478             TextChanged -= TextEditorTextChanged;
2479             base.Dispose(type);
2480         }
2481
2482         /// This will not be public opened.
2483         [EditorBrowsable(EditorBrowsableState.Never)]
2484         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
2485         {
2486             // In order to speed up IME hide, temporarily add
2487             GetInputMethodContext()?.DestroyContext();
2488             Interop.TextEditor.DeleteTextEditor(swigCPtr);
2489         }
2490
2491         internal override LayoutItem CreateDefaultLayout()
2492         {
2493             return new TextEditorLayout();
2494         }
2495
2496         internal void SetTextWithoutTextChanged(string text)
2497         {
2498             invokeTextChanged = false;
2499             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue(text));
2500             invokeTextChanged = true;
2501         }
2502
2503         private string SetTranslatable(string textEditorSid)
2504         {
2505             string translatableText = null;
2506             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
2507             if (translatableText != null)
2508             {
2509                 if (systemlangTextFlag == false)
2510                 {
2511                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
2512                     systemlangTextFlag = true;
2513                 }
2514                 return translatableText;
2515             }
2516             else
2517             {
2518                 translatableText = "";
2519                 return translatableText;
2520             }
2521         }
2522
2523         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
2524         {
2525             if (textEditorTextSid != null)
2526             {
2527                 Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2528             }
2529             if (textEditorPlaceHolderTextSid != null)
2530             {
2531                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2532             }
2533         }
2534
2535         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
2536         {
2537             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
2538             SetValue(FontSizeScaleProperty, newFontSizeScale);
2539             NotifyPropertyChanged();
2540         }
2541
2542         private void addFontSizeChangedCallback()
2543         {
2544             if (hasFontSizeChangedCallback != true)
2545             {
2546                 try
2547                 {
2548                     SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
2549                     hasFontSizeChangedCallback = true;
2550                 }
2551                 catch (Exception e)
2552                 {
2553                     Console.WriteLine("{0} Exception caught.", e);
2554                     hasFontSizeChangedCallback = false;
2555                 }
2556             }
2557         }
2558
2559         private void removeFontSizeChangedCallback()
2560         {
2561             if (hasFontSizeChangedCallback == true)
2562             {
2563                 try
2564                 {
2565                     SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
2566                     hasFontSizeChangedCallback = false;
2567                 }
2568                 catch (Exception e)
2569                 {
2570                     Console.WriteLine("{0} Exception caught.", e);
2571                     hasFontSizeChangedCallback = true;
2572                 }
2573             }
2574         }
2575
2576         private void TextEditorTextChanged(object sender, TextChangedEventArgs e)
2577         {
2578             if (!isSettingTextInCSharp)
2579             {
2580                 EnforceNotifyBindedInstance(TextProperty);
2581             }
2582         }
2583
2584         internal new class Property
2585         {
2586             internal static readonly int TEXT = Interop.TextEditor.TextGet();
2587             internal static readonly int TextColor = Interop.TextEditor.TextColorGet();
2588             internal static readonly int FontFamily = Interop.TextEditor.FontFamilyGet();
2589             internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
2590             internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
2591             internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
2592             internal static readonly int VerticalAlignment = Interop.TextEditor.VerticalAlignmentGet();
2593             internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
2594             internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
2595             internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
2596             internal static readonly int SecondaryCursorColor = Interop.TextEditor.SecondaryCursorColorGet();
2597             internal static readonly int EnableCursorBlink = Interop.TextEditor.EnableCursorBlinkGet();
2598             internal static readonly int CursorBlinkInterval = Interop.TextEditor.CursorBlinkIntervalGet();
2599             internal static readonly int CursorBlinkDuration = Interop.TextEditor.CursorBlinkDurationGet();
2600             internal static readonly int CursorWidth = Interop.TextEditor.CursorWidthGet();
2601             internal static readonly int GrabHandleImage = Interop.TextEditor.GrabHandleImageGet();
2602             internal static readonly int GrabHandlePressedImage = Interop.TextEditor.GrabHandlePressedImageGet();
2603             internal static readonly int SelectionPopupStyle = Interop.TextEditor.SelectionPopupStyleGet();
2604             internal static readonly int SelectionHandleImageLeft = Interop.TextEditor.SelectionHandleImageLeftGet();
2605             internal static readonly int SelectionHandleImageRight = Interop.TextEditor.SelectionHandleImageRightGet();
2606             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextEditor.SelectionHandlePressedImageLeftGet();
2607             internal static readonly int SelectionHandlePressedImageRight = Interop.TextEditor.SelectionHandlePressedImageRightGet();
2608             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextEditor.SelectionHandleMarkerImageLeftGet();
2609             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextEditor.SelectionHandleMarkerImageRightGet();
2610             internal static readonly int SelectionHighlightColor = Interop.TextEditor.SelectionHighlightColorGet();
2611             internal static readonly int DecorationBoundingBox = Interop.TextEditor.DecorationBoundingBoxGet();
2612             internal static readonly int EnableMarkup = Interop.TextEditor.EnableMarkupGet();
2613             internal static readonly int InputColor = Interop.TextEditor.InputColorGet();
2614             internal static readonly int InputFontFamily = Interop.TextEditor.InputFontFamilyGet();
2615             internal static readonly int InputFontStyle = Interop.TextEditor.InputFontStyleGet();
2616             internal static readonly int InputPointSize = Interop.TextEditor.InputPointSizeGet();
2617             internal static readonly int LineSpacing = Interop.TextEditor.LineSpacingGet();
2618             internal static readonly int InputLineSpacing = Interop.TextEditor.InputLineSpacingGet();
2619             internal static readonly int RelativeLineHeight = Interop.TextEditor.RelativeLineHeightGet();
2620             internal static readonly int UNDERLINE = Interop.TextEditor.UnderlineGet();
2621             internal static readonly int InputUnderline = Interop.TextEditor.InputUnderlineGet();
2622             internal static readonly int SHADOW = Interop.TextEditor.ShadowGet();
2623             internal static readonly int InputShadow = Interop.TextEditor.InputShadowGet();
2624             internal static readonly int EMBOSS = Interop.TextEditor.EmbossGet();
2625             internal static readonly int InputEmboss = Interop.TextEditor.InputEmbossGet();
2626             internal static readonly int OUTLINE = Interop.TextEditor.OutlineGet();
2627             internal static readonly int InputOutline = Interop.TextEditor.InputOutlineGet();
2628             internal static readonly int SmoothScroll = Interop.TextEditor.SmoothScrollGet();
2629             internal static readonly int SmoothScrollDuration = Interop.TextEditor.SmoothScrollDurationGet();
2630             internal static readonly int EnableScrollBar = Interop.TextEditor.EnableScrollBarGet();
2631             internal static readonly int ScrollBarShowDuration = Interop.TextEditor.ScrollBarShowDurationGet();
2632             internal static readonly int ScrollBarFadeDuration = Interop.TextEditor.ScrollBarFadeDurationGet();
2633             internal static readonly int PixelSize = Interop.TextEditor.PixelSizeGet();
2634             internal static readonly int LineCount = Interop.TextEditor.LineCountGet();
2635             internal static readonly int EnableSelection = Interop.TextEditor.EnableSelectionGet();
2636             internal static readonly int PLACEHOLDER = Interop.TextEditor.PlaceholderGet();
2637             internal static readonly int LineWrapMode = Interop.TextEditor.LineWrapModeGet();
2638             internal static readonly int PlaceholderText = Interop.TextEditor.PlaceholderTextGet();
2639             internal static readonly int PlaceholderTextColor = Interop.TextEditor.PlaceholderTextColorGet();
2640             internal static readonly int EnableShiftSelection = Interop.TextEditor.EnableShiftSelectionGet();
2641             internal static readonly int MatchSystemLanguageDirection = Interop.TextEditor.MatchSystemLanguageDirectionGet();
2642             internal static readonly int MaxLength = Interop.TextEditor.MaxLengthGet();
2643             internal static readonly int SelectedTextStart = Interop.TextEditor.SelectedTextStartGet();
2644             internal static readonly int SelectedTextEnd = Interop.TextEditor.SelectedTextEndGet();
2645             internal static readonly int EnableEditing = Interop.TextEditor.EnableEditingGet();
2646             internal static readonly int SelectedText = Interop.TextEditor.SelectedTextGet();
2647             internal static readonly int HorizontalScrollPosition = Interop.TextEditor.HorizontalScrollPositionGet();
2648             internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
2649             internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
2650             internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
2651             internal static readonly int EnableFontSizeScale = Interop.TextEditor.EnableFontSizeScaleGet();
2652             internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
2653             internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
2654             internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
2655             internal static readonly int InputMethodSettings = Interop.TextEditor.InputMethodSettingsGet();
2656             internal static readonly int ELLIPSIS = Interop.TextEditor.EllipsisGet();
2657             internal static readonly int EllipsisPosition = Interop.TextEditor.EllipsisPositionGet();
2658             internal static readonly int MinLineSize = Interop.TextEditor.MinLineSizeGet();
2659             internal static readonly int InputFilter = Interop.TextEditor.InputFilterGet();
2660             internal static readonly int Strikethrough = Interop.TextEditor.StrikethroughGet();
2661             internal static readonly int CharacterSpacing = Interop.TextEditor.CharacterSpacingGet();
2662         }
2663
2664         internal class InputStyle
2665         {
2666             internal enum Mask
2667             {
2668                 None = 0x0000,
2669                 Color = 0x0001,
2670                 FontFamily = 0x0002,
2671                 PointSize = 0x0004,
2672                 FontStyle = 0x0008,
2673                 LineSpacing = 0x0010,
2674                 Underline = 0x0020,
2675                 Shadow = 0x0040,
2676                 Emboss = 0x0080,
2677                 Outline = 0x0100
2678             }
2679         }
2680
2681         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
2682         {
2683             DecorationBoundingBox = new Rectangle(x, y, width, height);
2684         }
2685         private void OnInputColorChanged(float x, float y, float z, float w)
2686         {
2687             InputColor = new Vector4(x, y, z, w);
2688         }
2689         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
2690         {
2691             PlaceholderTextColor = new Color(r, g, b, a);
2692         }
2693         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
2694         {
2695             PrimaryCursorColor = new Vector4(x, y, z, w);
2696         }
2697         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
2698         {
2699             SecondaryCursorColor = new Vector4(x, y, z, w);
2700         }
2701         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
2702         {
2703             SelectionHighlightColor = new Vector4(x, y, z, w);
2704         }
2705         private void OnTextColorChanged(float x, float y, float z, float w)
2706         {
2707             TextColor = new Vector4(x, y, z, w);
2708         }
2709         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
2710         {
2711             GrabHandleColor = new Color(r, g, b, a);
2712         }
2713
2714         private class TextEditorLayout : LayoutItem
2715         {
2716             protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
2717             {
2718                 // Padding will be automatically applied by DALi TextEditor.
2719                 var totalWidth = widthMeasureSpec.Size.AsDecimal();
2720                 var totalHeight = heightMeasureSpec.Size.AsDecimal();
2721                 var minSize = Owner.MinimumSize;
2722                 var maxSize = Owner.MaximumSize;
2723                 var naturalSize = Owner.GetNaturalSize();
2724
2725                 if (((TextEditor)Owner).Text.Length == 0)
2726                 {
2727                     // Calculate height of TextEditor by setting Text with " ".
2728                     // By calling SetTextWithoutTextChanged, TextChanged callback is not called for this.
2729                     ((TextEditor)Owner).SetTextWithoutTextChanged(" ");
2730
2731                     // Store original WidthSpecification to restore it after setting ResizePolicy.
2732                     var widthSpecification = Owner.WidthSpecification;
2733
2734                     // In DALi's Size logic, if Width or Height is set to be 0, then
2735                     // ResizePolicy is not changed to Fixed.
2736                     // This causes Size changes after NUI Layout's OnMeasure is finished.
2737                     // e.g. TextEditor's Width fills to its parent although Text is null and
2738                     //      WidthSpecification is WrapContent.
2739                     // To prevent the Size changes, WidthResizePolicy is set to be Fixed
2740                     // in advance if Text is null.
2741                     Owner.WidthResizePolicy = ResizePolicyType.Fixed;
2742
2743                     // Restore WidthSpecification because ResizePolicy changes WidthSpecification.
2744                     Owner.WidthSpecification = widthSpecification;
2745
2746                     naturalSize = Owner.GetNaturalSize();
2747
2748                     // Restore TextEditor's Text after calculating height of TextEditor.
2749                     // By calling SetTextWithoutTextChanged, TextChanged callback is not called for this.
2750                     ((TextEditor)Owner).SetTextWithoutTextChanged("");
2751                 }
2752
2753                 if (widthMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
2754                 {
2755                     totalWidth = Math.Min(Math.Max(naturalSize.Width, minSize.Width), maxSize.Width);
2756                 }
2757
2758                 if (heightMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
2759                 {
2760                     totalHeight = Math.Min(Math.Max(naturalSize.Height, minSize.Height), maxSize.Height);
2761                 }
2762
2763                 widthMeasureSpec = new MeasureSpecification(new LayoutLength(totalWidth), MeasureSpecification.ModeType.Exactly);
2764                 heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);
2765
2766                 MeasuredSize.StateType childWidthState = MeasuredSize.StateType.MeasuredSizeOK;
2767                 MeasuredSize.StateType childHeightState = MeasuredSize.StateType.MeasuredSizeOK;
2768
2769                 SetMeasuredDimensions(ResolveSizeAndState(new LayoutLength(totalWidth), widthMeasureSpec, childWidthState),
2770                                       ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, childHeightState));
2771             }
2772         }
2773     }
2774 }