Tizen Native API
4.0
|
A PushButton changes its appearance when is pressed and returns to its original when is released. More...
Classes | |
struct | Property |
Enumeration for the instance of properties belonging to the PushButton class. More... | |
Public Types | |
enum | PropertyRange |
Enumeration for the start and end property ranges for this control. More... | |
Public Member Functions | |
PushButton () | |
Creates an uninitialized PushButton; this can be initialized with PushButton::New(). | |
PushButton (const PushButton &pushButton) | |
Copy constructor. | |
PushButton & | operator= (const PushButton &pushButton) |
Assignment operator. | |
~PushButton () | |
Destructor. | |
void | SetButtonImage (Actor image) DALI_DEPRECATED_API |
Sets the unselected image with an Actor. | |
void | SetBackgroundImage (Actor image) DALI_DEPRECATED_API |
Sets the background image with an Actor. | |
void | SetSelectedImage (Actor image) DALI_DEPRECATED_API |
Sets the selected image with an Actor. | |
void | SetSelectedBackgroundImage (Actor image) DALI_DEPRECATED_API |
Sets the selected background image with an Actor. | |
void | SetDisabledBackgroundImage (Actor image) DALI_DEPRECATED_API |
Sets the disabled background image with an Actor. | |
void | SetDisabledImage (Actor image) DALI_DEPRECATED_API |
Sets the disabled image with an Actor. | |
void | SetDisabledSelectedImage (Actor image) DALI_DEPRECATED_API |
Sets the disabled selected image with an Actor. | |
Static Public Member Functions | |
static PushButton | New () |
Creates an initialized PushButton. | |
static PushButton | DownCast (BaseHandle handle) |
Downcasts a handle to PushButton handle. |
A PushButton changes its appearance when is pressed and returns to its original when is released.
By default, a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked. and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button.
Usage example: -
// in Creating a DALi Application void HelloWorldExample::Create( Application& application ) { PushButton button = PushButton::New(); button.SetParentOrigin( ParentOrigin::CENTER ); button.SetProperty( Button::Property::LABEL, "Press" ); Stage::GetCurrent().Add( button ); // Connect to button signals emitted by the button button.ClickedSignal().Connect( this, &HelloWorldExample::OnButtonClicked ); button.PressedSignal().Connect( this, &HelloWorldExample::OnButtonPressed ); button.ReleasedSignal().Connect( this, &HelloWorldExample::OnButtonReleased ); } bool HelloWorldExample::OnButtonClicked( Button button ) { // Do something when the button is clicked return true; } bool HelloWorldExample::OnButtonPressed( Button button ) { // Do something when the button is pressed return true; } bool HelloWorldExample::OnButtonReleased( Button button ) { // Do something when the button is released return true; }
See Button for more details on signals and modifying appearance via properties.
Enumeration for the start and end property ranges for this control.
PROPERTY_START_INDEX |
|
PROPERTY_END_INDEX |
Reserving 1000 property indices.
|
Reimplemented from Dali::Toolkit::Button.
Creates an uninitialized PushButton; this can be initialized with PushButton::New().
Calling member functions with an uninitialized Dali::Object is not allowed.
Dali::Toolkit::PushButton::PushButton | ( | const PushButton & | pushButton | ) |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
static PushButton Dali::Toolkit::PushButton::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to PushButton handle.
If handle points to a PushButton, 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 PushButton Dali::Toolkit::PushButton::New | ( | ) | [static] |
Creates an initialized PushButton.
Reimplemented from Dali::Toolkit::Control.
PushButton& Dali::Toolkit::PushButton::operator= | ( | const PushButton & | pushButton | ) |
Assignment operator.
[in] | pushButton | Handle to an object |
void Dali::Toolkit::PushButton::SetBackgroundImage | ( | Actor | image | ) |
Sets the background image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetButtonImage | ( | Actor | image | ) |
Sets the unselected image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetDisabledBackgroundImage | ( | Actor | image | ) |
Sets the disabled background image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetDisabledImage | ( | Actor | image | ) |
Sets the disabled image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetDisabledSelectedImage | ( | Actor | image | ) |
Sets the disabled selected image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetSelectedBackgroundImage | ( | Actor | image | ) |
Sets the selected background image with an Actor.
[in] | image | The Actor to use |
void Dali::Toolkit::PushButton::SetSelectedImage | ( | Actor | image | ) |
Sets the selected image with an Actor.
[in] | image | The Actor to use |