X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fbutton-impl.h;h=71a42fe3ca78b99d6d93720790427f4f3393c97f;hb=28658e9b0c89fced72173c582b9c5635e07bd6f1;hp=d9d4bd6ea4828e827dc81ace45587f467a9d1680;hpb=4517298d9e2e87d3814ddd311233568ef10f7018;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/buttons/button-impl.h b/dali-toolkit/internal/controls/buttons/button-impl.h index d9d4bd6..71a42fe 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.h +++ b/dali-toolkit/internal/controls/buttons/button-impl.h @@ -58,72 +58,72 @@ protected: public: /** - * @copydoc Dali::Toolkit::Button::SetDisabled( bool disabled ) + * @copydoc Dali::Toolkit::Button::SetDisabled */ void SetDisabled( bool disabled ); /** - * @copydoc Dali::Toolkit::Button::IsDisabled() const + * @copydoc Dali::Toolkit::Button::IsDisabled */ bool IsDisabled() const; /** - * @copydoc Dali::Toolkit::Button::SetAutoRepeating( bool autoRepeating ) + * @copydoc Dali::Toolkit::Button::SetAutoRepeating */ void SetAutoRepeating( bool autoRepeating ); /** - * @copydoc Dali::Toolkit::Button::IsAutoRepeating() const + * @copydoc Dali::Toolkit::Button::IsAutoRepeating */ bool IsAutoRepeating() const; /** - * @copydoc Dali::Toolkit::Button::SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay ) + * @copydoc Dali::Toolkit::Button::SetInitialAutoRepeatingDelay */ void SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay ); /** - * @copydoc Dali::Toolkit::Button::GetInitialAutoRepeatingDelay() const + * @copydoc Dali::Toolkit::Button::GetInitialAutoRepeatingDelay */ float GetInitialAutoRepeatingDelay() const; /** - * @copydoc Dali::Toolkit::Button::SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay ) + * @copydoc Dali::Toolkit::Button::SetNextAutoRepeatingDelay */ void SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay ); /** - * @copydoc Dali::Toolkit::Button::GetNextAutoRepeatingDelay() const + * @copydoc Dali::Toolkit::Button::GetNextAutoRepeatingDelay */ float GetNextAutoRepeatingDelay() const; /** - * @copydoc Dali::Toolkit::Button::SetTogglableButton( bool togglable ) + * @copydoc Dali::Toolkit::Button::SetTogglableButton */ void SetTogglableButton( bool togglable ); /** - * @copydoc Dali::Toolkit::Button::IsTogglableButton() const + * @copydoc Dali::Toolkit::Button::IsTogglableButton */ bool IsTogglableButton() const; /** - * @copydoc Dali::Toolkit::Button::SetSelected( bool selected ) + * @copydoc Dali::Toolkit::Button::SetSelected */ void SetSelected( bool selected ); /** - * @copydoc Dali::Toolkit::Button::IsSelected() const + * @copydoc Dali::Toolkit::Button::IsSelected */ bool IsSelected() const; /** - * @copydoc Dali::Toolkit::Button::SetAnimationTime() + * @copydoc Dali::Toolkit::Button::SetAnimationTime */ void SetAnimationTime( float animationTime ); /** - * @copydoc Dali::Toolkit::Button::GetAnimationTime() + * @copydoc Dali::Toolkit::Button::GetAnimationTime */ float GetAnimationTime() const; @@ -208,6 +208,14 @@ public: std::string GetDisabledBackgroundImageFilename() const; /** + * @brief Sets the specified properties on the button label. + * If the label does not exist yet, it is created. + * The derived buttons are notified if any properties are changed. + * @param[in] properties A Property::Map of key-value pairs of properties to set. + */ + void ModifyLabel( const Property::Map& properties ); + + /** * Performs actions as requested using the action name. * @param[in] object The object on which to perform the action. * @param[in] actionName The action to perform. @@ -266,12 +274,12 @@ public: // Deprecated API void SetDisabledBackgroundImage( Actor image ); /** - * @copydoc Dali::Toolkit::Button::GetButtonImage() + * @copydoc Dali::Toolkit::Button::GetButtonImage */ Actor GetButtonImage() const; /** - * @copydoc Dali::Toolkit::Button::GetSelectedImage() + * @copydoc Dali::Toolkit::Button::GetSelectedImage */ Actor GetSelectedImage() const; @@ -327,12 +335,6 @@ private: bool DoClickAction( const Property::Map& attributes ); /** - * This method is called after the button initialization. - * Could be reimplemented in subclasses to provide specific behaviour. - */ - virtual void OnButtonInitialize() { } - - /** * This method is called when the label is set. * @param[in] noPadding Used to bypass padding if the label is to be treated generically. */ @@ -374,37 +376,30 @@ private: virtual void OnDisabledBackgroundImageSet() {} /** - * This method is called from the OnTouchEvent method when the button is down. + * This method is called the button is down. * Could be reimplemented in subclasses to provide specific behaviour. */ virtual void OnButtonDown(); /** - * This method is called from the OnTouchEvent method when the button is up. + * This method is called when the button is up. * Could be reimplemented in subclasses to provide specific behaviour. */ virtual void OnButtonUp(); /** - * This method is called from the OnTouchEvent method when the touch point leaves the boundary of the button or - * more than one touch points are received. + * This method is called when touch leaves the boundary of the button or several touch points are received. * Could be reimplemented in subclasses to provide specific behaviour. */ virtual void OnTouchPointLeave(); /** - * This method is called from the OnTouchEvent method when the touch point is interrupted. + * This method is called when the touch is interrupted. * Could be reimplemented in subclasses to provide specific behaviour. */ virtual void OnTouchPointInterrupted(); /** - * This method is called when the button is removed from the stage. - * Could be reimplemented in subclasses to provide specific behaviour. - */ - virtual void OnButtonStageDisconnection(); - - /** * This method is called when the \e selected property is changed. */ virtual void OnSelected() {} @@ -475,17 +470,11 @@ public: */ static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex ); -protected: // From CustomActorImpl - - /** - * @copydoc Dali::CustomActorImpl::OnTouchEvent( const TouchEvent& event ) - */ - virtual bool OnTouchEvent( const TouchEvent& event ); - -private: // From Control +protected: // From Control /** * @copydoc Toolkit::Control::OnInitialize() + * @note If overridden by deriving button classes, then an up-call to Button::OnInitialize MUST be made at the start. */ virtual void OnInitialize(); @@ -500,14 +489,22 @@ private: // From Control virtual bool OnKeyboardEnter(); /** - * Callback received when the button is disconnected from the stage. - * It resets the button status. + * @copydoc Toolkit::Control::OnStageDisconnection() + * @note If overridden by deriving button classes, then an up-call to Button::OnStageDisconnection MUST be made at the end. */ - void OnControlStageDisconnection(); + void OnStageDisconnection(); private: /** + * @brief Handler for touch data + * @param[in] actor The touched actor. + * @param[in] touch The touch info. + * @return true, if consumed, false otherwise. + */ + bool OnTouch( Actor actor, const TouchData& touch ); + + /** * Handler for tap events. * We do not actually do anything when we receive a tap as the button handles tap event through * the touch event system itself as it requires more than just tap handling (e.g. leave events).