manual bind tts player for nui
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Button.cs
1 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 //
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 // Some have been manually changed
18
19 namespace Tizen.NUI.UIComponents
20 {
21
22     using System;
23     using System.Runtime.InteropServices;
24     using Tizen.NUI.BaseComponents;
25
26     /// <summary>
27     /// Button is a base class for different kinds of buttons.<br>
28     /// This class provides the disabled property and the clicked signal.<br>
29     /// A Clicked event handler is emitted when the button is touched and the touch point doesn't leave the boundary of the button.<br>
30     /// When the disabled property is set to true, no signal is emitted.<br>
31     /// 'Visual' describes not just traditional images like png, bmp but refers to whatever is used to show the button, it could be a color, gradient or some other kind of renderer.<br>
32     /// The button's appearance can be modified by setting properties for the various visuals/images.<br>
33     /// It is not mandatory to set all visuals. A button could be defined only by setting its background visual or by setting its background and selected visuals.<br>
34     /// The button visual is shown over the background visual.<br>
35     /// When pressed the unselected visuals are replaced by the selected visual.<br>
36     /// The text label is always placed on the top of all images.<br>
37     /// When the button is disabled, background, button and selected visuals are replaced by their disabled visuals.<br>
38     /// </summary>
39     public class Button : View
40     {
41         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
42
43         internal Button(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Button_SWIGUpcast(cPtr), cMemoryOwn)
44         {
45             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
46             // By default, we do not want the position to use the anchor point
47             PositionUsesAnchorPoint = false;
48         }
49
50         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Button obj)
51         {
52             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
53         }
54
55         /// <summary>
56         /// To make Button instance be disposed.
57         /// </summary>
58         protected override void Dispose(DisposeTypes type)
59         {
60             if (disposed)
61             {
62                 return;
63             }
64
65             if (type == DisposeTypes.Explicit)
66             {
67                 //Called by User
68                 //Release your own managed resources here.
69                 //You should release all of your own disposable objects here.
70
71             }
72
73             //Release your own unmanaged resources here.
74             //You should not access any managed member here except static instance.
75             //because the execution order of Finalizes is non-deterministic.
76
77             //Unreference this from if a static instance refer to this. 
78             ViewRegistry.UnregisterView(this);
79
80             if (swigCPtr.Handle != global::System.IntPtr.Zero)
81             {
82                 if (swigCMemOwn)
83                 {
84                     swigCMemOwn = false;
85                     NDalicPINVOKE.delete_Button(swigCPtr);
86                 }
87                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
88             }
89
90             base.Dispose(type);
91         }
92
93
94         private EventHandlerWithReturnType<object, EventArgs, bool> _clickedEventHandler;
95         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
96         private delegate bool ClickedCallbackType(global::System.IntPtr data);
97         private ClickedCallbackType _clickedCallback;
98
99         /// <summary>
100         /// Clicked will be triggered when the button is touched and the touch point doesn't leave the boundary of the button.
101         /// </summary>
102         public event EventHandlerWithReturnType<object, EventArgs, bool> Clicked
103         {
104             add
105             {
106                 if (_clickedEventHandler == null)
107                 {
108                     _clickedCallback = OnClicked;
109                     ClickedSignal().Connect(_clickedCallback);
110                 }
111
112                 _clickedEventHandler += value;
113             }
114
115             remove
116             {
117                 _clickedEventHandler -= value;
118
119                 if (_clickedEventHandler == null && ClickedSignal().Empty() == false)
120                 {
121                     ClickedSignal().Disconnect(_clickedCallback);
122                 }
123             }
124         }
125
126
127         private bool OnClicked(IntPtr data)
128         {
129             if (_clickedEventHandler != null)
130             {
131                 return _clickedEventHandler(this, null);
132             }
133             return false;
134         }
135
136
137
138         private EventHandlerWithReturnType<object, EventArgs, bool> _pressedEventHandler;
139         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
140         private delegate bool PressedCallbackType(global::System.IntPtr data);
141         private PressedCallbackType _pressedCallback;
142
143         /// <summary>
144         /// Pressed will be triggered when the button is touched.
145         /// </summary>
146         public event EventHandlerWithReturnType<object, EventArgs, bool> Pressed
147         {
148             add
149             {
150                 if (_pressedEventHandler == null)
151                 {
152                     _pressedCallback = OnPressed;
153                     PressedSignal().Connect(_pressedCallback);
154                 }
155
156                 _pressedEventHandler += value;
157             }
158
159             remove
160             {
161                 _pressedEventHandler -= value;
162
163                 if (_pressedEventHandler == null && PressedSignal().Empty() == false)
164                 {
165                     this.PressedSignal().Disconnect(_pressedCallback);
166                 }
167             }
168         }
169
170         private bool OnPressed(IntPtr data)
171         {
172             if (_pressedEventHandler != null)
173             {
174                 return _pressedEventHandler(this, null);
175             }
176             return false;
177         }
178
179
180
181         private EventHandlerWithReturnType<object, EventArgs, bool> _releasedEventHandler;
182         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
183         private delegate bool ReleasedCallbackType(global::System.IntPtr data);
184         private ReleasedCallbackType _releasedCallback;
185
186         /// <summary>
187         /// Released will be triggered when the button is touched and the touch point leaves the boundary of the button.
188         /// </summary>
189         public event EventHandlerWithReturnType<object, EventArgs, bool> Released
190         {
191             add
192             {
193                 if (_releasedEventHandler == null)
194                 {
195                     _releasedCallback = OnReleased;
196                     ReleasedSignal().Connect(_releasedCallback);
197                 }
198                 _releasedEventHandler += value;
199             }
200
201             remove
202             {
203                 _releasedEventHandler -= value;
204
205                 if (_releasedEventHandler == null && ReleasedSignal().Empty() == false)
206                 {
207                     ReleasedSignal().Disconnect(_releasedCallback);
208                 }
209
210             }
211         }
212
213         private bool OnReleased(IntPtr data)
214         {
215             if (_releasedEventHandler != null)
216             {
217                 return _releasedEventHandler(this, null);
218             }
219             return false;
220         }
221
222
223         private EventHandlerWithReturnType<object, EventArgs, bool> _stateChangedEventHandler;
224         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
225         private delegate bool StateChangedCallback(global::System.IntPtr data);
226         private StateChangedCallback _stateChangedCallback;
227
228         /// <summary>
229         /// StateChanged will be triggered when the button's state is changed.
230         /// </summary>
231         public event EventHandlerWithReturnType<object, EventArgs, bool> StateChanged
232         {
233             add
234             {
235                 if (_stateChangedEventHandler == null)
236                 {
237                     _stateChangedCallback = OnStateChanged;
238                     StateChangedSignal().Connect(_stateChangedCallback);
239                 }
240
241                 _stateChangedEventHandler += value;
242             }
243
244             remove
245             {
246                 _stateChangedEventHandler -= value;
247
248                 if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false)
249                 {
250                     StateChangedSignal().Disconnect(_stateChangedCallback);
251                 }
252             }
253         }
254
255         private bool OnStateChanged(IntPtr data)
256         {
257             if (_stateChangedEventHandler != null)
258             {
259                 return _stateChangedEventHandler(this, null);
260             }
261             return false;
262         }
263
264
265
266         internal static Button GetButtonFromPtr(global::System.IntPtr cPtr)
267         {
268             Button ret = new Button(cPtr, false);
269             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
270             return ret;
271         }
272
273         /// <summary>
274         /// Gets/Sets the unselected button foreground/icon visual
275         /// </summary>
276         public Tizen.NUI.PropertyMap UnselectedVisual
277         {
278             get
279             {
280                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
281                 GetProperty(Button.Property.UNSELECTED_VISUAL).Get(temp);
282                 return temp;
283             }
284             set
285             {
286                 SetProperty(Button.Property.UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
287             }
288         }
289
290         /// <summary>
291         /// Gets/Sets the selected button foreground/icon visual
292         /// </summary>
293         public Tizen.NUI.PropertyMap SelectedVisual
294         {
295             get
296             {
297                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
298                 GetProperty(Button.Property.SELECTED_VISUAL).Get(temp);
299                 return temp;
300             }
301             set
302             {
303                 SetProperty(Button.Property.SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
304             }
305         }
306
307         /// <summary>
308         /// Gets/Sets the disabled selected state foreground/icon button visual
309         /// </summary>
310         public Tizen.NUI.PropertyMap DisabledSelectedVisual
311         {
312             get
313             {
314                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
315                 GetProperty(Button.Property.DISABLED_SELECTED_VISUAL).Get(temp);
316                 return temp;
317             }
318             set
319             {
320                 SetProperty(Button.Property.DISABLED_SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
321             }
322         }
323
324         /// <summary>
325         /// Gets/Sets the disabled unselected state foreground/icon visual
326         /// </summary>
327         public Tizen.NUI.PropertyMap DisabledUnselectedVisual
328         {
329             get
330             {
331                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
332                 GetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL).Get(temp);
333                 return temp;
334             }
335             set
336             {
337                 SetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
338             }
339         }
340
341         /// <summary>
342         /// Gets/Sets the disabled in the unselected state background, button visual
343         /// </summary>
344         public Tizen.NUI.PropertyMap UnselectedBackgroundVisual
345         {
346             get
347             {
348                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
349                 GetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(temp);
350                 return temp;
351             }
352             set
353             {
354                 SetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
355             }
356         }
357
358         /// <summary>
359         /// Gets/Sets the selected background button visual
360         /// </summary>
361         public Tizen.NUI.PropertyMap SelectedBackgroundVisual
362         {
363             get
364             {
365                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
366                 GetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL).Get(temp);
367                 return temp;
368             }
369             set
370             {
371                 SetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
372             }
373         }
374
375         /// <summary>
376         /// Gets/Sets the disabled while unselected background button visual
377         /// </summary>
378         public Tizen.NUI.PropertyMap DisabledUnselectedBackgroundVisual
379         {
380             get
381             {
382                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
383                 GetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(temp);
384                 return temp;
385             }
386             set
387             {
388                 SetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
389             }
390         }
391
392         /// <summary>
393         /// Gets/Sets the disabled while selected background button visual
394         /// </summary>
395         public Tizen.NUI.PropertyMap DisabledSelectedBackgroundVisual
396         {
397             get
398             {
399                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
400                 GetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(temp);
401                 return temp;
402             }
403             set
404             {
405                 SetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
406             }
407         }
408
409         /// <summary>
410         /// Gets/Sets the position of the the label in relation to the foreground/icon if both present
411         /// </summary>
412         public Align LabelRelativeAlignment
413         {
414             get
415             {
416                 string temp;
417                 if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false)
418                 {
419 #if DEBUG_ON
420                     Tizen.Log.Error("NUI", "LabelRelativeAlignment get error!");
421 #endif
422                 }
423                 switch (temp)
424                 {
425                     case "BEGIN":
426                         return Align.Begin;
427                     case "END":
428                         return Align.End;
429                     case "TOP":
430                         return Align.Top;
431                     case "BOTTOM":
432                         return Align.Bottom;
433                     default:
434                         return Align.End;
435                 }
436             }
437             set
438             {
439                 string valueToString = "";
440                 switch (value)
441                 {
442                     case Align.Begin:
443                     {
444                         valueToString = "BEGIN";
445                         break;
446                     }
447                     case Align.End:
448                     {
449                         valueToString = "END";
450                         break;
451                     }
452                     case Align.Top:
453                     {
454                         valueToString = "TOP";
455                         break;
456                     }
457                     case Align.Bottom:
458                     {
459                         valueToString = "BOTTOM";
460                         break;
461                     }
462                     default:
463                     {
464                         valueToString = "END";
465                         break;
466                     }
467                 }
468                 SetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
469             }
470         }
471
472         /// <summary>
473         /// Gets/Sets the padding around the text
474         /// </summary>
475         public Vector4 LabelPadding
476         {
477             get
478             {
479                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
480                 GetProperty(Button.Property.LABEL_PADDING).Get(temp);
481                 return temp;
482             }
483             set
484             {
485                 SetProperty(Button.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value));
486             }
487         }
488
489         /// <summary>
490         /// Gets/Sets the padding around the foreground visual
491         /// </summary>
492         public Vector4 VisualPadding
493         {
494             get
495             {
496                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
497                 GetProperty(Button.Property.VISUAL_PADDING).Get(temp);
498                 return temp;
499             }
500             set
501             {
502                 SetProperty(Button.Property.VISUAL_PADDING, new Tizen.NUI.PropertyValue(value));
503             }
504         }
505
506         internal class Property : global::System.IDisposable
507         {
508             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
509             protected bool swigCMemOwn;
510
511             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
512             {
513                 swigCMemOwn = cMemoryOwn;
514                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
515             }
516
517             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
518             {
519                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
520             }
521
522             //A Flag to check who called Dispose(). (By User or DisposeQueue)
523             private bool isDisposeQueued = false;
524             //A Flat to check if it is already disposed.
525             protected bool disposed = false;
526
527             ~Property()
528             {
529                 if (!isDisposeQueued)
530                 {
531                     isDisposeQueued = true;
532                     DisposeQueue.Instance.Add(this);
533                 }
534             }
535
536             public void Dispose()
537             {
538                 //Throw excpetion if Dispose() is called in separate thread.
539                 if (!Window.IsInstalled())
540                 {
541                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
542                 }
543
544                 if (isDisposeQueued)
545                 {
546                     Dispose(DisposeTypes.Implicit);
547                 }
548                 else
549                 {
550                     Dispose(DisposeTypes.Explicit);
551                     System.GC.SuppressFinalize(this);
552                 }
553             }
554
555             protected virtual void Dispose(DisposeTypes type)
556             {
557                 if (disposed)
558                 {
559                     return;
560                 }
561
562                 if (type == DisposeTypes.Explicit)
563                 {
564                     //Called by User
565                     //Release your own managed resources here.
566                     //You should release all of your own disposable objects here.
567
568                 }
569
570                 //Release your own unmanaged resources here.
571                 //You should not access any managed member here except static instance.
572                 //because the execution order of Finalizes is non-deterministic.
573
574                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
575                 {
576                     if (swigCMemOwn)
577                     {
578                         swigCMemOwn = false;
579                         NDalicPINVOKE.delete_Button_Property(swigCPtr);
580                     }
581                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
582                 }
583
584                 disposed = true;
585             }
586
587             internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get();
588             internal static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get();
589             internal static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get();
590             internal static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get();
591             internal static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get();
592             internal static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get();
593             internal static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get();
594             internal static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get();
595             internal static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get();
596             internal static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get();
597             internal static readonly int VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get();
598             //changed
599             internal Property() : this(NDalicPINVOKE.new_Button_Property(), true)
600             {
601                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602             }
603
604             internal static readonly int DISABLED = NDalicPINVOKE.Button_Property_DISABLED_get();
605             internal static readonly int AUTO_REPEATING = NDalicPINVOKE.Button_Property_AUTO_REPEATING_get();
606             internal static readonly int INITIAL_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_INITIAL_AUTO_REPEATING_DELAY_get();
607             internal static readonly int NEXT_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_NEXT_AUTO_REPEATING_DELAY_get();
608             internal static readonly int TOGGLABLE = NDalicPINVOKE.Button_Property_TOGGLABLE_get();
609             internal static readonly int SELECTED = NDalicPINVOKE.Button_Property_SELECTED_get();
610             internal static readonly int UNSELECTED_COLOR = NDalicPINVOKE.Button_Property_UNSELECTED_COLOR_get();
611             internal static readonly int SELECTED_COLOR = NDalicPINVOKE.Button_Property_SELECTED_COLOR_get();
612             internal static readonly int LABEL = NDalicPINVOKE.Button_Property_LABEL_get();
613             internal static readonly int LABEL_TEXT = NDalicPINVOKE.Button_Property_LABEL_TEXT_get();
614
615         }
616
617         /// <summary>
618         /// Creates an uninitialized Button.<br>
619         /// Only derived versions can be instantiated.<br>
620         /// </summary>
621         public Button() : this(NDalicPINVOKE.new_Button__SWIG_0(), true)
622         {
623             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
624         }
625
626         internal Button(Button button) : this(NDalicPINVOKE.new_Button__SWIG_1(Button.getCPtr(button)), true)
627         {
628             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
629         }
630
631         internal Button Assign(Button button)
632         {
633             Button ret = new Button(NDalicPINVOKE.Button_Assign(swigCPtr, Button.getCPtr(button)), false);
634             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635             return ret;
636         }
637
638         /// <summary>
639         /// Downcasts a handle to Button handle.<br>
640         /// If handle points to a Button, the downcast produces valid handle.<br>
641         /// If not the returned handle is left uninitialized.<br>
642         /// </summary>
643         /// <param name="handle">Handle to an object</param>
644         /// <returns>A handle to a Button or an uninitialized handle</returns>
645         public new static Button DownCast(BaseHandle handle)
646         {
647             Button ret = new Button(NDalicPINVOKE.Button_DownCast(BaseHandle.getCPtr(handle)), true);
648             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
649             return ret;
650         }
651
652         internal bool IsDisabled()
653         {
654             bool ret = NDalicPINVOKE.Button_IsDisabled(swigCPtr);
655             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
656             return ret;
657         }
658
659         internal bool IsAutoRepeating()
660         {
661             bool ret = NDalicPINVOKE.Button_IsAutoRepeating(swigCPtr);
662             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663             return ret;
664         }
665
666         internal float GetInitialAutoRepeatingDelay()
667         {
668             float ret = NDalicPINVOKE.Button_GetInitialAutoRepeatingDelay(swigCPtr);
669             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
670             return ret;
671         }
672
673         internal float GetNextAutoRepeatingDelay()
674         {
675             float ret = NDalicPINVOKE.Button_GetNextAutoRepeatingDelay(swigCPtr);
676             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
677             return ret;
678         }
679
680         internal bool IsTogglableButton()
681         {
682             bool ret = NDalicPINVOKE.Button_IsTogglableButton(swigCPtr);
683             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
684             return ret;
685         }
686
687         internal bool IsSelected()
688         {
689             bool ret = NDalicPINVOKE.Button_IsSelected(swigCPtr);
690             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691             return ret;
692         }
693
694         /// <summary>
695         /// Retrieves button's animation time.
696         /// </summary>
697         /// <returns></returns>
698         public float GetAnimationTime()
699         {
700             float ret = NDalicPINVOKE.Button_GetAnimationTime(swigCPtr);
701             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702             return ret;
703         }
704
705         internal string GetLabelText()
706         {
707             string ret = NDalicPINVOKE.Button_GetLabelText(swigCPtr);
708             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
709             return ret;
710         }
711
712         internal void SetLabel(View label)
713         {
714             NDalicPINVOKE.Button_SetLabel(swigCPtr, View.getCPtr(label));
715             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716         }
717
718         internal void SetButtonImage(Image image)
719         {
720             NDalicPINVOKE.Button_SetButtonImage(swigCPtr, Image.getCPtr(image));
721             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
722         }
723
724         internal void SetSelectedImage(Image image)
725         {
726             NDalicPINVOKE.Button_SetSelectedImage(swigCPtr, Image.getCPtr(image));
727             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
728         }
729
730         internal View GetButtonImage()
731         {
732             View ret = new View(NDalicPINVOKE.Button_GetButtonImage(swigCPtr), true);
733             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
734             return ret;
735         }
736
737         internal View GetSelectedImage()
738         {
739             View ret = new View(NDalicPINVOKE.Button_GetSelectedImage(swigCPtr), true);
740             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
741             return ret;
742         }
743
744         internal ButtonSignal PressedSignal()
745         {
746             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false);
747             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
748             return ret;
749         }
750
751         internal ButtonSignal ReleasedSignal()
752         {
753             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ReleasedSignal(swigCPtr), false);
754             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
755             return ret;
756         }
757
758         internal ButtonSignal ClickedSignal()
759         {
760             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ClickedSignal(swigCPtr), false);
761             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
762             return ret;
763         }
764
765         internal ButtonSignal StateChangedSignal()
766         {
767             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_StateChangedSignal(swigCPtr), false);
768             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
769             return ret;
770         }
771
772         internal enum PropertyRange
773         {
774             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
775             PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000
776         }
777
778         /// <summary>
779         /// Gets/Sets the button as disabled.
780         /// </summary>
781         public bool Disabled
782         {
783             get
784             {
785                 bool temp = false;
786                 GetProperty(Button.Property.DISABLED).Get(ref temp);
787                 return temp;
788             }
789             set
790             {
791                 SetProperty(Button.Property.DISABLED, new Tizen.NUI.PropertyValue(value));
792             }
793         }
794
795         /// <summary>
796         /// If the autorepeating property is set to true then the togglable property is set to false.
797         /// </summary>
798         public bool AutoRepeating
799         {
800             get
801             {
802                 bool temp = false;
803                 GetProperty(Button.Property.AUTO_REPEATING).Get(ref temp);
804                 return temp;
805             }
806             set
807             {
808                 SetProperty(Button.Property.AUTO_REPEATING, new Tizen.NUI.PropertyValue(value));
809             }
810         }
811
812         /// <summary>
813         /// By default this value is set to 0.15 seconds.
814         /// </summary>
815         public float InitialAutoRepeatingDelay
816         {
817             get
818             {
819                 float temp = 0.0f;
820                 GetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY).Get(ref temp);
821                 return temp;
822             }
823             set
824             {
825                 SetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
826             }
827         }
828
829         /// <summary>
830         /// default this value is set to 0.05 seconds.
831         /// </summary>
832         public float NextAutoRepeatingDelay
833         {
834             get
835             {
836                 float temp = 0.0f;
837                 GetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY).Get(ref temp);
838                 return temp;
839             }
840             set
841             {
842                 SetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
843             }
844         }
845
846         /// <summary>
847         /// If the togglable property is set to true, then the autorepeating property is set to false.
848         /// </summary>
849         public bool Togglable
850         {
851             get
852             {
853                 bool temp = false;
854                 GetProperty(Button.Property.TOGGLABLE).Get(ref temp);
855                 return temp;
856             }
857             set
858             {
859                 SetProperty(Button.Property.TOGGLABLE, new Tizen.NUI.PropertyValue(value));
860             }
861         }
862
863         /// <summary>
864         /// /Gets/Sets the togglable button as either selected or unselected, togglable property must be set to true.
865         /// </summary>
866         public bool Selected
867         {
868             get
869             {
870                 bool temp = false;
871                 GetProperty(Button.Property.SELECTED).Get(ref temp);
872                 return temp;
873             }
874             set
875             {
876                 SetProperty(Button.Property.SELECTED, new Tizen.NUI.PropertyValue(value));
877             }
878         }
879
880         /// <summary>
881         /// Gets/Sets unselected color.
882         /// </summary>
883         public Color UnselectedColor
884         {
885             get
886             {
887                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
888                 GetProperty(Button.Property.UNSELECTED_COLOR).Get(temp);
889                 return temp;
890             }
891             set
892             {
893                 SetProperty(Button.Property.UNSELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
894             }
895         }
896
897         /// <summary>
898         /// Gets/Sets selected color.
899         /// </summary>
900         public Color SelectedColor
901         {
902             get
903             {
904                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
905                 GetProperty(Button.Property.SELECTED_COLOR).Get(temp);
906                 return temp;
907             }
908             set
909             {
910                 SetProperty(Button.Property.SELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
911             }
912         }
913
914         /// <summary>
915         /// Gets/Sets label.
916         /// </summary>
917         public Tizen.NUI.PropertyMap Label
918         {
919             get
920             {
921                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
922                 GetProperty(Button.Property.LABEL).Get(temp);
923                 return temp;
924             }
925             set
926             {
927                 SetProperty(Button.Property.LABEL, new Tizen.NUI.PropertyValue(value));
928             }
929         }
930
931         /// <summary>
932         /// Gets/Sets text of label.
933         /// </summary>
934         public string LabelText
935         {
936             get
937             {
938                 string temp;
939                 GetProperty(Button.Property.LABEL_TEXT).Get(out temp);
940                 return temp;
941             }
942             set
943             {
944                 SetProperty(Button.Property.LABEL_TEXT, new Tizen.NUI.PropertyValue(value));
945             }
946         }
947
948         /// <summary>
949         /// Enumeration for describing the position the text label can be in relation to the control(and foreground/icon).
950         /// </summary>
951         public enum Align
952         {
953             /// <summary>
954             /// At the start of the control before the foreground/icon
955             /// </summary>
956             Begin,
957             /// <summary>
958             /// At the end of the control after the foreground/icon
959             /// </summary>
960             End,
961             /// <summary>
962             /// At the top of the control above the foreground/icon
963             /// </summary>
964             Top,
965             /// <summary>
966             /// At the bottom of the control below the foreground/icon
967             /// </summary>
968             Bottom
969         }
970
971     }
972
973 }