Release 4.0.0-preview1-00235
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / CheckBoxButton.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.UIComponents
20 {
21
22     /// <summary>
23     /// The CheckBoxButton provides a checkbox button which the user can check or uncheck.<br>
24     /// By default, the CheckBoxButton emits a Button.Clicked event when the button changes its state to selected or unselected.<br>
25     /// The button's appearance could be modified by Button.UnselectedImage, Button.BackgroundImage, Button.SelectedImage, Button.SelectedBackgroundImage, Button.DisabledBackgroundImage, Button.DisabledImage, and Button.DisabledSelectedImage.<br>
26     /// When the button is not disabled, if it's not selected, it only shows the background image.<br>
27     /// The selected image is shown over the background image when the box is selected (background image is not replaced by \e selected image).<br>
28     /// When the button is disabled, the background image and the selected image are replaced by disabled images.<br>
29     /// /// </summary>
30     public class CheckBoxButton : Button
31     {
32         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33
34         internal CheckBoxButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CheckBoxButton_SWIGUpcast(cPtr), cMemoryOwn)
35         {
36             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37         }
38
39         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CheckBoxButton obj)
40         {
41             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42         }
43
44
45         /// <summary>
46         /// To dispose the CheckBoxButton instance.
47         /// </summary>
48         protected override void Dispose(DisposeTypes type)
49         {
50             if (disposed)
51             {
52                 return;
53             }
54
55             if(type == DisposeTypes.Explicit)
56             {
57                 //Called by User
58                 //Release your own managed resources here.
59                 //You should release all of your own disposable objects here.
60             }
61
62             //Release your own unmanaged resources here.
63             //You should not access any managed member here except static instance.
64             //because the execution order of Finalizes is non-deterministic.
65
66             if (swigCPtr.Handle != global::System.IntPtr.Zero)
67             {
68                 if (swigCMemOwn)
69                 {
70                     swigCMemOwn = false;
71                     NDalicPINVOKE.delete_CheckBoxButton(swigCPtr);
72                 }
73                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
74             }
75
76             base.Dispose(type);
77         }
78
79         /// <summary>
80         /// Creates an initialized CheckBoxButton.
81         /// </summary>
82         public CheckBoxButton() : this(NDalicPINVOKE.CheckBoxButton_New(), true)
83         {
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85
86         }
87
88     }
89
90 }