1 /** Copyright (c) 2016 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;
44 public override void Dispose() {
46 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 NDalicPINVOKE.delete_PushButton(swigCPtr);
51 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53 global::System.GC.SuppressFinalize(this);
58 public class Property : global::System.IDisposable {
59 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
60 protected bool swigCMemOwn;
62 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
63 swigCMemOwn = cMemoryOwn;
64 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
67 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
68 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
75 public virtual void Dispose() {
77 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
80 NDalicPINVOKE.delete_PushButton_Property(swigCPtr);
82 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
84 global::System.GC.SuppressFinalize(this);
88 public Property() : this(NDalicPINVOKE.new_PushButton_Property(), true) {
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92 public static readonly int UNSELECTED_ICON = NDalicPINVOKE.PushButton_Property_UNSELECTED_ICON_get();
93 public static readonly int SELECTED_ICON = NDalicPINVOKE.PushButton_Property_SELECTED_ICON_get();
94 public static readonly int ICON_ALIGNMENT = NDalicPINVOKE.PushButton_Property_ICON_ALIGNMENT_get();
95 public static readonly int LABEL_PADDING = NDalicPINVOKE.PushButton_Property_LABEL_PADDING_get();
96 public static readonly int ICON_PADDING = NDalicPINVOKE.PushButton_Property_ICON_PADDING_get();
100 public PushButton () : this (NDalicPINVOKE.PushButton_New(), true) {
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 public PushButton(PushButton pushButton) : this(NDalicPINVOKE.new_PushButton__SWIG_1(PushButton.getCPtr(pushButton)), true) {
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 public PushButton Assign(PushButton pushButton) {
109 PushButton ret = new PushButton(NDalicPINVOKE.PushButton_Assign(swigCPtr, PushButton.getCPtr(pushButton)), false);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public new static PushButton DownCast(BaseHandle handle) {
115 PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 public new void SetButtonImage(Image image) {
121 NDalicPINVOKE.PushButton_SetButtonImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 public void SetButtonImage(Actor image) {
126 NDalicPINVOKE.PushButton_SetButtonImage__SWIG_1(swigCPtr, Actor.getCPtr(image));
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130 public void SetBackgroundImage(Actor image) {
131 NDalicPINVOKE.PushButton_SetBackgroundImage(swigCPtr, Actor.getCPtr(image));
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public new void SetSelectedImage(Image image) {
136 NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_0_0(swigCPtr, Image.getCPtr(image));
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public void SetSelectedImage(Actor image) {
141 NDalicPINVOKE.PushButton_SetSelectedImage__SWIG_1(swigCPtr, Actor.getCPtr(image));
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 public void SetSelectedBackgroundImage(Actor image) {
146 NDalicPINVOKE.PushButton_SetSelectedBackgroundImage(swigCPtr, Actor.getCPtr(image));
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public void SetDisabledBackgroundImage(Actor image) {
151 NDalicPINVOKE.PushButton_SetDisabledBackgroundImage(swigCPtr, Actor.getCPtr(image));
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public void SetDisabledImage(Actor image) {
156 NDalicPINVOKE.PushButton_SetDisabledImage(swigCPtr, Actor.getCPtr(image));
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public void SetDisabledSelectedImage(Actor image) {
161 NDalicPINVOKE.PushButton_SetDisabledSelectedImage(swigCPtr, Actor.getCPtr(image));
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public enum PropertyRange {
166 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
167 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
170 public string UnselectedIcon
175 GetProperty( PushButton.Property.UNSELECTED_ICON).Get( out temp );
180 SetProperty( PushButton.Property.UNSELECTED_ICON, new Dali.Property.Value( value ) );
183 public string SelectedIcon
188 GetProperty( PushButton.Property.SELECTED_ICON).Get( out temp );
193 SetProperty( PushButton.Property.SELECTED_ICON, new Dali.Property.Value( value ) );
196 public string IconAlignment
201 GetProperty( PushButton.Property.ICON_ALIGNMENT).Get( out temp );
206 SetProperty( PushButton.Property.ICON_ALIGNMENT, new Dali.Property.Value( value ) );
209 public string LabelPadding
214 GetProperty( PushButton.Property.LABEL_PADDING).Get( out temp );
219 SetProperty( PushButton.Property.LABEL_PADDING, new Dali.Property.Value( value ) );
222 public string IconPadding
227 GetProperty( PushButton.Property.ICON_PADDING).Get( out temp );
232 SetProperty( PushButton.Property.ICON_PADDING, new Dali.Property.Value( value ) );