sync with tizen branch to finalize API
[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
281         }
282
283         internal class InputStyle
284         {
285             internal enum Mask
286             {
287                 None = 0x0000,
288                 Color = 0x0001,
289                 FontFamily = 0x0002,
290                 PointSize = 0x0004,
291                 FontStyle = 0x0008,
292                 LineSpacing = 0x0010,
293                 Underline = 0x0020,
294                 Shadow = 0x0040,
295                 Emboss = 0x0080,
296                 Outline = 0x0100
297             }
298         }
299
300         /// <summary>
301         /// Creates the TextEditor control.
302         /// </summary>
303         public TextEditor() : this(NDalicPINVOKE.TextEditor_New(), true)
304         {
305             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306
307         }
308         internal TextEditor(TextEditor handle) : this(NDalicPINVOKE.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true)
309         {
310             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311         }
312
313         [Obsolete("Please do not use! this will be deprecated")]
314         public new static TextEditor DownCast(BaseHandle handle)
315         {
316             TextEditor ret = new TextEditor(NDalicPINVOKE.TextEditor_DownCast(BaseHandle.getCPtr(handle)), true);
317             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318             return ret;
319         }
320
321         internal TextEditorSignal TextChangedSignal()
322         {
323             TextEditorSignal ret = new TextEditorSignal(NDalicPINVOKE.TextEditor_TextChangedSignal(swigCPtr), false);
324             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325             return ret;
326         }
327
328         internal ScrollStateChangedSignal ScrollStateChangedSignal(TextEditor textEditor)
329         {
330             ScrollStateChangedSignal ret = new ScrollStateChangedSignal(NDalicManualPINVOKE.TextEditor_ScrollStateChangedSignal(TextEditor.getCPtr(textEditor)), false);
331             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332             return ret;
333         }
334
335         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
336         {
337             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);
338             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339             return ret;
340         }
341
342         /// <summary>
343         /// Text property.
344         /// </summary>
345         public string Text
346         {
347             get
348             {
349                 string temp;
350                 GetProperty(TextEditor.Property.TEXT).Get(out temp);
351                 return temp;
352             }
353             set
354             {
355                 SetProperty(TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue(value));
356             }
357         }
358
359         /// <summary>
360         /// Text color property.
361         /// </summary>
362         public Vector4 TextColor
363         {
364             get
365             {
366                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
367                 GetProperty(TextEditor.Property.TEXT_COLOR).Get(temp);
368                 return temp;
369             }
370             set
371             {
372                 SetProperty(TextEditor.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
373             }
374         }
375
376         /// <summary>
377         /// Font family property.
378         /// </summary>
379         public string FontFamily
380         {
381             get
382             {
383                 string temp;
384                 GetProperty(TextEditor.Property.FONT_FAMILY).Get(out temp);
385                 return temp;
386             }
387             set
388             {
389                 SetProperty(TextEditor.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
390             }
391         }
392
393         /// <summary>
394         /// Font style property.
395         /// </summary>
396         public PropertyMap FontStyle
397         {
398             get
399             {
400                 PropertyMap temp = new PropertyMap();
401                 GetProperty(TextEditor.Property.FONT_STYLE).Get(temp);
402                 return temp;
403             }
404             set
405             {
406                 SetProperty(TextEditor.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
407             }
408         }
409
410         /// <summary>
411         /// Point size property.
412         /// </summary>
413         public float PointSize
414         {
415             get
416             {
417                 float temp = 0.0f;
418                 GetProperty(TextEditor.Property.POINT_SIZE).Get(out temp);
419                 return temp;
420             }
421             set
422             {
423                 SetProperty(TextEditor.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
424             }
425         }
426
427         /// <summary>
428         /// Horizontal alignment property.
429         /// </summary>
430         public HorizontalAlignment HorizontalAlignment
431         {
432             get
433             {
434                 string temp;
435                 if (GetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
436                 {
437                     NUILog.Error("HorizontalAlignment get error!");
438                 }
439
440                 switch (temp)
441                 {
442                     case "BEGIN":
443                         return HorizontalAlignment.Begin;
444                     case "CENTER":
445                         return HorizontalAlignment.Center;
446                     case "END":
447                         return HorizontalAlignment.End;
448                     default:
449                         return HorizontalAlignment.Begin;
450                 }
451             }
452             set
453             {
454                 string valueToString = "";
455                 switch (value)
456                 {
457                     case HorizontalAlignment.Begin:
458                     {
459                         valueToString = "BEGIN";
460                         break;
461                     }
462                     case HorizontalAlignment.Center:
463                     {
464                         valueToString = "CENTER";
465                         break;
466                     }
467                     case HorizontalAlignment.End:
468                     {
469                         valueToString = "END";
470                         break;
471                     }
472                     default:
473                     {
474                         valueToString = "BEGIN";
475                         break;
476                     }
477                 }
478                 SetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
479             }
480         }
481
482         /// <summary>
483         /// Scroll threshold property.
484         /// </summary>
485         public float ScrollThreshold
486         {
487             get
488             {
489                 float temp = 0.0f;
490                 GetProperty(TextEditor.Property.SCROLL_THRESHOLD).Get(out temp);
491                 return temp;
492             }
493             set
494             {
495                 SetProperty(TextEditor.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
496             }
497         }
498
499         /// <summary>
500         /// Scroll speed property.
501         /// </summary>
502         public float ScrollSpeed
503         {
504             get
505             {
506                 float temp = 0.0f;
507                 GetProperty(TextEditor.Property.SCROLL_SPEED).Get(out temp);
508                 return temp;
509             }
510             set
511             {
512                 SetProperty(TextEditor.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
513             }
514         }
515
516         /// <summary>
517         /// Primary cursor color property.
518         /// </summary>
519         public Vector4 PrimaryCursorColor
520         {
521             get
522             {
523                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
524                 GetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR).Get(temp);
525                 return temp;
526             }
527             set
528             {
529                 SetProperty(TextEditor.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
530             }
531         }
532
533         /// <summary>
534         /// SecondaryCursorColor property.
535         /// </summary>
536         public Vector4 SecondaryCursorColor
537         {
538             get
539             {
540                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
541                 GetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR).Get(temp);
542                 return temp;
543             }
544             set
545             {
546                 SetProperty(TextEditor.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
547             }
548         }
549
550         /// <summary>
551         /// EnableCursorBlink property.
552         /// </summary>
553         public bool EnableCursorBlink
554         {
555             get
556             {
557                 bool temp = false;
558                 GetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK).Get(out temp);
559                 return temp;
560             }
561             set
562             {
563                 SetProperty(TextEditor.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
564             }
565         }
566
567         /// <summary>
568         /// CursorBlinkInterval property.
569         /// </summary>
570         public float CursorBlinkInterval
571         {
572             get
573             {
574                 float temp = 0.0f;
575                 GetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
576                 return temp;
577             }
578             set
579             {
580                 SetProperty(TextEditor.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
581             }
582         }
583
584         /// <summary>
585         /// CursorBlinkDuration property.
586         /// </summary>
587         public float CursorBlinkDuration
588         {
589             get
590             {
591                 float temp = 0.0f;
592                 GetProperty(TextEditor.Property.CURSOR_BLINK_DURATION).Get(out temp);
593                 return temp;
594             }
595             set
596             {
597                 SetProperty(TextEditor.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
598             }
599         }
600
601         /// <summary>
602         /// CursorWidth property.
603         /// </summary>
604         public int CursorWidth
605         {
606             get
607             {
608                 int temp = 0;
609                 GetProperty(TextEditor.Property.CURSOR_WIDTH).Get(out temp);
610                 return temp;
611             }
612             set
613             {
614                 SetProperty(TextEditor.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
615             }
616         }
617
618         /// <summary>
619         /// GrabHandleImage property.
620         /// </summary>
621         public string GrabHandleImage
622         {
623             get
624             {
625                 string temp;
626                 GetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE).Get(out temp);
627                 return temp;
628             }
629             set
630             {
631                 SetProperty(TextEditor.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
632             }
633         }
634
635         /// <summary>
636         /// GrabHandlePressedImage property.
637         /// </summary>
638         public string GrabHandlePressedImage
639         {
640             get
641             {
642                 string temp;
643                 GetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
644                 return temp;
645             }
646             set
647             {
648                 SetProperty(TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
649             }
650         }
651
652         /// <summary>
653         /// SelectionHandleImageLeft property.
654         /// </summary>
655         public PropertyMap SelectionHandleImageLeft
656         {
657             get
658             {
659                 PropertyMap temp = new PropertyMap();
660                 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
661                 return temp;
662             }
663             set
664             {
665                 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
666             }
667         }
668
669         /// <summary>
670         /// SelectionHandleImageRight property.
671         /// </summary>
672         public PropertyMap SelectionHandleImageRight
673         {
674             get
675             {
676                 PropertyMap temp = new PropertyMap();
677                 GetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
678                 return temp;
679             }
680             set
681             {
682                 SetProperty(TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
683             }
684         }
685
686         /// <summary>
687         /// SelectionHandlePressedImageLeft property.
688         /// </summary>
689         public PropertyMap SelectionHandlePressedImageLeft
690         {
691             get
692             {
693                 PropertyMap temp = new PropertyMap();
694                 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
695                 return temp;
696             }
697             set
698             {
699                 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
700             }
701         }
702
703         /// <summary>
704         /// SelectionHandlePressedImageRight property.
705         /// </summary>
706         public PropertyMap SelectionHandlePressedImageRight
707         {
708             get
709             {
710                 PropertyMap temp = new PropertyMap();
711                 GetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
712                 return temp;
713             }
714             set
715             {
716                 SetProperty(TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
717             }
718         }
719
720         /// <summary>
721         /// SelectionHandleMarkerImageLeft property.
722         /// </summary>
723         public PropertyMap SelectionHandleMarkerImageLeft
724         {
725             get
726             {
727                 PropertyMap temp = new PropertyMap();
728                 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
729                 return temp;
730             }
731             set
732             {
733                 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
734             }
735         }
736
737         /// <summary>
738         /// SelectionHandleMarkerImageRight property.
739         /// </summary>
740         public PropertyMap SelectionHandleMarkerImageRight
741         {
742             get
743             {
744                 PropertyMap temp = new PropertyMap();
745                 GetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
746                 return temp;
747             }
748             set
749             {
750                 SetProperty(TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
751             }
752         }
753
754         /// <summary>
755         /// SelectionHighlightColor property.
756         /// </summary>
757         public Vector4 SelectionHighlightColor
758         {
759             get
760             {
761                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
762                 GetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
763                 return temp;
764             }
765             set
766             {
767                 SetProperty(TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
768             }
769         }
770
771         /// <summary>
772         /// DecorationBoundingBox property.
773         /// </summary>
774         public Rectangle DecorationBoundingBox
775         {
776             get
777             {
778                 Rectangle temp = new Rectangle(0, 0, 0, 0);
779                 GetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX).Get(temp);
780                 return temp;
781             }
782             set
783             {
784                 SetProperty(TextEditor.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
785             }
786         }
787
788         /// <summary>
789         /// EnableMarkup property.
790         /// </summary>
791         public bool EnableMarkup
792         {
793             get
794             {
795                 bool temp = false;
796                 GetProperty(TextEditor.Property.ENABLE_MARKUP).Get(out temp);
797                 return temp;
798             }
799             set
800             {
801                 SetProperty(TextEditor.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
802             }
803         }
804
805         /// <summary>
806         /// InputColor property.
807         /// </summary>
808         public Vector4 InputColor
809         {
810             get
811             {
812                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
813                 GetProperty(TextEditor.Property.INPUT_COLOR).Get(temp);
814                 return temp;
815             }
816             set
817             {
818                 SetProperty(TextEditor.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
819             }
820         }
821
822         /// <summary>
823         /// InputFontFamily property.
824         /// </summary>
825         public string InputFontFamily
826         {
827             get
828             {
829                 string temp;
830                 GetProperty(TextEditor.Property.INPUT_FONT_FAMILY).Get(out temp);
831                 return temp;
832             }
833             set
834             {
835                 SetProperty(TextEditor.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
836             }
837         }
838
839         /// <summary>
840         /// InputFontStyle property.
841         /// </summary>
842         public PropertyMap InputFontStyle
843         {
844             get
845             {
846                 PropertyMap temp = new PropertyMap();
847                 GetProperty(TextEditor.Property.INPUT_FONT_STYLE).Get(temp);
848                 return temp;
849             }
850             set
851             {
852                 SetProperty(TextEditor.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
853             }
854         }
855
856         /// <summary>
857         /// InputPointSize property.
858         /// </summary>
859         public float InputPointSize
860         {
861             get
862             {
863                 float temp = 0.0f;
864                 GetProperty(TextEditor.Property.INPUT_POINT_SIZE).Get(out temp);
865                 return temp;
866             }
867             set
868             {
869                 SetProperty(TextEditor.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
870             }
871         }
872
873         /// <summary>
874         /// LineSpacing property.
875         /// </summary>
876         public float LineSpacing
877         {
878             get
879             {
880                 float temp = 0.0f;
881                 GetProperty(TextEditor.Property.LINE_SPACING).Get(out temp);
882                 return temp;
883             }
884             set
885             {
886                 SetProperty(TextEditor.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
887             }
888         }
889
890         /// <summary>
891         /// InputLineSpacing property.
892         /// </summary>
893         public float InputLineSpacing
894         {
895             get
896             {
897                 float temp = 0.0f;
898                 GetProperty(TextEditor.Property.INPUT_LINE_SPACING).Get(out temp);
899                 return temp;
900             }
901             set
902             {
903                 SetProperty(TextEditor.Property.INPUT_LINE_SPACING, new Tizen.NUI.PropertyValue(value));
904             }
905         }
906
907         /// <summary>
908         /// Underline property.
909         /// </summary>
910         public PropertyMap Underline
911         {
912             get
913             {
914                 PropertyMap temp = new PropertyMap();
915                 GetProperty(TextEditor.Property.UNDERLINE).Get(temp);
916                 return temp;
917             }
918             set
919             {
920                 SetProperty(TextEditor.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
921             }
922         }
923
924         /// <summary>
925         /// InputUnderline property.
926         /// </summary>
927         public string InputUnderline
928         {
929             get
930             {
931                 string temp;
932                 GetProperty(TextEditor.Property.INPUT_UNDERLINE).Get(out temp);
933                 return temp;
934             }
935             set
936             {
937                 SetProperty(TextEditor.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
938             }
939         }
940
941         /// <summary>
942         /// Shadow property.
943         /// </summary>
944         public PropertyMap Shadow
945         {
946             get
947             {
948                 PropertyMap temp = new PropertyMap();
949                 GetProperty(TextEditor.Property.SHADOW).Get(temp);
950                 return temp;
951             }
952             set
953             {
954                 SetProperty(TextEditor.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
955             }
956         }
957
958         /// <summary>
959         /// InputShadow property.
960         /// </summary>
961         public string InputShadow
962         {
963             get
964             {
965                 string temp;
966                 GetProperty(TextEditor.Property.INPUT_SHADOW).Get(out temp);
967                 return temp;
968             }
969             set
970             {
971                 SetProperty(TextEditor.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
972             }
973         }
974
975         /// <summary>
976         /// Emboss property.
977         /// </summary>
978         public string Emboss
979         {
980             get
981             {
982                 string temp;
983                 GetProperty(TextEditor.Property.EMBOSS).Get(out temp);
984                 return temp;
985             }
986             set
987             {
988                 SetProperty(TextEditor.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
989             }
990         }
991
992         /// <summary>
993         /// InputEmboss property.
994         /// </summary>
995         public string InputEmboss
996         {
997             get
998             {
999                 string temp;
1000                 GetProperty(TextEditor.Property.INPUT_EMBOSS).Get(out temp);
1001                 return temp;
1002             }
1003             set
1004             {
1005                 SetProperty(TextEditor.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1006             }
1007         }
1008
1009         /// <summary>
1010         /// Outline property.
1011         /// </summary>
1012         public string Outline
1013         {
1014             get
1015             {
1016                 string temp;
1017                 GetProperty(TextEditor.Property.OUTLINE).Get(out temp);
1018                 return temp;
1019             }
1020             set
1021             {
1022                 SetProperty(TextEditor.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1023             }
1024         }
1025
1026         /// <summary>
1027         /// InputOutline property.
1028         /// </summary>
1029         public string InputOutline
1030         {
1031             get
1032             {
1033                 string temp;
1034                 GetProperty(TextEditor.Property.INPUT_OUTLINE).Get(out temp);
1035                 return temp;
1036             }
1037             set
1038             {
1039                 SetProperty(TextEditor.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1040             }
1041         }
1042
1043         /// <summary>
1044         /// SmoothScroll property.
1045         /// </summary>
1046         public bool SmoothScroll
1047         {
1048             get
1049             {
1050                 bool temp = false;
1051                 GetProperty(TextEditor.Property.SMOOTH_SCROLL).Get(out temp);
1052                 return temp;
1053             }
1054             set
1055             {
1056                 SetProperty(TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue(value));
1057             }
1058         }
1059
1060         /// <summary>
1061         /// SmoothScrollDuration property.
1062         /// </summary>
1063         public float SmoothScrollDuration
1064         {
1065             get
1066             {
1067                 float temp = 0.0f;
1068                 GetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION).Get(out temp);
1069                 return temp;
1070             }
1071             set
1072             {
1073                 SetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue(value));
1074             }
1075         }
1076
1077         /// <summary>
1078         /// EnableScrollBar property.
1079         /// </summary>
1080         public bool EnableScrollBar
1081         {
1082             get
1083             {
1084                 bool temp = false;
1085                 GetProperty(TextEditor.Property.ENABLE_SCROLL_BAR).Get(out temp);
1086                 return temp;
1087             }
1088             set
1089             {
1090                 SetProperty(TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue(value));
1091             }
1092         }
1093
1094         /// <summary>
1095         /// ScrollBarShowDuration property.
1096         /// </summary>
1097         public float ScrollBarShowDuration
1098         {
1099             get
1100             {
1101                 float temp = 0.0f;
1102                 GetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION).Get(out temp);
1103                 return temp;
1104             }
1105             set
1106             {
1107                 SetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue(value));
1108             }
1109         }
1110
1111         /// <summary>
1112         /// ScrollBarFadeDuration property.
1113         /// </summary>
1114         public float ScrollBarFadeDuration
1115         {
1116             get
1117             {
1118                 float temp = 0.0f;
1119                 GetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION).Get(out temp);
1120                 return temp;
1121             }
1122             set
1123             {
1124                 SetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue(value));
1125             }
1126         }
1127
1128         /// <summary>
1129         /// PixelSize property.
1130         /// </summary>
1131         public float PixelSize
1132         {
1133             get
1134             {
1135                 float temp = 0.0f;
1136                 GetProperty(TextEditor.Property.PIXEL_SIZE).Get(out temp);
1137                 return temp;
1138             }
1139             set
1140             {
1141                 SetProperty(TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1142             }
1143         }
1144
1145         /// <summary>
1146         /// The line count of text.
1147         /// </summary>
1148         public int LineCount
1149         {
1150             get
1151             {
1152                 int temp = 0;
1153                 GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
1154                 return temp;
1155             }
1156         }
1157
1158         /// <summary>
1159         /// The text to display when the TextEditor is empty and inactive.
1160         /// </summary>
1161         public string PlaceholderText
1162         {
1163             get
1164             {
1165                 string temp;
1166                 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT).Get(out temp);
1167                 return temp;
1168             }
1169             set
1170             {
1171                 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
1172             }
1173         }
1174
1175         /// <summary>
1176         /// The placeholder-text color.
1177         /// </summary>
1178         public Color PlaceholderTextColor
1179         {
1180             get
1181             {
1182                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
1183                 GetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
1184                 return temp;
1185             }
1186             set
1187             {
1188                 SetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
1189             }
1190         }
1191
1192     }
1193
1194 }