X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fradio-button-impl.h;h=b1727502c673b2fbddfd3a04f638728d85c9849b;hb=19179e76939a18697e6919177a4c561586e8d30b;hp=eec11ab9652c1b9dc21c84bbe41ecdc4443e24f4;hpb=a41a75fa9679db6703affe8870af6e1eb6bcfc48;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 eec11ab..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,16 +32,14 @@ namespace Toolkit { namespace Internal { - /** * RadioButton implementation class. * * \sa Dali::Toolkit::RadioButton */ -class RadioButton: public Button +class RadioButton : public Button { public: - /** * Create a new RadioButton. * @@ -52,7 +48,6 @@ public: static Dali::Toolkit::RadioButton New(); private: - /** * Construct a new RadioButton. */ @@ -64,34 +59,35 @@ private: virtual ~RadioButton(); private: // From Button - - /** - * @copydoc Toolkit::Internal::Button::OnButtonInitialize() - */ - virtual void OnButtonInitialize(); - /** - * @copydoc Toolkit::Internal::Button::OnButtonUp() + * @copydoc Toolkit::Internal::Button::OnInitialize */ - virtual void OnButtonUp(); + void OnInitialize() override; /** - * @copydoc Toolkit::Internal::Button::OnSelected() + * @copydoc Toolkit::Internal::Button::OnStateChange */ - virtual bool OnSelected(); + void OnStateChange(State newState) override; /** - * @copydoc Toolkit::Internal::Button::OnLabelSet() + * @copydoc Toolkit::Internal::Button::OnToggleReleased */ - virtual void OnLabelSet(); + bool OnToggleReleased() override; private: - // Undefined - RadioButton( const RadioButton& origin ); + RadioButton(const RadioButton& origin); // Undefined - RadioButton& operator=( const RadioButton& origin ); + RadioButton& operator=(const RadioButton& origin); + +protected: + struct AccessibleImpl : public Button::AccessibleImpl + { + using Button::AccessibleImpl::AccessibleImpl; + + Dali::Accessibility::States CalculateStates() override; + }; }; } // namespace Internal @@ -104,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) @@ -113,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