X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fcheck-box-button-impl.h;h=ffae507298988b862383f80a9bef1f61bd82f74b;hb=bdbfbd90942156c5ecd2f2f1b3bfb3a8254e1cc3;hp=06bb1c6c36d1af1e649ccf42521a555bdae7ca03;hpb=820c66e71516e7a25600b8b5de2e84b5d44d8ff3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/buttons/check-box-button-impl.h b/dali-toolkit/internal/controls/buttons/check-box-button-impl.h index 06bb1c6..ffae507 100644 --- a/dali-toolkit/internal/controls/buttons/check-box-button-impl.h +++ b/dali-toolkit/internal/controls/buttons/check-box-button-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__ -#define __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__ +#ifndef DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H +#define DALI_TOOLKIT_INTERNAL_CHECK_BOX_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. @@ -20,23 +20,18 @@ // EXTERNAL INCLUDES #include -#include // INTERNAL INCLUDES #include -#include #include "button-impl.h" namespace Dali { - namespace Toolkit { - namespace Internal { - /** * CheckBoxButton implementation class. * @@ -45,7 +40,6 @@ namespace Internal class CheckBoxButton : public Button { public: - /** * Create a new CheckBoxButton. * @return A smart-pointer to the newly allocated CheckBoxButton. @@ -53,7 +47,6 @@ public: static Dali::Toolkit::CheckBoxButton New(); private: - /** * Construct a new CheckBoxButton. */ @@ -65,92 +58,52 @@ private: virtual ~CheckBoxButton(); private: // From Button - - - /** - * @copydoc Toolkit::Internal::Button::OnButtonInitialize() - */ - virtual void OnButtonInitialize(); - - /** - * @copydoc Toolkit::Internal::Button::OnLabelSet() - */ - virtual void OnLabelSet(); - - /** - * @copydoc Toolkit::Internal::Button::OnSelected() - */ - virtual bool OnSelected(); - - /** - * @copydoc Toolkit::Internal::Button::OnDisabled() - */ - virtual bool OnDisabled(); - /** - * @copydoc Toolkit::Internal::Button::StopAllAnimations() + * @copydoc Toolkit::Internal::Button::OnInitialize */ - virtual void StopAllAnimations(); + void OnInitialize() override; private: - - /** - * Adds the actor to the transition animation. - * It creates a transition animation if needed and starts the animation. - * @param[in] actor The actor. - */ - void StartTransitionAnimation( Actor& actor ); - - /** - * Stops the transition animation. - * @param[in] remove If true, removes the fadeout actor from root. - */ - void StopTransitionAnimation( bool remove = true ); - - // slots - - /** - * Called when the transition animation finishes. - */ - void TransitionAnimationFinished( Dali::Animation& source ); - -private: - // Undefined - CheckBoxButton( const CheckBoxButton& ); + CheckBoxButton(const CheckBoxButton&); // Undefined - CheckBoxButton& operator=( const CheckBoxButton& ); + CheckBoxButton& operator=(const CheckBoxButton&); -private: - Animation mTransitionAnimation; ///< Animation used in the state transitions. - ImageRegionEffect mTickUVEffect; ///< ImageRegionEffect to expand the tick across +protected: + struct AccessibleImpl : public Button::AccessibleImpl + { + using Button::AccessibleImpl::AccessibleImpl; + + Dali::Accessibility::States CalculateStates() override; + }; + void OnStateChange(State newState) override; }; } // namespace Internal // Helpers for public-api forwarding methods -inline Toolkit::Internal::CheckBoxButton& GetImplementation( Toolkit::CheckBoxButton& button ) +inline Toolkit::Internal::CheckBoxButton& GetImplementation(Toolkit::CheckBoxButton& button) { - DALI_ASSERT_ALWAYS( button ); + DALI_ASSERT_ALWAYS(button); Dali::RefObject& handle = button.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } -inline const Toolkit::Internal::CheckBoxButton& GetImplementation( const Toolkit::CheckBoxButton& button ) +inline const Toolkit::Internal::CheckBoxButton& GetImplementation(const Toolkit::CheckBoxButton& button) { - DALI_ASSERT_ALWAYS( button ); + DALI_ASSERT_ALWAYS(button); const Dali::RefObject& handle = button.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__ +#endif // DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H