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