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=d7e91d3af1357bd3cbfbf118eb3b02139a8e7adc;hp=a003e6db470fea422806ab3f9f3257d858fb275b;hb=b694e7e2ae624e206e1548b1a863c554eb9cd4d7;hpb=e84f2b4052f5a042c6a08d02b87e771bac5ddf44 diff --git a/dali-toolkit/internal/controls/buttons/push-button-impl.h b/dali-toolkit/internal/controls/buttons/push-button-impl.h index a003e6d..d7e91d3 100644 --- a/dali-toolkit/internal/controls/buttons/push-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/push-button-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H__ -#define __DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H__ +#ifndef DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H +#define DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,130 +93,58 @@ public: */ static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex ); -private: // From Button - /** - * @copydoc Toolkit::Internal::Button::OnInitialize + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnInitialize(); + void SetButtonImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnLabelSet + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnLabelSet( bool noPadding ); + void SetBackgroundImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnButtonImageSet + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnButtonImageSet(); + void SetSelectedImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnSelectedImageSet + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnSelectedImageSet(); + void SetSelectedBackgroundImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnBackgroundImage + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnBackgroundImageSet(); + void SetDisabledBackgroundImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnSelectedBackgroundImageSet + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnSelectedBackgroundImageSet(); + void SetDisabledImage( Actor image ); /** - * @copydoc Toolkit::Internal::Button::OnDisabledImageSet + * Deprecated API for Setting Pushbutton image using an Actor + * @param[in] image, Image Actor that has a url which can be used to create an image visual */ - virtual void OnDisabledImageSet(); + void SetDisabledSelectedImage( Actor image ); - /** - * @copydoc Toolkit::Internal::Button::OnDisabledSelectedImageSet - */ - virtual void OnDisabledSelectedImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnDisabledBackgroundImageSet - */ - virtual void OnDisabledBackgroundImageSet(); - - /** - * @copydoc Toolkit::Internal::Button::PrepareForTranstionIn( Actor actor ) - */ - virtual void PrepareForTranstionIn( Actor actor ); - - /** - * @copydoc Toolkit::Internal::Button::PrepareForTranstionOut( Actor actor ) - */ - virtual void PrepareForTranstionOut( Actor actor ); - - /** - * @copydoc Toolkit::Internal::Button::OnTransitionIn( Actor actor ) - */ - virtual void OnTransitionIn( Actor actor ); - - /** - * @copydoc Toolkit::Internal::Button::OnTransitionOut( Actor actor ) - */ - virtual void OnTransitionOut( Actor actor ); - -private: // From Control - - /** - * @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 - */ - void ConfigureSizeNegotiation(); - - /** - * @brief Configure size negotiation for a given dimension - * - * @param[in] dimension The dimension to configure - * @param[in] images The list of images to configure - * @param[in] label The text label to configure - */ - void ConfigureSizeNegotiationDimension( Dimension::Type dimension, const std::vector< Actor >& images, Actor& label ); - - /** - * @brief Sets either the selected or unselected icon. - * - * @param[in] state The icon state to set - * @param[in] iconFilename The filename of the icon - */ - void SetIcon( DecorationState state, const std::string iconFilename ); - - /** - * @brief Gets either the selected or unselected icon. - * - * @param[in] state The icon state to get - * @return The filename of the icon - */ - std::string& GetIcon( DecorationState state ); - - /** * @brief Sets the alignment mode to use to align the icon to the label. * * @param[in] iconAlignment The alignment mode to use @@ -230,34 +158,6 @@ private: */ const PushButton::IconAlignment GetIconAlignment() const; - /** - * @brief Sets the padding for the label. - * - * @param[in] padding The padding to set - */ - void SetLabelPadding( const Vector4& padding ); - - /** - * @brief Gets the padding for the label. - * - * @return The label padding - */ - Vector4 GetLabelPadding(); - - /** - * @brief Sets the padding for the icon. - * - * @param[in] padding The padding to set - */ - void SetIconPadding( const Vector4& padding ); - - /** - * @brief Gets the padding for the icon. - * - * @return The icon padding - */ - Vector4 GetIconPadding(); - private: // Undefined @@ -268,11 +168,7 @@ private: private: - std::string mIconName[ DECORATION_STATES ]; ///< The original filenames for the icons. - Padding mLabelPadding; ///< The padding around the label (if present). - Padding mIconPadding; ///< The padding around the icon (if present). IconAlignment mIconAlignment; ///< The alignment of the icon against the label. - Vector3 mSize; ///< The button's size. }; } // namespace Internal @@ -301,4 +197,4 @@ inline const Toolkit::Internal::PushButton& GetImplementation( const Toolkit::Pu } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H__ +#endif // DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H