X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fcheck-box-button-impl.h;h=9d4335a4a74d1d810dade2754e382685277a991c;hp=619a5714856ab29d150107d5cc373d30390741df;hb=38a8b42e1f7765a9b3314a033700fb25d4a6f8fd;hpb=2acdedcc7c7e732a9ec97d08c8cee7423ed6ebf7 diff --git a/dali-toolkit/internal/controls/buttons/check-box-button-impl.h b/dali-toolkit/internal/controls/buttons/check-box-button-impl.h index 619a571..9d4335a 100644 --- a/dali-toolkit/internal/controls/buttons/check-box-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/check-box-button-impl.h @@ -18,10 +18,13 @@ * */ -// INTERNAL INCLUDES +// EXTERNAL INCLUDES #include +#include +// INTERNAL INCLUDES #include +#include #include "button-impl.h" @@ -49,7 +52,53 @@ public: */ static Dali::Toolkit::CheckBoxButton New(); -protected: +public: // From Button + + /** + * @copydoc Toolkit::Internal::Button::SetSelectedImage( Actor image ) + */ + virtual void SetSelectedImage( Actor image ); + + /** + * @copydoc Toolkit::Internal::Button::SetBackgroundImage( Actor image ) + */ + virtual void SetBackgroundImage( Actor image ); + + /** + * @copydoc Toolkit::Internal::Button::SetDisabledSelectedImage( Actor image ) + */ + virtual void SetDisabledSelectedImage( Actor image ); + + /** + * @copydoc Toolkit::Internal::Button::SetDisabledBackgroundImage( Actor image ) + */ + virtual void SetDisabledBackgroundImage( Actor image ); + +private: // From Button + + /** + * @copydoc Toolkit::Internal::Button::OnLabelSet() + */ + virtual void OnLabelSet(); + + /** + * @copydoc Toolkit::Internal::Button::OnSelected() + */ + virtual void OnSelected( bool selected ); + + /** + * @copydoc Toolkit::Internal::Button::OnDisabled( bool disabled ) + */ + virtual void OnDisabled( bool disabled ); + +private: // From Control + + /** + * @copydoc Dali::Toolkit::Control::OnRelayout() + */ + virtual void OnRelayout( const Vector2& size, ActorSizeContainer& container ); + +private: /** * Construct a new CheckBoxButton. @@ -63,11 +112,49 @@ protected: private: + /** + * Adds the actor to the button. + */ + void AddChild( Actor& actor ); + + /** + * Removes the actor from the button. + */ + void RemoveChild( Actor& actor ); + + /** + * Adds the actor to the check in animation. + * It creates a check in animation if needed and starts the check in animation. + * @param[in] actor The actor. + */ + void StartCheckInAnimation( Actor& actor ); + + /** + * Stops the check in animation. + */ + void StopCheckInAnimation(); + + // slots + + /** + * Called when the check in animation finishes. + * It changes the check button paint state. + */ + void CheckInAnimationFinished( Dali::Animation& source ); + +private: + // Undefined CheckBoxButton( const CheckBoxButton& ); // Undefined CheckBoxButton& operator=( const CheckBoxButton& ); + +private: + Animation mCheckInAnimation; ///< Animation used in the state transitions. + ImageRegionEffect mTickUVEffect; ///< ImageRegionEffect to expand the tick across + + PaintState mPaintState; ///< The paint state. }; } // namespace Internal