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