Merge "[NUI] Fix WidgetView dispose issue"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextEditor.cs
1 /*
2  * Copyright(c) 2017 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.Runtime.InteropServices;
23 using System.Globalization;
24 using System.ComponentModel;
25
26 namespace Tizen.NUI.BaseComponents
27 {
28     /// <summary>
29     /// A control which provides a multi-line editable text editor.
30     /// </summary>
31     public class TextEditor : View
32     {
33         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34         private string textEditorTextSid = null;
35         private string textEditorPlaceHolderTextSid = null;
36         private bool systemlangTextFlag = false;
37
38         internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextEditor_SWIGUpcast(cPtr), cMemoryOwn)
39         {
40             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41         }
42
43         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
44         {
45             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46         }
47
48         /// <summary>
49         /// Dispose.
50         /// </summary>
51         protected override void Dispose(DisposeTypes type)
52         {
53             if (disposed)
54             {
55                 return;
56             }
57
58             if(type == DisposeTypes.Explicit)
59             {
60                 //Called by User
61                 //Release your own managed resources here.
62                 //You should release all of your own disposable objects here.
63             }
64
65             //Release your own unmanaged resources here.
66             //You should not access any managed member here except static instance.
67             //because the execution order of Finalizes is non-deterministic.
68
69             if (_textEditorTextChangedCallbackDelegate != null)
70             {
71                 TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
72             }
73
74             if (swigCPtr.Handle != global::System.IntPtr.Zero)
75             {
76                 if (swigCMemOwn)
77                 {
78                     swigCMemOwn = false;
79                     NDalicPINVOKE.delete_TextEditor(swigCPtr);
80                 }
81                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
82             }
83
84             base.Dispose(type);
85         }
86
87         /// <summary>
88         /// Event arguments that passed via the TextChanged signal.
89         /// </summary>
90         public class TextChangedEventArgs : EventArgs
91         {
92             private TextEditor _textEditor;
93
94             /// <summary>
95             /// TextEditor - is the texteditor control which has the text contents changed.
96             /// </summary>
97             /// <since_tizen> 3 </since_tizen>
98             public TextEditor TextEditor
99             {
100                 get
101                 {
102                     return _textEditor;
103                 }
104                 set
105                 {
106                     _textEditor = value;
107                 }
108             }
109         }
110
111         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
112         private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
113         private EventHandler<TextChangedEventArgs> _textEditorTextChangedEventHandler;
114         private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
115
116         /// <summary>
117         /// An event for the TextChanged signal which can be used to subscribe or unsubscribe the event handler
118         /// provided by the user. The TextChanged signal is emitted when the text changes.<br />
119         /// </summary>
120         /// <since_tizen> 3 </since_tizen>
121         public event EventHandler<TextChangedEventArgs> TextChanged
122         {
123             add
124             {
125                 if (_textEditorTextChangedEventHandler == null)
126                 {
127                     _textEditorTextChangedCallbackDelegate = (OnTextChanged);
128                     TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
129                 }
130                 _textEditorTextChangedEventHandler += value;
131             }
132             remove
133             {
134                 _textEditorTextChangedEventHandler -= value;
135                 if (_textEditorTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
136                 {
137                     TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
138                 }
139             }
140         }
141
142         private void OnTextChanged(IntPtr textEditor)
143         {
144             TextChangedEventArgs e = new TextChangedEventArgs();
145
146             // Populate all members of "e" (TextChangedEventArgs) with real data
147             e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
148
149             if (_textEditorTextChangedEventHandler != null)
150             {
151                 //here we send all data to user event handlers
152                 _textEditorTextChangedEventHandler(this, e);
153             }
154
155         }
156
157         /// <summary>
158         /// Event arguments that passed via the ScrollStateChanged signal.
159         /// </summary>
160         public class ScrollStateChangedEventArgs : EventArgs
161         {
162             private TextEditor _textEditor;
163             private ScrollState _scrollState;
164
165             /// <summary>
166             /// TextEditor - is the texteditor control which has the scroll state changed.
167             /// </summary>
168             /// <since_tizen> 3 </since_tizen>
169             public TextEditor TextEditor
170             {
171                 get
172                 {
173                     return _textEditor;
174                 }
175                 set
176                 {
177                     _textEditor = value;
178                 }
179             }
180
181             /// <summary>
182             /// ScrollState - is the texteditor control scroll state.
183             /// </summary>
184             /// <since_tizen> 3 </since_tizen>
185             public ScrollState ScrollState
186             {
187                 get
188                 {
189                     return _scrollState;
190                 }
191                 set
192                 {
193                     _scrollState = value;
194                 }
195             }
196         }
197
198         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
199         private delegate void ScrollStateChangedCallbackDelegate(IntPtr textEditor, ScrollState state);
200         private EventHandler<ScrollStateChangedEventArgs> _textEditorScrollStateChangedEventHandler;
201         private ScrollStateChangedCallbackDelegate _textEditorScrollStateChangedCallbackDelegate;
202
203         /// <summary>
204         /// Event for the ScrollStateChanged signal which can be used to subscribe or unsubscribe the event handler
205         /// provided by the user. The ScrollStateChanged signal is emitted when the scroll state changes.<br />
206         /// </summary>
207         /// <since_tizen> 3 </since_tizen>
208         public event EventHandler<ScrollStateChangedEventArgs> ScrollStateChanged
209         {
210             add
211             {
212                 if (_textEditorScrollStateChangedEventHandler == null)
213                 {
214                     _textEditorScrollStateChangedCallbackDelegate = OnScrollStateChanged;
215                     ScrollStateChangedSignal(this).Connect(_textEditorScrollStateChangedCallbackDelegate);
216                 }
217                 _textEditorScrollStateChangedEventHandler += value;
218             }
219             remove
220             {
221                 _textEditorScrollStateChangedEventHandler -= value;
222                 if (_textEditorScrollStateChangedEventHandler == null && ScrollStateChangedSignal(this).Empty() == false)
223                 {
224                     ScrollStateChangedSignal(this).Disconnect(_textEditorScrollStateChangedCallbackDelegate);
225                 }
226             }
227         }
228
229         private void OnScrollStateChanged(IntPtr textEditor, ScrollState state)
230         {
231             ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
232
233             if (textEditor != null)
234             {
235                 // Populate all members of "e" (ScrollStateChangedEventArgs) with real data
236                 e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
237                 e.ScrollState = state;
238             }
239
240             if (_textEditorScrollStateChangedEventHandler != null)
241             {
242                 //here we send all data to user event handlers
243                 _textEditorScrollStateChangedEventHandler(this, e);
244             }
245         }
246
247         internal new class Property
248         {
249             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextEditor_Property_RENDERING_BACKEND_get();
250             internal static readonly int TEXT = NDalicPINVOKE.TextEditor_Property_TEXT_get();
251             internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextEditor_Property_TEXT_COLOR_get();
252             internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_FONT_FAMILY_get();
253             internal static readonly int FONT_STYLE = NDalicPINVOKE.TextEditor_Property_FONT_STYLE_get();
254             internal static readonly int POINT_SIZE = NDalicPINVOKE.TextEditor_Property_POINT_SIZE_get();
255             internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextEditor_Property_HORIZONTAL_ALIGNMENT_get();
256             internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextEditor_Property_SCROLL_THRESHOLD_get();
257             internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextEditor_Property_SCROLL_SPEED_get();
258             internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_PRIMARY_CURSOR_COLOR_get();
259             internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextEditor_Property_SECONDARY_CURSOR_COLOR_get();
260             internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextEditor_Property_ENABLE_CURSOR_BLINK_get();
261             internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_INTERVAL_get();
262             internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextEditor_Property_CURSOR_BLINK_DURATION_get();
263             internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextEditor_Property_CURSOR_WIDTH_get();
264             internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_IMAGE_get();
265             internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextEditor_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
266             internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
267             internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
268             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
269             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
270             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
271             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
272             internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextEditor_Property_SELECTION_HIGHLIGHT_COLOR_get();
273             internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextEditor_Property_DECORATION_BOUNDING_BOX_get();
274             internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextEditor_Property_ENABLE_MARKUP_get();
275             internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextEditor_Property_INPUT_COLOR_get();
276             internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_FAMILY_get();
277             internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextEditor_Property_INPUT_FONT_STYLE_get();
278             internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextEditor_Property_INPUT_POINT_SIZE_get();
279             internal static readonly int LINE_SPACING = NDalicPINVOKE.TextEditor_Property_LINE_SPACING_get();
280             internal static readonly int INPUT_LINE_SPACING = NDalicPINVOKE.TextEditor_Property_INPUT_LINE_SPACING_get();
281             internal static readonly int UNDERLINE = NDalicPINVOKE.TextEditor_Property_UNDERLINE_get();
282             internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextEditor_Property_INPUT_UNDERLINE_get();
283             internal static readonly int SHADOW = NDalicPINVOKE.TextEditor_Property_SHADOW_get();
284             internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextEditor_Property_INPUT_SHADOW_get();
285             internal static readonly int EMBOSS = NDalicPINVOKE.TextEditor_Property_EMBOSS_get();
286             internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextEditor_Property_INPUT_EMBOSS_get();
287             internal static readonly int OUTLINE = NDalicPINVOKE.TextEditor_Property_OUTLINE_get();
288             internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextEditor_Property_INPUT_OUTLINE_get();
289             internal static readonly int SMOOTH_SCROLL = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_get();
290             internal static readonly int SMOOTH_SCROLL_DURATION = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_DURATION_get();
291             internal static readonly int ENABLE_SCROLL_BAR = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SCROLL_BAR_get();
292             internal static readonly int SCROLL_BAR_SHOW_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get();
293             internal static readonly int SCROLL_BAR_FADE_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get();
294             internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextEditor_Property_PIXEL_SIZE_get();
295             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextEditor_Property_LINE_COUNT_get();
296             internal static readonly int PLACEHOLDER_TEXT = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_get();
297             internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
298             internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SELECTION_get();
299             internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_get();
300             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextEditor_Property_LINE_WRAP_MODE_get();
301         }
302
303         internal class InputStyle
304         {
305             internal enum Mask
306             {
307                 None = 0x0000,
308                 Color = 0x0001,
309                 FontFamily = 0x0002,
310                 PointSize = 0x0004,
311                 FontStyle = 0x0008,
312                 LineSpacing = 0x0010,
313                 Underline = 0x0020,
314                 Shadow = 0x0040,
315                 Emboss = 0x0080,
316                 Outline = 0x0100
317             }
318         }
319
320         /// <summary>
321         /// Creates the TextEditor control.
322         /// </summary>
323         /// <since_tizen> 3 </since_tizen>
324         public TextEditor() : this(NDalicPINVOKE.TextEditor_New(), true)
325         {
326             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327
328         }
329         internal TextEditor(TextEditor handle) : this(NDalicPINVOKE.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true)
330         {
331             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332         }
333
334         /// <summary>
335         /// Downcasts a handle to textEditor handle.
336         /// </summary>
337         /// <param name="handle"></param>
338         /// <returns></returns>
339         /// <since_tizen> 3 </since_tizen>
340         /// Please do not use! this will be deprecated!
341         /// Instead please use as keyword.
342         [Obsolete("Please DO NOT use! This will be deprecated, instead please USE as keyword.")]
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public new static TextEditor DownCast(BaseHandle handle)
345         {
346             TextEditor ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as TextEditor;
347             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348             return ret;
349         }
350
351         internal TextEditorSignal TextChangedSignal()
352         {
353             TextEditorSignal ret = new TextEditorSignal(NDalicPINVOKE.TextEditor_TextChangedSignal(swigCPtr), false);
354             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
355             return ret;
356         }
357
358         internal ScrollStateChangedSignal ScrollStateChangedSignal(TextEditor textEditor)
359         {
360             ScrollStateChangedSignal ret = new ScrollStateChangedSignal(NDalicManualPINVOKE.TextEditor_ScrollStateChangedSignal(TextEditor.getCPtr(textEditor)), false);
361             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362             return ret;
363         }
364
365         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
366         {
367             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(NDalicPINVOKE.TextEditor_InputStyleChangedSignal(swigCPtr), false);
368             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369             return ret;
370         }
371
372         /// <summary>
373         /// The TranslatableText property.<br />
374         /// The text can set the SID value.<br />
375         /// </summary>
376         /// <exception cref='ArgumentNullException'>
377         /// ResourceManager about multilingual is null.
378         /// </exception>
379         /// <since_tizen> 4 </since_tizen>
380         public string TranslatableText
381         {
382             get
383             {
384                 return textEditorTextSid;
385             }
386             set
387             {
388                 if (NUIApplication.MultilingualResourceManager == null)
389                 {
390                     throw new ArgumentNullException("ResourceManager about multilingual is null");
391                 }
392                 textEditorTextSid = value;
393                 Text = SetTranslatable(textEditorTextSid);
394             }
395         }
396         /// <summary>
397         /// The TranslatablePlaceholderText property.<br />
398         /// The text can set the SID value.<br />
399         /// </summary>
400         /// <exception cref='ArgumentNullException'>
401         /// ResourceManager about multilingual is null.
402         /// </exception>
403         /// <since_tizen> 4 </since_tizen>
404         public string TranslatablePlaceholderText
405         {
406             get
407             {
408                 return textEditorPlaceHolderTextSid;
409             }
410             set
411             {
412                 if (NUIApplication.MultilingualResourceManager == null)
413                 {
414                     throw new ArgumentNullException("ResourceManager about multilingual is null");
415                 }
416                 textEditorPlaceHolderTextSid = value;
417                 PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
418             }
419         }
420         private string SetTranslatable(string textEditorSid)
421         {
422             string translatableText = null;
423             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
424             if (translatableText != null)
425             {
426                 if (systemlangTextFlag == false)
427                 {
428                     SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
429                     systemlangTextFlag = true;
430                 }
431                 return translatableText;
432             }
433             else
434             {
435                 translatableText = "";
436                 return translatableText;
437             }
438         }
439         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
440         {
441             if (textEditorTextSid != null)
442             {
443                 Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
444             }
445             if (textEditorPlaceHolderTextSid != null)
446             {
447                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
448             }
449         }
450         /// <summary>
451         /// The Text property.
452         /// </summary>
453         /// <since_tizen> 3 </since_tizen>
454         public string Text
455         {
456             get
457             {
458                 string temp;
459                 GetProperty(TextEditor.Property.TEXT).Get(out temp);
460                 return temp;
461             }
462             set
463             {
464                 SetProperty(TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue(value));
465             }
466         }
467
468         /// <summary>
469         /// The TextColor property.
470         /// </summary>
471         /// <since_tizen> 3 </since_tizen>
472         public Vector4 TextColor
473         {
474             get
475             {
476                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
477                 GetProperty(TextEditor.Property.TEXT_COLOR).Get(temp);
478                 return temp;
479             }
480             set
481             {
482                 SetProperty(TextEditor.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
483             }
484         }
485
486         /// <summary>
487         /// The FontFamily property.
488         /// </summary>
489         /// <since_tizen> 3 </since_tizen>
490         public string FontFamily
491         {
492             get
493             {
494                 string temp;
495                 GetProperty(TextEditor.Property.FONT_FAMILY).Get(out temp);
496                 return temp;
497             }
498             set
499             {
500                 SetProperty(TextEditor.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
501             }
502         }
503
504         /// <summary>
505         /// The FontStyle property.
506         /// </summary>
507         /// <since_tizen> 3 </since_tizen>
508         public PropertyMap FontStyle
509         {
510             get
511             {
512                 PropertyMap temp = new PropertyMap();
513                 GetProperty(TextEditor.Property.FONT_STYLE).Get(temp);
514                 return temp;
515             }
516             set
517             {
518                 SetProperty(TextEditor.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
519             }
520         }
521
522         /// <summary>
523         /// The PointSize property.
524         /// </summary>
525         /// <since_tizen> 3 </since_tizen>
526         public float PointSize
527         {
528             get
529             {
530                 float temp = 0.0f;
531                 GetProperty(TextEditor.Property.POINT_SIZE).Get(out temp);
532                 return temp;
533             }
534             set
535             {
536                 SetProperty(TextEditor.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
537             }
538         }
539
540         /// <summary>
541         /// The HorizontalAlignment property.
542         /// </summary>
543         /// <since_tizen> 3 </since_tizen>
544         public HorizontalAlignment HorizontalAlignment
545         {
546             get
547             {
548                 string temp;
549                 if (GetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
550                 {
551                     NUILog.Error("HorizontalAlignment get error!");
552                 }
553
554                 switch (temp)
555                 {
556                     case "BEGIN":
557                         return HorizontalAlignment.Begin;
558                     case "CENTER":
559                         return HorizontalAlignment.Center;
560                     case "END":
561                         return HorizontalAlignment.End;
562                     default:
563                         return HorizontalAlignment.Begin;
564                 }
565             }
566             set
567             {
568                 string valueToString = "";
569                 switch (value)
570                 {
571                     case HorizontalAlignment.Begin:
572                     {
573                         valueToString = "BEGIN";
574                         break;
575                     }
576                     case HorizontalAlignment.Center:
577                     {
578                         valueToString = "CENTER";
579                         break;
580                     }
581                     case HorizontalAlignment.End:
582                     {
583                         valueToString = "END";
584                         break;
585                     }
586                     default:
587                     {
588                         valueToString = "BEGIN";
589                         break;
590                     }
591                 }
592                 SetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
593             }
594         }
595
596         /// <summary>
597         /// The ScrollThreshold property.
598         /// </summary>
599         /// <since_tizen> 3 </since_tizen>
600         public float ScrollThreshold
601         {
602             get
603             {
604                 float temp = 0.0f;
605                 GetProperty(TextEditor.Property.SCROLL_THRESHOLD).Get(out temp);
606                 return temp;
607             }
608             set
609             {
610                 SetProperty(TextEditor.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
611             }
612         }
613
614         /// <summary>
615         /// The ScrollSpeed property.
616         /// </summary>
617         /// <since_tizen> 3 </since_tizen>
618         public float ScrollSpeed
619         {
620             get
621             {
622                 float temp = 0.0f;
623                 GetProperty(TextEditor.Property.SCROLL_SPEED).Get(out temp);
624                 return temp;
625             }
626             set
627             {
628                 SetProperty(TextEditor.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
629             }
630         }
631
632         /// <summary>
633         /// The PrimaryCursorColor property.
634         /// </summary>
635         /// <since_tizen> 3 </since_tizen>
636         public Vector4 PrimaryCursorColor
637         {
638             get
639             {
640                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
641                 GetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR).Get(temp);
642                 return temp;
643             }
644             set
645             {
646                 SetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
647             }
648         }
649
650         /// <summary>
651         /// The SecondaryCursorColor property.
652         /// </summary>
653         /// <since_tizen> 3 </since_tizen>
654         public Vector4 SecondaryCursorColor
655         {
656             get
657             {
658                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
659                 GetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR).Get(temp);
660                 return temp;
661             }
662             set
663             {
664                 SetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
665             }
666         }
667
668         /// <summary>
669         /// The EnableCursorBlink property.
670         /// </summary>
671         /// <since_tizen> 3 </since_tizen>
672         public bool EnableCursorBlink
673         {
674             get
675             {
676                 bool temp = false;
677                 GetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK).Get(out temp);
678                 return temp;
679             }
680             set
681             {
682                 SetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
683             }
684         }
685
686         /// <summary>
687         /// The CursorBlinkInterval property.
688         /// </summary>
689         /// <since_tizen> 3 </since_tizen>
690         public float CursorBlinkInterval
691         {
692             get
693             {
694                 float temp = 0.0f;
695                 GetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
696                 return temp;
697             }
698             set
699             {
700                 SetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
701             }
702         }
703
704         /// <summary>
705         /// The CursorBlinkDuration property.
706         /// </summary>
707         /// <since_tizen> 3 </since_tizen>
708         public float CursorBlinkDuration
709         {
710             get
711             {
712                 float temp = 0.0f;
713                 GetProperty(TextEditor.Property.CURSOR_BLINK_DURATION).Get(out temp);
714                 return temp;
715             }
716             set
717             {
718                 SetProperty(TextEditor.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
719             }
720         }
721
722         /// <summary>
723         /// The CursorWidth property.
724         /// </summary>
725         /// <since_tizen> 3 </since_tizen>
726         public int CursorWidth
727         {
728             get
729             {
730                 int temp = 0;
731                 GetProperty(TextEditor.Property.CURSOR_WIDTH).Get(out temp);
732                 return temp;
733             }
734             set
735             {
736                 SetProperty(TextEditor.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
737             }
738         }
739
740         /// <summary>
741         /// The GrabHandleImage property.
742         /// </summary>
743         /// <since_tizen> 3 </since_tizen>
744         public string GrabHandleImage
745         {
746             get
747             {
748                 string temp;
749                 GetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE).Get(out temp);
750                 return temp;
751             }
752             set
753             {
754                 SetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
755             }
756         }
757
758         /// <summary>
759         /// The GrabHandlePressedImage property.
760         /// </summary>
761         /// <since_tizen> 3 </since_tizen>
762         public string GrabHandlePressedImage
763         {
764             get
765             {
766                 string temp;
767                 GetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
768                 return temp;
769             }
770             set
771             {
772                 SetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
773             }
774         }
775
776         /// <summary>
777         /// The SelectionHandleImageLeft property.
778         /// </summary>
779         /// <since_tizen> 3 </since_tizen>
780         public PropertyMap SelectionHandleImageLeft
781         {
782             get
783             {
784                 PropertyMap temp = new PropertyMap();
785                 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
786                 return temp;
787             }
788             set
789             {
790                 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
791             }
792         }
793
794         /// <summary>
795         /// The SelectionHandleImageRight property.
796         /// </summary>
797         /// <since_tizen> 3 </since_tizen>
798         public PropertyMap SelectionHandleImageRight
799         {
800             get
801             {
802                 PropertyMap temp = new PropertyMap();
803                 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
804                 return temp;
805             }
806             set
807             {
808                 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
809             }
810         }
811
812         /// <summary>
813         /// The SelectionHandlePressedImageLeft property.
814         /// </summary>
815         /// <since_tizen> 3 </since_tizen>
816         public PropertyMap SelectionHandlePressedImageLeft
817         {
818             get
819             {
820                 PropertyMap temp = new PropertyMap();
821                 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
822                 return temp;
823             }
824             set
825             {
826                 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
827             }
828         }
829
830         /// <summary>
831         /// The SelectionHandlePressedImageRight property.
832         /// </summary>
833         /// <since_tizen> 3 </since_tizen>
834         public PropertyMap SelectionHandlePressedImageRight
835         {
836             get
837             {
838                 PropertyMap temp = new PropertyMap();
839                 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
840                 return temp;
841             }
842             set
843             {
844                 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
845             }
846         }
847
848         /// <summary>
849         /// The SelectionHandleMarkerImageLeft property.
850         /// </summary>
851         /// <since_tizen> 3 </since_tizen>
852         public PropertyMap SelectionHandleMarkerImageLeft
853         {
854             get
855             {
856                 PropertyMap temp = new PropertyMap();
857                 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
858                 return temp;
859             }
860             set
861             {
862                 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
863             }
864         }
865
866         /// <summary>
867         /// The SelectionHandleMarkerImageRight property.
868         /// </summary>
869         /// <since_tizen> 3 </since_tizen>
870         public PropertyMap SelectionHandleMarkerImageRight
871         {
872             get
873             {
874                 PropertyMap temp = new PropertyMap();
875                 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
876                 return temp;
877             }
878             set
879             {
880                 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
881             }
882         }
883
884         /// <summary>
885         /// The SelectionHighlightColor property.
886         /// </summary>
887         /// <since_tizen> 3 </since_tizen>
888         public Vector4 SelectionHighlightColor
889         {
890             get
891             {
892                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
893                 GetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
894                 return temp;
895             }
896             set
897             {
898                 SetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
899             }
900         }
901
902         /// <summary>
903         /// The DecorationBoundingBox property.
904         /// </summary>
905         /// <since_tizen> 3 </since_tizen>
906         public Rectangle DecorationBoundingBox
907         {
908             get
909             {
910                 Rectangle temp = new Rectangle(0, 0, 0, 0);
911                 GetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX).Get(temp);
912                 return temp;
913             }
914             set
915             {
916                 SetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
917             }
918         }
919
920         /// <summary>
921         /// The EnableMarkup property.
922         /// </summary>
923         /// <since_tizen> 3 </since_tizen>
924         public bool EnableMarkup
925         {
926             get
927             {
928                 bool temp = false;
929                 GetProperty(TextEditor.Property.ENABLE_MARKUP).Get(out temp);
930                 return temp;
931             }
932             set
933             {
934                 SetProperty(TextEditor.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
935             }
936         }
937
938         /// <summary>
939         /// The InputColor property.
940         /// </summary>
941         /// <since_tizen> 3 </since_tizen>
942         public Vector4 InputColor
943         {
944             get
945             {
946                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
947                 GetProperty(TextEditor.Property.INPUT_COLOR).Get(temp);
948                 return temp;
949             }
950             set
951             {
952                 SetProperty(TextEditor.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
953             }
954         }
955
956         /// <summary>
957         /// The InputFontFamily property.
958         /// </summary>
959         /// <since_tizen> 3 </since_tizen>
960         public string InputFontFamily
961         {
962             get
963             {
964                 string temp;
965                 GetProperty(TextEditor.Property.INPUT_FONT_FAMILY).Get(out temp);
966                 return temp;
967             }
968             set
969             {
970                 SetProperty(TextEditor.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
971             }
972         }
973
974         /// <summary>
975         /// The InputFontStyle property.
976         /// </summary>
977         /// <since_tizen> 3 </since_tizen>
978         public PropertyMap InputFontStyle
979         {
980             get
981             {
982                 PropertyMap temp = new PropertyMap();
983                 GetProperty(TextEditor.Property.INPUT_FONT_STYLE).Get(temp);
984                 return temp;
985             }
986             set
987             {
988                 SetProperty(TextEditor.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
989             }
990         }
991
992         /// <summary>
993         /// The InputPointSize property.
994         /// </summary>
995         /// <since_tizen> 3 </since_tizen>
996         public float InputPointSize
997         {
998             get
999             {
1000                 float temp = 0.0f;
1001                 GetProperty(TextEditor.Property.INPUT_POINT_SIZE).Get(out temp);
1002                 return temp;
1003             }
1004             set
1005             {
1006                 SetProperty(TextEditor.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
1007             }
1008         }
1009
1010         /// <summary>
1011         /// The LineSpacing property.
1012         /// </summary>
1013         /// <since_tizen> 3 </since_tizen>
1014         public float LineSpacing
1015         {
1016             get
1017             {
1018                 float temp = 0.0f;
1019                 GetProperty(TextEditor.Property.LINE_SPACING).Get(out temp);
1020                 return temp;
1021             }
1022             set
1023             {
1024                 SetProperty(TextEditor.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
1025             }
1026         }
1027
1028         /// <summary>
1029         /// The InputLineSpacing property.
1030         /// </summary>
1031         /// <since_tizen> 3 </since_tizen>
1032         public float InputLineSpacing
1033         {
1034             get
1035             {
1036                 float temp = 0.0f;
1037                 GetProperty(TextEditor.Property.INPUT_LINE_SPACING).Get(out temp);
1038                 return temp;
1039             }
1040             set
1041             {
1042                 SetProperty(TextEditor.Property.INPUT_LINE_SPACING, new Tizen.NUI.PropertyValue(value));
1043             }
1044         }
1045
1046         /// <summary>
1047         /// The Underline property.
1048         /// </summary>
1049         /// <since_tizen> 3 </since_tizen>
1050         public PropertyMap Underline
1051         {
1052             get
1053             {
1054                 PropertyMap temp = new PropertyMap();
1055                 GetProperty(TextEditor.Property.UNDERLINE).Get(temp);
1056                 return temp;
1057             }
1058             set
1059             {
1060                 SetProperty(TextEditor.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
1061             }
1062         }
1063
1064         /// <summary>
1065         /// The InputUnderline property.
1066         /// </summary>
1067         /// <since_tizen> 3 </since_tizen>
1068         public string InputUnderline
1069         {
1070             get
1071             {
1072                 string temp;
1073                 GetProperty(TextEditor.Property.INPUT_UNDERLINE).Get(out temp);
1074                 return temp;
1075             }
1076             set
1077             {
1078                 SetProperty(TextEditor.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
1079             }
1080         }
1081
1082         /// <summary>
1083         /// The Shadow property.
1084         /// </summary>
1085         /// <since_tizen> 3 </since_tizen>
1086         public PropertyMap Shadow
1087         {
1088             get
1089             {
1090                 PropertyMap temp = new PropertyMap();
1091                 GetProperty(TextEditor.Property.SHADOW).Get(temp);
1092                 return temp;
1093             }
1094             set
1095             {
1096                 SetProperty(TextEditor.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
1097             }
1098         }
1099
1100         /// <summary>
1101         /// The InputShadow property.
1102         /// </summary>
1103         /// <since_tizen> 3 </since_tizen>
1104         public string InputShadow
1105         {
1106             get
1107             {
1108                 string temp;
1109                 GetProperty(TextEditor.Property.INPUT_SHADOW).Get(out temp);
1110                 return temp;
1111             }
1112             set
1113             {
1114                 SetProperty(TextEditor.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
1115             }
1116         }
1117
1118         /// <summary>
1119         /// The Emboss property.
1120         /// </summary>
1121         /// <since_tizen> 3 </since_tizen>
1122         public string Emboss
1123         {
1124             get
1125             {
1126                 string temp;
1127                 GetProperty(TextEditor.Property.EMBOSS).Get(out temp);
1128                 return temp;
1129             }
1130             set
1131             {
1132                 SetProperty(TextEditor.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1133             }
1134         }
1135
1136         /// <summary>
1137         /// The InputEmboss property.
1138         /// </summary>
1139         /// <since_tizen> 3 </since_tizen>
1140         public string InputEmboss
1141         {
1142             get
1143             {
1144                 string temp;
1145                 GetProperty(TextEditor.Property.INPUT_EMBOSS).Get(out temp);
1146                 return temp;
1147             }
1148             set
1149             {
1150                 SetProperty(TextEditor.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1151             }
1152         }
1153
1154         /// <summary>
1155         /// The Outline property.
1156         /// </summary>
1157         /// <since_tizen> 3 </since_tizen>
1158         public PropertyMap Outline
1159         {
1160             get
1161             {
1162                 PropertyMap temp = new PropertyMap();
1163                 GetProperty(TextEditor.Property.OUTLINE).Get(temp);
1164                 return temp;
1165             }
1166             set
1167             {
1168                 SetProperty(TextEditor.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1169             }
1170         }
1171
1172         /// <summary>
1173         /// The InputOutline property.
1174         /// </summary>
1175         /// <since_tizen> 3 </since_tizen>
1176         public string InputOutline
1177         {
1178             get
1179             {
1180                 string temp;
1181                 GetProperty(TextEditor.Property.INPUT_OUTLINE).Get(out temp);
1182                 return temp;
1183             }
1184             set
1185             {
1186                 SetProperty(TextEditor.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1187             }
1188         }
1189
1190         /// <summary>
1191         /// The SmoothScroll property.
1192         /// </summary>
1193         /// <since_tizen> 3 </since_tizen>
1194         public bool SmoothScroll
1195         {
1196             get
1197             {
1198                 bool temp = false;
1199                 GetProperty(TextEditor.Property.SMOOTH_SCROLL).Get(out temp);
1200                 return temp;
1201             }
1202             set
1203             {
1204                 SetProperty(TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue(value));
1205             }
1206         }
1207
1208         /// <summary>
1209         /// The SmoothScrollDuration property.
1210         /// </summary>
1211         /// <since_tizen> 3 </since_tizen>
1212         public float SmoothScrollDuration
1213         {
1214             get
1215             {
1216                 float temp = 0.0f;
1217                 GetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION).Get(out temp);
1218                 return temp;
1219             }
1220             set
1221             {
1222                 SetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue(value));
1223             }
1224         }
1225
1226         /// <summary>
1227         /// The EnableScrollBar property.
1228         /// </summary>
1229         /// <since_tizen> 3 </since_tizen>
1230         public bool EnableScrollBar
1231         {
1232             get
1233             {
1234                 bool temp = false;
1235                 GetProperty(TextEditor.Property.ENABLE_SCROLL_BAR).Get(out temp);
1236                 return temp;
1237             }
1238             set
1239             {
1240                 SetProperty(TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue(value));
1241             }
1242         }
1243
1244         /// <summary>
1245         /// The ScrollBarShowDuration property.
1246         /// </summary>
1247         /// <since_tizen> 3 </since_tizen>
1248         public float ScrollBarShowDuration
1249         {
1250             get
1251             {
1252                 float temp = 0.0f;
1253                 GetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION).Get(out temp);
1254                 return temp;
1255             }
1256             set
1257             {
1258                 SetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue(value));
1259             }
1260         }
1261
1262         /// <summary>
1263         /// The ScrollBarFadeDuration property.
1264         /// </summary>
1265         /// <since_tizen> 3 </since_tizen>
1266         public float ScrollBarFadeDuration
1267         {
1268             get
1269             {
1270                 float temp = 0.0f;
1271                 GetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION).Get(out temp);
1272                 return temp;
1273             }
1274             set
1275             {
1276                 SetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue(value));
1277             }
1278         }
1279
1280         /// <summary>
1281         /// The PixelSize property.
1282         /// </summary>
1283         /// <since_tizen> 3 </since_tizen>
1284         public float PixelSize
1285         {
1286             get
1287             {
1288                 float temp = 0.0f;
1289                 GetProperty(TextEditor.Property.PIXEL_SIZE).Get(out temp);
1290                 return temp;
1291             }
1292             set
1293             {
1294                 SetProperty(TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1295             }
1296         }
1297
1298         /// <summary>
1299         /// The line count of the text.
1300         /// </summary>
1301         /// <since_tizen> 3 </since_tizen>
1302         public int LineCount
1303         {
1304             get
1305             {
1306                 int temp = 0;
1307                 GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
1308                 return temp;
1309             }
1310         }
1311
1312         /// <summary>
1313         /// The text to display when the TextEditor is empty and inactive.
1314         /// </summary>
1315         /// <since_tizen> 3 </since_tizen>
1316         public string PlaceholderText
1317         {
1318             get
1319             {
1320                 string temp;
1321                 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT).Get(out temp);
1322                 return temp;
1323             }
1324             set
1325             {
1326                 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
1327             }
1328         }
1329
1330         /// <summary>
1331         /// The Placeholder text color.
1332         /// </summary>
1333         /// <since_tizen> 3 </since_tizen>
1334         public Color PlaceholderTextColor
1335         {
1336             get
1337             {
1338                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1339                 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
1340                 return temp;
1341             }
1342             set
1343             {
1344                 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
1345             }
1346         }
1347
1348         /// <summary>
1349         /// The EnableSelection property.
1350         /// </summary>
1351         /// <since_tizen> 4 </since_tizen>
1352         public bool EnableSelection
1353         {
1354             get
1355             {
1356                 bool temp = false;
1357                 GetProperty(TextEditor.Property.ENABLE_SELECTION).Get(out temp);
1358                 return temp;
1359             }
1360             set
1361             {
1362                 SetProperty(TextEditor.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1363             }
1364         }
1365
1366         /// <summary>
1367         /// The Placeholder property.
1368         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1369         /// </summary>
1370         /// <example>
1371         /// The following example demonstrates how to set the placeholder property.
1372         /// <code>
1373         /// PropertyMap propertyMap = new PropertyMap();
1374         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1375         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1376         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1377         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1378         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1379         ///
1380         /// PropertyMap fontStyleMap = new PropertyMap();
1381         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1382         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1383         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1384         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1385         ///
1386         /// TextEditor editor = new TextEditor();
1387         /// editor.Placeholder = propertyMap;
1388         /// </code>
1389         /// </example>
1390         /// <since_tizen> 4 </since_tizen>
1391         public Tizen.NUI.PropertyMap Placeholder
1392         {
1393             get
1394             {
1395                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1396                 GetProperty(TextEditor.Property.PLACEHOLDER).Get(temp);
1397                 return temp;
1398             }
1399             set
1400             {
1401                 SetProperty(TextEditor.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));
1402             }
1403         }
1404
1405         /// <summary>
1406         /// The LineWrapMode property.<br />
1407         /// The line wrap mode when the text lines over the layout width.<br />
1408         /// </summary>
1409         /// <since_tizen> 4 </since_tizen>
1410         public LineWrapMode LineWrapMode
1411         {
1412             get
1413             {
1414                 string temp;
1415                 if(GetProperty(TextEditor.Property.LINE_WRAP_MODE).Get(out temp) == false)
1416                 {
1417                     NUILog.Error("LineWrapMode get error!");
1418                 }
1419                 switch (temp)
1420                 {
1421                     case "WRAP_MODE_WORD":
1422                     return LineWrapMode.Word;
1423                     case "WRAP_MODE_CHARACTER":
1424                     return LineWrapMode.Character;
1425                     default:
1426                     return LineWrapMode.Word;
1427                 }
1428             }
1429             set
1430             {
1431                 string temp = "";
1432                 switch (value)
1433                 {
1434                     case LineWrapMode.Word:
1435                     {
1436                         temp = "WRAP_MODE_WORD";
1437                         break;
1438                     }
1439                     case LineWrapMode.Character:
1440                     {
1441                         temp = "WRAP_MODE_CHARACTER";
1442                         break;
1443                     }
1444                 }
1445                 SetProperty(TextEditor.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
1446             }
1447         }
1448
1449     }
1450
1451 }