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