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