Merge "Resource ready signal for Controls (for ImageLoading)" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / PushButton.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 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 public class PushButton : Button {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32   internal PushButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PushButton_SWIGUpcast(cPtr), cMemoryOwn) {
33     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34   }
35
36   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PushButton obj) {
37     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38   }
39
40   ~PushButton() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_PushButton(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public class Property : global::System.IDisposable {
65     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66     protected bool swigCMemOwn;
67   
68     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
69       swigCMemOwn = cMemoryOwn;
70       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
71     }
72   
73     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
74       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
75     }
76   
77     ~Property() {
78       Dispose();
79     }
80   
81     public virtual void Dispose() {
82       lock(this) {
83         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
84           if (swigCMemOwn) {
85             swigCMemOwn = false;
86             NDalicPINVOKE.delete_PushButton_Property(swigCPtr);
87           }
88           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
89         }
90         global::System.GC.SuppressFinalize(this);
91       }
92     }
93   
94     public Property() : this(NDalicPINVOKE.new_PushButton_Property(), true) {
95       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96     }
97   
98     public static readonly int UNSELECTED_ICON = NDalicPINVOKE.PushButton_Property_UNSELECTED_ICON_get();
99     public static readonly int SELECTED_ICON = NDalicPINVOKE.PushButton_Property_SELECTED_ICON_get();
100     public static readonly int ICON_ALIGNMENT = NDalicPINVOKE.PushButton_Property_ICON_ALIGNMENT_get();
101     public static readonly int LABEL_PADDING = NDalicPINVOKE.PushButton_Property_LABEL_PADDING_get();
102     public static readonly int ICON_PADDING = NDalicPINVOKE.PushButton_Property_ICON_PADDING_get();
103   
104   }
105
106   public PushButton () : this (NDalicPINVOKE.PushButton_New(), true) {
107       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108
109   }
110   public PushButton(PushButton pushButton) : this(NDalicPINVOKE.new_PushButton__SWIG_1(PushButton.getCPtr(pushButton)), true) {
111     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112   }
113
114   public PushButton Assign(PushButton pushButton) {
115     PushButton ret = new PushButton(NDalicPINVOKE.PushButton_Assign(swigCPtr, PushButton.getCPtr(pushButton)), false);
116     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117     return ret;
118   }
119
120   public new static PushButton DownCast(BaseHandle handle) {
121     PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);
122     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123     return ret;
124   }
125
126   public new void SetButtonImage(Image image) {
127     NDalicPINVOKE.PushButton_SetButtonImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));
128     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129   }
130
131   public void SetButtonImage(Actor image) {
132     NDalicPINVOKE.PushButton_SetButtonImage__SWIG_1(swigCPtr, Actor.getCPtr(image));
133     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134   }
135
136   public void SetBackgroundImage(Actor image) {
137     NDalicPINVOKE.PushButton_SetBackgroundImage(swigCPtr, Actor.getCPtr(image));
138     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139   }
140
141   public new void SetSelectedImage(Image image) {
142     NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));
143     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144   }
145
146   public void SetSelectedImage(Actor image) {
147     NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_1(swigCPtr, Actor.getCPtr(image));
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149   }
150
151   public void SetSelectedBackgroundImage(Actor image) {
152     NDalicPINVOKE.PushButton_SetSelectedBackgroundImage(swigCPtr, Actor.getCPtr(image));
153     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154   }
155
156   public void SetDisabledBackgroundImage(Actor image) {
157     NDalicPINVOKE.PushButton_SetDisabledBackgroundImage(swigCPtr, Actor.getCPtr(image));
158     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159   }
160
161   public void SetDisabledImage(Actor image) {
162     NDalicPINVOKE.PushButton_SetDisabledImage(swigCPtr, Actor.getCPtr(image));
163     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164   }
165
166   public void SetDisabledSelectedImage(Actor image) {
167     NDalicPINVOKE.PushButton_SetDisabledSelectedImage(swigCPtr, Actor.getCPtr(image));
168     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169   }
170
171   public enum PropertyRange {
172     PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
173     PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
174   }
175
176   public string UnselectedIcon
177   {
178     get
179     {
180       string temp;
181       GetProperty( PushButton.Property.UNSELECTED_ICON).Get( out temp );
182       return temp;
183     }
184     set
185     {
186       SetProperty( PushButton.Property.UNSELECTED_ICON, new Dali.Property.Value( value ) );
187     }
188   }
189   public string SelectedIcon
190   {
191     get
192     {
193       string temp;
194       GetProperty( PushButton.Property.SELECTED_ICON).Get( out temp );
195       return temp;
196     }
197     set
198     {
199       SetProperty( PushButton.Property.SELECTED_ICON, new Dali.Property.Value( value ) );
200     }
201   }
202   public string IconAlignment
203   {
204     get
205     {
206       string temp;
207       GetProperty( PushButton.Property.ICON_ALIGNMENT).Get( out temp );
208       return temp;
209     }
210     set
211     {
212       SetProperty( PushButton.Property.ICON_ALIGNMENT, new Dali.Property.Value( value ) );
213     }
214   }
215   public string LabelPadding
216   {
217     get
218     {
219       string temp;
220       GetProperty( PushButton.Property.LABEL_PADDING).Get( out temp );
221       return temp;
222     }
223     set
224     {
225       SetProperty( PushButton.Property.LABEL_PADDING, new Dali.Property.Value( value ) );
226     }
227   }
228   public string IconPadding
229   {
230     get
231     {
232       string temp;
233       GetProperty( PushButton.Property.ICON_PADDING).Get( out temp );
234       return temp;
235     }
236     set
237     {
238       SetProperty( PushButton.Property.ICON_PADDING, new Dali.Property.Value( value ) );
239     }
240   }
241
242 }
243
244 }