X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fradio-button-impl.h;h=075f8bd69d28a5c57a082aa4b33a911e6e91e321;hp=43a3c6270c210bafe2e9557a7069dbc837202333;hb=8a647e87a01c5c78451653c1264a9eea81ac9b20;hpb=cc82bd9b187cda8fe2c8336b73fd1fa9376cfebd diff --git a/dali-toolkit/internal/controls/buttons/radio-button-impl.h b/dali-toolkit/internal/controls/buttons/radio-button-impl.h index 43a3c62..075f8bd 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) 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. @@ -19,12 +19,11 @@ */ // EXTERNAL INCLUDES -#include #include // INTERNAL INCLUDES #include -#include +#include #include "button-impl.h" namespace Dali @@ -46,72 +45,38 @@ 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(); - /** - * Construct a new PushButton. - */ - RadioButton(); - - /** - * Construct a new PushButton with label. - */ - RadioButton( const std::string& label ); +private: /** - * Construct a new PushButton with label. + * Construct a new RadioButton. */ - RadioButton( Actor label ); + RadioButton(); /** * 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() + * @copydoc Toolkit::Internal::Button::OnInitialize */ - virtual void OnButtonInitialize(); + void OnInitialize() override; /** - * @copydoc Toolkit::Internal::Button::OnButtonUp() + * @copydoc Toolkit::Internal::Button::OnStateChange */ - virtual void OnButtonUp(); + void OnStateChange( State newState ) override; /** - * @copydoc Toolkit::Internal::Button::OnSelected() + * @copydoc Toolkit::Internal::Button::OnToggleReleased */ - virtual void OnSelected( bool selected ); - - /** - * @copydoc Toolkit::Internal::Button::OnLabelSet() - */ - virtual void OnLabelSet(); - -private: - - /** - * @brief Set the image to display - * - * @param[in] image The image to set - */ - void SetImage( Actor image ); + bool OnToggleReleased() override; private: @@ -121,10 +86,13 @@ private: // Undefined RadioButton& operator=( const RadioButton& origin ); -private: - - 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 @@ -152,4 +120,4 @@ inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::Ra } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__ +#endif // DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H