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