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. |
Detailed Description
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; }
- Since:
- 2.4, DALi version 1.0.0
Constructor & Destructor Documentation
Creates an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New(). Calling member functions with an uninitialized Dali::Object is not allowed.
- Since:
- 2.4, DALi version 1.0.0
Dali::Toolkit::CheckBoxButton::CheckBoxButton | ( | const CheckBoxButton & | checkBox | ) |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
- Since:
- 2.4, DALi version 1.0.0
Member Function Documentation
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.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] handle Handle to an object
- Returns:
- Handle to a CheckBoxButton or an uninitialized handle
Reimplemented from Dali::Toolkit::Button.
static CheckBoxButton Dali::Toolkit::CheckBoxButton::New | ( | ) | [static] |
Creates an initialized CheckBoxButton.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- A handle to a newly allocated Dali resource
Reimplemented from Dali::Toolkit::Control.
CheckBoxButton& Dali::Toolkit::CheckBoxButton::operator= | ( | const CheckBoxButton & | checkBox | ) |
Assignment operator.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] checkBox Handle to an object
- Returns:
- A reference to this