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