X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscrollable-impl.h;h=44d9a332f9bb7911f157f8c81d8682d25f1d26bb;hp=ee1e02c6c2e802bb775b97733afa8f873915f693;hb=9a5ce98a301f74f8df8a3be6d223b525c8839b0b;hpb=f546dd5d83a968e573f8f053a01ce43df32c71a0 diff --git a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h index ee1e02c..44d9a33 100644 --- a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_SCROLLABLE_H /* - * Copyright (c) 2019 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. @@ -22,18 +22,17 @@ #include // INTERNAL INCLUDES +#include +#include #include #include namespace Dali { - namespace Toolkit { - namespace Internal { - class Scrollable; typedef IntrusivePtr ScrollablePtr; @@ -43,7 +42,6 @@ typedef IntrusivePtr ScrollablePtr; class Scrollable : public Control { public: - /** * @copydoc Dali::Toolkit::Scrollable::IsOvershootEnabled */ @@ -83,13 +81,13 @@ public: * @param[in] position The position to scroll to. * @param[in] duration The duration of the animation in seconds */ - virtual void ScrollTo(const Vector2 &position, float duration) = 0; + virtual void ScrollTo(const Vector2& position, float duration) = 0; /** * Set the color of the overshoot effect. * @parm[in] color The color of the overshoot effect */ - virtual void SetOvershootEffectColor( const Vector4& color ) = 0; + virtual void SetOvershootEffectColor(const Vector4& color) = 0; /** * Retrieve the color of the overshoot effect. @@ -100,7 +98,7 @@ public: /** * @copydoc Dali::Toolkit::Scrollable::SetOvershootAnimationSpeed(float pixelsPerSecond) */ - void SetOvershootAnimationSpeed( float pixelsPerSecond ); + void SetOvershootAnimationSpeed(float pixelsPerSecond); /** * @copydoc Dali::Toolkit::Scrollable::GetOvershootAnimationSpeed() @@ -116,9 +114,15 @@ public: * Set the size of the overshoot effect. * @parm[in] size The size of the overshoot effect */ - virtual void SetOvershootSize( const Vector2& size ) = 0; + virtual void SetOvershootSize(const Vector2& size) = 0; protected: // From Control + struct AccessibleImpl : public DevelControl::ControlAccessible + { + using DevelControl::ControlAccessible::ControlAccessible; + + bool IsScrollable() const override; + }; /** * @copydoc Control::OnInitialize @@ -126,16 +130,16 @@ protected: // From Control virtual void OnInitialize() override; private: - /** * Temporary function to override EnableScrollOvershoot functionality for overshoot * Only ScrollView needs to override this as HQ has not requested disable functionality in ItemView * @param[in] enable true to enable, false to disable overshoot indicator */ - virtual void EnableScrollOvershoot(bool enable) {} + virtual void EnableScrollOvershoot(bool enable) + { + } public: //Signals - /** * @copydoc Dali::Toolkit::Scrollable::ScrollStartedSignal() */ @@ -160,7 +164,7 @@ public: //Signals * @return True if the signal was connected. * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor. */ - static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); + static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor); //properties @@ -170,7 +174,7 @@ public: //Signals * @param[in] index The property index. * @param[in] value The new property value. */ - static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value ); + static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value); /** * Called to retrieve a property of an object of this type. @@ -178,10 +182,9 @@ public: //Signals * @param[in] index The property index. * @return The current value of the property. */ - static Property::Value GetProperty( BaseObject* object, Property::Index index ); + static Property::Value GetProperty(BaseObject* object, Property::Index index); protected: - /** * Removed default constructor. */ @@ -192,7 +195,7 @@ protected: * * @param[in] behaviourFlags Flags to enable */ - Scrollable( ControlBehaviour behaviourFlags ); + Scrollable(ControlBehaviour behaviourFlags); /** * A reference counted object may only be deleted by calling Unreference() @@ -200,7 +203,6 @@ protected: virtual ~Scrollable(); private: - /** * Gets position property. * @@ -209,7 +211,6 @@ private: Vector2 GetPropertyPosition() const; private: - // Undefined Scrollable(const Scrollable&); @@ -217,20 +218,18 @@ private: Scrollable& operator=(const Scrollable& rhs); protected: - - Vector4 mOvershootEffectColor; ///