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