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