1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 public class PushButton : Button {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
41 DisposeQueue.Instance.Add(this);
44 public override void Dispose() {
45 if (!Stage.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_PushButton(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
64 public class Property : global::System.IDisposable {
65 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66 protected bool swigCMemOwn;
68 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
69 swigCMemOwn = cMemoryOwn;
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
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;
81 public virtual void Dispose() {
83 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
86 NDalicPINVOKE.delete_PushButton_Property(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 global::System.GC.SuppressFinalize(this);
94 public Property() : this(NDalicPINVOKE.new_PushButton_Property(), true) {
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
106 public PushButton () : this (NDalicPINVOKE.PushButton_New(), true) {
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 public PushButton(PushButton pushButton) : this(NDalicPINVOKE.new_PushButton__SWIG_1(PushButton.getCPtr(pushButton)), true) {
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
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();
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();
136 public void SetBackgroundImage(Actor image) {
137 NDalicPINVOKE.PushButton_SetBackgroundImage(swigCPtr, Actor.getCPtr(image));
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
151 public void SetSelectedBackgroundImage(Actor image) {
152 NDalicPINVOKE.PushButton_SetSelectedBackgroundImage(swigCPtr, Actor.getCPtr(image));
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 public void SetDisabledBackgroundImage(Actor image) {
157 NDalicPINVOKE.PushButton_SetDisabledBackgroundImage(swigCPtr, Actor.getCPtr(image));
158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public void SetDisabledImage(Actor image) {
162 NDalicPINVOKE.PushButton_SetDisabledImage(swigCPtr, Actor.getCPtr(image));
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 public void SetDisabledSelectedImage(Actor image) {
167 NDalicPINVOKE.PushButton_SetDisabledSelectedImage(swigCPtr, Actor.getCPtr(image));
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public enum PropertyRange {
172 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
173 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
176 public string UnselectedIcon
181 GetProperty( PushButton.Property.UNSELECTED_ICON).Get( out temp );
186 SetProperty( PushButton.Property.UNSELECTED_ICON, new Dali.Property.Value( value ) );
189 public string SelectedIcon
194 GetProperty( PushButton.Property.SELECTED_ICON).Get( out temp );
199 SetProperty( PushButton.Property.SELECTED_ICON, new Dali.Property.Value( value ) );
202 public string IconAlignment
207 GetProperty( PushButton.Property.ICON_ALIGNMENT).Get( out temp );
212 SetProperty( PushButton.Property.ICON_ALIGNMENT, new Dali.Property.Value( value ) );
215 public string LabelPadding
220 GetProperty( PushButton.Property.LABEL_PADDING).Get( out temp );
225 SetProperty( PushButton.Property.LABEL_PADDING, new Dali.Property.Value( value ) );
228 public string IconPadding
233 GetProperty( PushButton.Property.ICON_PADDING).Get( out temp );
238 SetProperty( PushButton.Property.ICON_PADDING, new Dali.Property.Value( value ) );