X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fradio-button-impl.h;h=b1727502c673b2fbddfd3a04f638728d85c9849b;hb=ca9703cadb3d41264c9b39f2a594f5171f606dbd;hp=917f9fe7c8d7663c43e0a89da296b39ad6870f4b;hpb=2ec164cd618f93ccafe17b1d0b8ff16401ed4aef;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 917f9fe..b172750 100644 --- a/dali-toolkit/internal/controls/buttons/radio-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/radio-button-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__ -#define __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__ +#ifndef DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H +#define DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,13 +19,11 @@ */ // EXTERNAL INCLUDES -#include #include // INTERNAL INCLUDES -#include +#include #include -#include #include "button-impl.h" namespace Dali @@ -34,98 +32,62 @@ namespace Toolkit { namespace Internal { - /** * RadioButton implementation class. * * \sa Dali::Toolkit::RadioButton */ -class RadioButton: public Button +class RadioButton : public Button { public: - /** * Create a new RadioButton. * - * @return A smart-pointer to the newly allocated PushButton. + * @return A smart-pointer to the newly allocated RadioButton. */ static Dali::Toolkit::RadioButton New(); +private: /** - * Construct a new PushButton. + * Construct a new RadioButton. */ RadioButton(); /** - * Construct a new PushButton with label. - */ - RadioButton( const std::string& label ); - - /** - * Construct a new PushButton with label. - */ - RadioButton( Actor label ); - - /** * A reference counted object may only be deleted by calling Unreference() */ virtual ~RadioButton(); -public: // From Button - - /** - * @copydoc Toolkit::Internal::Button::SetButtonImage( Actor image ) - */ - virtual void SetButtonImage( Actor image ); - - /** - * @copydoc Toolkit::Internal::Button::SetSelectedImage( Actor image ) - */ - virtual void SetSelectedImage( Actor image ); - private: // From Button - - /** - * @copydoc Toolkit::Internal::Button::OnButtonInitialize() - */ - virtual void OnButtonInitialize(); - - /** - * @copydoc Toolkit::Internal::Button::OnButtonUp() - */ - virtual void OnButtonUp(); - /** - * @copydoc Toolkit::Internal::Button::OnSelected() + * @copydoc Toolkit::Internal::Button::OnInitialize */ - virtual void OnSelected( bool selected ); + void OnInitialize() override; /** - * @copydoc Toolkit::Internal::Button::OnLabelSet() + * @copydoc Toolkit::Internal::Button::OnStateChange */ - virtual void OnLabelSet(); - -private: + void OnStateChange(State newState) override; /** - * @brief Set the image to display - * - * @param[in] image The image to set + * @copydoc Toolkit::Internal::Button::OnToggleReleased */ - void SetImage( Actor image ); + bool OnToggleReleased() override; private: - // Undefined - RadioButton( const RadioButton& origin ); + RadioButton(const RadioButton& origin); // Undefined - RadioButton& operator=( const RadioButton& origin ); - -private: + RadioButton& operator=(const RadioButton& origin); - Toolkit::TableView mLayoutContainer; ///< Container to position button images and labels +protected: + struct AccessibleImpl : public Button::AccessibleImpl + { + using Button::AccessibleImpl::AccessibleImpl; + Dali::Accessibility::States CalculateStates() override; + }; }; } // namespace Internal @@ -138,7 +100,7 @@ inline Toolkit::Internal::RadioButton& GetImplementation(Toolkit::RadioButton& b Dali::RefObject& handle = button.GetImplementation(); - return static_cast (handle); + return static_cast(handle); } inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::RadioButton& button) @@ -147,10 +109,10 @@ inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::Ra const Dali::RefObject& handle = button.GetImplementation(); - return static_cast (handle); + return static_cast(handle); } } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__ +#endif // DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H