X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fradio-button-impl.h;h=917f9fe7c8d7663c43e0a89da296b39ad6870f4b;hb=834ddf7832598a57fc18c282371554a1ed8f0a78;hp=07c622ba6c97c6448e0fb223104572ebd94f0c76;hpb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/buttons/radio-button-impl.h b/dali-toolkit/internal/controls/buttons/radio-button-impl.h index 07c622b..917f9fe 100644 --- a/dali-toolkit/internal/controls/buttons/radio-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/radio-button-impl.h @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include #include "button-impl.h" namespace Dali @@ -41,7 +42,7 @@ namespace Internal */ class RadioButton: public Button { - public: +public: /** * Create a new RadioButton. @@ -58,93 +59,74 @@ class RadioButton: public Button /** * Construct a new PushButton with label. */ - RadioButton(const std::string& label); + RadioButton( const std::string& label ); /** * Construct a new PushButton with label. */ - RadioButton(Actor label); + RadioButton( Actor label ); /** * A reference counted object may only be deleted by calling Unreference() */ virtual ~RadioButton(); - /** - * @copydoc Dali::Toolkit::RadioButton::SetLabel(const std::string& label) - */ - void SetLabel(const std::string& label); +public: // From Button /** - * @copydoc Dali::Toolkit::RadioButton::SetLabel(Actor label) + * @copydoc Toolkit::Internal::Button::SetButtonImage( Actor image ) */ - void SetLabel(Actor label); + virtual void SetButtonImage( Actor image ); /** - * @copydoc Dali::Toolkit::RadioButton::GetLabel() + * @copydoc Toolkit::Internal::Button::SetSelectedImage( Actor image ) */ - Actor GetLabel() const; + virtual void SetSelectedImage( Actor image ); - /** - * @copydoc Dali::Toolkit::RadioButton::SetSelected(bool selected) - */ - void SetSelected(bool selected); +private: // From Button /** - * @copydoc Dali::Toolkit::RadioButton::IsSelected() + * @copydoc Toolkit::Internal::Button::OnButtonInitialize() */ - bool IsSelected()const; + virtual void OnButtonInitialize(); /** - * @copydoc Dali::Toolkit::RadioButton::ToggleState() + * @copydoc Toolkit::Internal::Button::OnButtonUp() */ - void ToggleState(); - - /** - * @copydoc Dali::Toolkit::Control::OnRelayout() - */ - virtual void OnRelayout( const Vector2& size, ActorSizeContainer& container ); - - public: - // Properties + virtual void OnButtonUp(); /** - * @copydoc Button::SetProperty + * @copydoc Toolkit::Internal::Button::OnSelected() */ - static void SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value); + virtual void OnSelected( bool selected ); /** - * @copydoc Button::GetProperty + * @copydoc Toolkit::Internal::Button::OnLabelSet() */ - static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex); + virtual void OnLabelSet(); - protected: // From Control +private: /** - * Sets the relative position of image and label. - */ - virtual void OnInitialize(); - - protected: // From Button - /** - * Change button state when the button is pressed. + * @brief Set the image to display + * + * @param[in] image The image to set */ - virtual void OnButtonUp(); + void SetImage( Actor image ); - private: +private: // Undefined - RadioButton(const RadioButton& origin); + RadioButton( const RadioButton& origin ); // Undefined - RadioButton& operator=(const RadioButton& origin); - - Image mUnselectedImage; ///< Stores the unselected image - Image mSelectedImage; ///< Stores the selected image - ImageActor mRadioIcon; ///< Stores the current image - Actor mLabel; ///< Stores the button label - bool mSelected; ///< Stores the selected state -} ; + RadioButton& operator=( const RadioButton& origin ); + +private: + + Toolkit::TableView mLayoutContainer; ///< Container to position button images and labels + +}; } // namespace Internal