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.
17 namespace Tizen.NUI.UIComponents
21 /// A RadioButton provides a radio button which two states \e selected or \e unselected.<br>
22 /// Radio buttons are designed to select one of many option at the same time.<br>
23 /// RadioButton can change its current state using Selected.<br>
25 /// RadioButtons can be grouped.<br>
26 /// Two or more RadioButtons are in one group when they have this same parent.<br>
27 /// In each groups only one RadioButton can be \e selected at a given time.<br>
28 /// So when RadioButton is set to \e selected, other RadioButtons in its group are set to \e unselected.<br>
29 /// When \e selected RadioButton is set to \e unselected no other RadioButtons in his group is set to \e selected.<br>
31 /// A StateChanged Event is emitted when the RadioButton change its state to \e selected or \e unselected.<br>
33 public class RadioButton : Button
35 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
37 internal RadioButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RadioButton_SWIGUpcast(cPtr), cMemoryOwn)
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RadioButton obj)
44 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 /// To make RadioButton instance be disposed.
50 protected override void Dispose(DisposeTypes type)
57 if (type == DisposeTypes.Explicit)
60 //Release your own managed resources here.
61 //You should release all of your own disposable objects here.
65 //Release your own unmanaged resources here.
66 //You should not access any managed member here except static instance.
67 //because the execution order of Finalizes is non-deterministic.
69 if (swigCPtr.Handle != global::System.IntPtr.Zero)
74 NDalicPINVOKE.delete_RadioButton(swigCPtr);
76 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
82 /// Creates an uninitialized RadioButton
84 public RadioButton() : this(NDalicPINVOKE.RadioButton_New__SWIG_0(), true)
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 /// Creates an uninitialized RadioButton with Label
93 /// <param name="label">Label text</param>
94 public RadioButton(string label) : this(NDalicPINVOKE.RadioButton_New__SWIG_1(label), true)
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();