// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
-namespace Internal DALI_INTERNAL
-{
-class CustomActor;
-}
-
namespace Toolkit
{
*
* When the \e dimmed property is set to \e true, no signal is emitted.
*/
-class Button : public Control
+class DALI_IMPORT_API Button : public Control
{
public:
// Signal Names
static const char* const SIGNAL_CLICKED; ///< name "clicked"
+ static const char* const SIGNAL_TOGGLED; ///< name "toggled"
// Properties
static const Property::Index PROPERTY_DIMMED; ///< name "dimmed", @see SetDimmed(), type BOOLEAN
/**
* @brief Button Clicked signal type
*/
- typedef SignalV2< bool ( Button ) > ClickedSignalV2;
+ typedef Signal< bool ( Button ) > ClickedSignalType;
+
+ /**
+ * @brief Button toggled signal type
+ */
+ typedef Signal< bool ( Button, bool ) > ToggledSignalType;
/**
* @brief Signal emitted when the button is touched and the touch point doesn't leave the boundary of the button.
*/
- ClickedSignalV2& ClickedSignal();
+ ClickedSignalType& ClickedSignal();
+
+ /**
+ * @brief Signal emitted when the button's state is toggled.
+ */
+ ToggledSignalType& ToggledSignal();
public: // Not intended for application developers
*
* @param[in] implementation The Control implementation.
*/
- Button( Internal::Button& implementation );
+ DALI_INTERNAL Button( Internal::Button& implementation );
/**
* @brief Allows the creation of this Control from an Internal::CustomActor pointer.
*
* @param[in] internal A pointer to the internal CustomActor.
*/
- Button( Dali::Internal::CustomActor* internal );
+ DALI_INTERNAL Button( Dali::Internal::CustomActor* internal );
};
} // namespace Toolkit