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