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