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