X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fbutton-impl.h;h=da2557fb7f95d92e6064af61072572ed5fd68d4f;hp=71a42fe3ca78b99d6d93720790427f4f3393c97f;hb=958bd01cb1bc4cf43cbe740a7b041927d9d34ed6;hpb=4a2c09ae826a352ce60c50f9986167ae3d3e6693 diff --git a/dali-toolkit/internal/controls/buttons/button-impl.h b/dali-toolkit/internal/controls/buttons/button-impl.h index 71a42fe..da2557f 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.h +++ b/dali-toolkit/internal/controls/buttons/button-impl.h @@ -43,18 +43,6 @@ namespace Internal class Button : public Control { -protected: - - /** - * Construct a new Button. - */ - Button(); - - /** - * A reference counted object may only be deleted by calling Unreference() - */ - virtual ~Button(); - public: /** @@ -285,6 +273,42 @@ public: // Deprecated API protected: + enum ButtonState + { + ButtonUp, ///< The button is up. + ButtonDown, ///< The button is down. + }; + + /** + * Button paint states. + */ + enum PaintState + { + UnselectedState, ///< The button is unselected. + SelectedState, ///< The button is selected. + DisabledUnselectedState, ///< The button is disabled and unselected. + DisabledSelectedState, ///< The button is disabled and selected. + }; + + /** + * Enum to specify which decoration when getting and setting decorations. + */ + enum DecorationState + { + UNSELECTED_DECORATION = 0, + SELECTED_DECORATION, + DECORATION_STATES + }; + + /** + * Construct a new Button. + */ + Button(); + + /** + * A reference counted object may only be deleted by calling Unreference() + */ + virtual ~Button(); /** * @return A reference to the label actor. */ @@ -494,6 +518,7 @@ protected: // From Control */ void OnStageDisconnection(); + private: /** @@ -551,24 +576,18 @@ private: void SetupContent( Actor& actorToModify, Actor newActor ); /** - * Sets the color of the unselected image. - * If no image exists, it is created. - * @param[in] color The color to use. - */ - void SetUnselectedColor( const Vector4& color ); - - /** * Gets the unselected content color. * @return The currently used unselected color. */ const Vector4 GetUnselectedColor() const; /** - * Sets the color of the selected image. - * If no image exists, it is created. + * Sets the color of button in selected or unselected state, if image also supplied this color will be appplied to it. + * If no visual exists, it is created. * @param[in] color The color to use. + * @param[in] selectedState The state to apply the color to, SelectedState or DisabledUnselectedState. */ - void SetSelectedColor( const Vector4& color ); + void SetColor( const Vector4& color, PaintState selectedState ); /** * Gets the selected content color. @@ -578,33 +597,6 @@ private: protected: - enum ButtonState - { - ButtonUp, ///< The button is up. - ButtonDown, ///< The button is down. - }; - - /** - * Button paint states. - */ - enum PaintState - { - UnselectedState, ///< The button is unselected. - SelectedState, ///< The button is selected. - DisabledUnselectedState, ///< The button is disabled and unselected. - DisabledSelectedState, ///< The button is disabled and selected. - }; - - /** - * Enum to specify which decoration when getting and setting decorations. - */ - enum DecorationState - { - UNSELECTED_DECORATION = 0, - SELECTED_DECORATION, - DECORATION_STATES - }; - ButtonState GetState(); PaintState GetPaintState(); void SetDecoration( DecorationState state, Actor actor );