X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fpush-button-impl.h;h=ecc7ac7b01f2e03d547dc22bcb57de0da5a5069f;hp=51164b56e5a92be2ca66679425c73a9bdf9417a4;hb=abbf60ed35112186269d2fe93b949eb8abd4283d;hpb=0d7ddec50cf09372fb2a830c6e8cdc7af70d362f diff --git a/dali-toolkit/internal/controls/buttons/push-button-impl.h b/dali-toolkit/internal/controls/buttons/push-button-impl.h index 51164b5..ecc7ac7 100644 --- a/dali-toolkit/internal/controls/buttons/push-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/push-button-impl.h @@ -61,112 +61,60 @@ protected: */ virtual ~PushButton(); -private: // From Button - - /** - * @copydoc Toolkit::Internal::Button::OnButtonInitialize() - */ - virtual void OnButtonInitialize(); - - /** - * @copydoc Toolkit::Internal::Button::OnLabelSet() - */ - virtual void OnLabelSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnButtonImageSet() - */ - virtual void OnButtonImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnSelectedImageSet() - */ - virtual void OnSelectedImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnBackgroundImage() - */ - virtual void OnBackgroundImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnSelectedBackgroundImageSet() - */ - virtual void OnSelectedBackgroundImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnDisabledImageSet() - */ - virtual void OnDisabledImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnDisabledSelectedImageSet() - */ - virtual void OnDisabledSelectedImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnDisabledBackgroundImageSet() - */ - virtual void OnDisabledBackgroundImageSet(); +public: - /** - * @copydoc Toolkit::Internal::Button::PrepareForTranstionIn( Actor actor ) - */ - virtual void PrepareForTranstionIn( Actor actor ); + // Properties /** - * @copydoc Toolkit::Internal::Button::PrepareForTranstionOut( Actor actor ) + * Enum for the alignment modes of the icon. */ - virtual void PrepareForTranstionOut( Actor actor ); + enum IconAlignment + { + LEFT, + RIGHT, + TOP, + BOTTOM, + DEFAULT = RIGHT + }; /** - * @copydoc Toolkit::Internal::Button::OnTransitionIn( Actor actor ) + * Called when a property of an object of this type is set. + * @param[in] object The object whose property is set. + * @param[in] index The property index. + * @param[in] value The new property value. */ - virtual void OnTransitionIn( Actor actor ); + static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value ); /** - * @copydoc Toolkit::Internal::Button::OnTransitionOut( Actor actor ) + * Called to retrieve a property of an object of this type. + * @param[in] object The object whose property is to be retrieved. + * @param[in] index The property index. + * @return The current value of the property. */ - virtual void OnTransitionOut( Actor actor ); - -private: // From Control + static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex ); - /** - * @copydoc CustomActorImpl::OnSizeSet( const Vector3& targetSize ) - */ - virtual void OnSizeSet( const Vector3& targetSize ); - - /** - * @copydoc Toolkit::Control::GetNaturalSize - */ - virtual Vector3 GetNaturalSize(); +private: // From Button /** - * @copydoc Toolkit::Control::OnSetResizePolicy + * @copydoc Toolkit::Internal::Button::OnInitialize */ - virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ); + virtual void OnInitialize(); private: /** - * It adds the actor to the root actor and to the fade in animation. - * @param[inout] actor The actor. - * @param[in] opacity The opacity to fade to - */ - void FadeImageTo( Actor actor, float opacity ); - - /** - * @brief Custom configuration for size negotiation + * @brief Sets the alignment mode to use to align the icon to the label. + * + * @param[in] iconAlignment The alignment mode to use */ - void ConfigureSizeNegotiation(); + void SetIconAlignment( const PushButton::IconAlignment iconAlignment ); /** - * @brief Configure size negotiation for a given dimension + * @brief Gets the alignment mode used to align the icon to the label. * - * @param[in] dimension The dimension to configure - * @param[in] images The list of images to configure - * @param[in] label The text label to configure + * @return The alignment mode in use */ - void ConfigureSizeNegotiationDimension( Dimension::Type dimension, const std::vector< Actor >& images, Actor& label ); + const PushButton::IconAlignment GetIconAlignment() const; private: @@ -178,7 +126,7 @@ private: private: - Vector3 mSize; ///< The button's size. + IconAlignment mIconAlignment; ///< The alignment of the icon against the label. }; } // namespace Internal