// Copyright (c) 2017 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts // Some have been manually changed namespace Tizen.NUI { /// /// CheckBoxButton provides a check box button which user can check or uncheck. /// By default, a CheckBoxButton emits a Button.Clicked event when the button changes its state to selected or unselected. /// The button's appearance could be modified by Button.UnselectedImage, Button.BackgroundImage, Button.SelectedImage, /// Button.SelectedBackgroundImage, Button.DisabledBackgroundImage, Button.DisabledImage, and Button.DisabledSelectedImage. /// When the button is not disabled, if it's not selected it only shows the background image. /// The selected image is shown over the background image when the box is selected (background image is not replaced by \e selected image). /// When the button is disabled, background image and selected image are replaced by disabled images. /// /// public class CheckBoxButton : Button { private global::System.Runtime.InteropServices.HandleRef swigCPtr; internal CheckBoxButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CheckBoxButton_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CheckBoxButton obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~CheckBoxButton() { DisposeQueue.Instance.Add(this); } /// /// To make CheckBoxButton instance be disposed. /// public override void Dispose() { if (!Stage.IsInstalled()) { DisposeQueue.Instance.Add(this); return; } lock (this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_CheckBoxButton(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); base.Dispose(); } } /// /// Creates an initialized CheckBoxButton /// public CheckBoxButton() : this(NDalicPINVOKE.CheckBoxButton_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal CheckBoxButton(CheckBoxButton checkBox) : this(NDalicPINVOKE.new_CheckBoxButton__SWIG_1(CheckBoxButton.getCPtr(checkBox)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal CheckBoxButton Assign(CheckBoxButton checkBox) { CheckBoxButton ret = new CheckBoxButton(NDalicPINVOKE.CheckBoxButton_Assign(swigCPtr, CheckBoxButton.getCPtr(checkBox)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal new static CheckBoxButton DownCast(BaseHandle handle) { CheckBoxButton ret = new CheckBoxButton(NDalicPINVOKE.CheckBoxButton_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }