Tizen Native API
4.0
|
CheckBoxButton provides a check box button which user can check or uncheck. More...
Public Member Functions | |
CheckBoxButton () | |
Creates an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New(). Calling member functions with an uninitialized Dali::Object is not allowed. | |
CheckBoxButton (const CheckBoxButton &checkBox) | |
Copy constructor. | |
CheckBoxButton & | operator= (const CheckBoxButton &checkBox) |
Assignment operator. | |
~CheckBoxButton () | |
Destructor. | |
Static Public Member Functions | |
static CheckBoxButton | New () |
Creates an initialized CheckBoxButton. | |
static CheckBoxButton | DownCast (BaseHandle handle) |
Downcasts a handle to CheckBoxButton handle. |
CheckBoxButton provides a check box button which user can check or uncheck.
By default, a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
The button's appearance could be modified by Button::SetUnselectedImage, Button::SetBackgroundImage, Button::SetSelectedImage, Button::SetSelectedBackgroundImage, Button::SetDisabledBackgroundImage, Button::SetDisabledImage, and Button::SetDisabledSelectedImage.
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 selected image).
When the button is disabled, background image and selected image are replaced by disabled images.
Usage example: -
// in Creating a DALi Application void HelloWorldExample::Create( Application& application ) { CheckBoxButton button = CheckBoxButton::New(); button.SetParentOrigin( ParentOrigin::CENTER ); button.SetProperty( Button::Property::LABEL, "Check" ); button.SetSize( 200, 40 ); button.SetBackgroundColor( Color::WHITE ); Stage::GetCurrent().Add( button ); // Connect to a button signal emitted by the button button.StateChangedSignal().Connect( this, &HelloWorldExample::OnButtonStateChanged ); } bool HelloWorldExample::OnButtonStateChanged( Button button ) { // Do something when the button state is changed // You can get the state using button.IsSelected() call return true; }
Creates an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New(). Calling member functions with an uninitialized Dali::Object is not allowed.
Dali::Toolkit::CheckBoxButton::CheckBoxButton | ( | const CheckBoxButton & | checkBox | ) |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
static CheckBoxButton Dali::Toolkit::CheckBoxButton::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to CheckBoxButton handle.
If handle points to a CheckBoxButton, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Toolkit::Button.
static CheckBoxButton Dali::Toolkit::CheckBoxButton::New | ( | ) | [static] |
Creates an initialized CheckBoxButton.
Reimplemented from Dali::Toolkit::Control.
CheckBoxButton& Dali::Toolkit::CheckBoxButton::operator= | ( | const CheckBoxButton & | checkBox | ) |
Assignment operator.
[in] | checkBox | Handle to an object |