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