*/
// INTERNAL INCLUDES
-#include <dali/dali.h>
#include <dali-toolkit/public-api/controls/buttons/button.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include "button-painter-impl.h"
public:
/**
- * @copydoc Dali::Toolkit::Button::SetDimmed( bool dimmed )
+ * @copydoc Dali::Toolkit::Button::SetDisabled( bool disabled )
*/
- void SetDimmed( bool dimmed );
+ void SetDisabled( bool disabled );
/**
- * @copydoc Dali::Toolkit::Button::IsDimmed() const
+ * @copydoc Dali::Toolkit::Button::IsDisabled() const
*/
- bool IsDimmed() const;
+ bool IsDisabled() const;
/**
* @copydoc Dali::Toolkit::Button::SetAnimationTime()
* This method is called from the OnTouchEvent method when the button is down.
* Could be reimplemented in subclasses to provide specific behaviour.
*/
- virtual void OnButtonDown() { }
+ virtual void OnButtonDown();
/**
* This method is called from the OnTouchEvent method when the button is up.
* Could be reimplemented in subclasses to provide specific behaviour.
*/
- virtual void OnButtonUp() { }
+ virtual void OnButtonUp();
/**
* This method is called from the OnTouchEvent method when the touch point leaves the boundary of the button or
/**
* @copydoc Dali::Toolkit::Button::ClickedSignal()
*/
- Toolkit::Button::ClickedSignalV2& ClickedSignal();
+ Toolkit::Button::ClickedSignalType& ClickedSignal();
+
+ /**
+ * @copydoc Dali::Toolkit::Button::StateChangedSignal()
+ */
+ Toolkit::Button::StateChangedSignalType& StateChangedSignal();
/**
* Connects a callback function with the object's signals.
* @param[in] actor The tapped actor.
* @param[in] tap The tap gesture.
*/
- void OnTap(Actor actor, TapGesture tap);
+ void OnTap(Actor actor, const TapGesture& tap);
private:
// Undefined
Button& operator = ( const Button& );
-protected: // Signals
+protected:
enum ButtonState
{
ButtonDown, ///< The button is down.
};
- ButtonState mState; ///< Stores the button state.
-
- bool mDimmed; ///< Stores the dimmed property.
-
ButtonPainterPtr mPainter; ///< Pointer to a ButtonPainter base class.
- Toolkit::Button::ClickedSignalV2 mClickedSignalV2; ///< Signal emitted when the button is clicked.
+ Toolkit::Button::ClickedSignalType mClickedSignal; ///< Signal emitted when the button is clicked.
+ Toolkit::Button::StateChangedSignalType mStateChangedSignal; ///< Signal emitted when the button's state is changed.
TapGestureDetector mTapDetector;
+
+ ButtonState mState; ///< Stores the button state.
+
+ bool mDisabled; ///< Stores the disabled property.
};
} // namespace Internal