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