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