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