X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-base-impl.h;h=a64b6a5656f445851bd30e747b20805ef463d87c;hb=13a7c74fa789734b05d19d68bae51ac68e3b9713;hp=dcc5f743c091b417b937a2c53ed921e5939c50ae;hpb=030e7c680a6eb0e8d87bfdb8ec359a0267ef7db2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h index dcc5f74..a64b6a5 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H__ -#define __DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H__ +#ifndef DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H +#define DALI_TOOLKIT_INTERNAL_SCROLL_BASE_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,27 +20,24 @@ // EXTERNAL INCLUDES // TODO - Replace list with dali-vector.h -#include #include +#include // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - namespace Internal { - class ScrollBase; -typedef IntrusivePtr ActorPtr; -typedef std::list ConstraintStack; +typedef IntrusivePtr ActorPtr; +typedef std::list ConstraintStack; /** * ScrollBase represents a set of properties (time, position @@ -49,7 +46,6 @@ typedef std::list ConstraintStack; class ScrollBase : public Scrollable { public: - struct ActorInfo : public Dali::RefObject { /** @@ -78,9 +74,9 @@ public: */ void ApplyConstraint(Constraint constraint) { - Constraint clone = constraint.Clone( mActor ); + Constraint clone = constraint.Clone(mActor); clone.Apply(); - mConstraints.push_back( clone ); + mConstraints.push_back(clone); } /** @@ -90,26 +86,25 @@ public: */ void RemoveConstraints() { - std::vector::iterator it = mConstraints.begin(); + std::vector::iterator it = mConstraints.begin(); std::vector::iterator end = mConstraints.end(); - for(;it!=end;++it) + for(; it != end; ++it) { it->Remove(); } mConstraints.clear(); } - Actor mActor; ///< The Actor that this ActorInfo represents. - std::vector mConstraints; ///< A list keeping track of constraints applied to the actor via this delegate. + Actor mActor; ///< The Actor that this ActorInfo represents. + std::vector mConstraints; ///< A list keeping track of constraints applied to the actor via this delegate. }; - typedef IntrusivePtr ActorInfoPtr; - typedef std::vector ActorInfoContainer; - typedef ActorInfoContainer::iterator ActorInfoIter; + typedef IntrusivePtr ActorInfoPtr; + typedef std::vector ActorInfoContainer; + typedef ActorInfoContainer::iterator ActorInfoIter; typedef ActorInfoContainer::const_iterator ActorInfoConstIter; public: - /** * Sets the delay in seconds. * This delay affects the animation timing for all @@ -133,13 +128,12 @@ public: } public: - /** * Sets ScrollBase Parent * * @param[in] parent The parent that this ScrollBase belongs to. */ - void SetParent(ScrollBase *parent); + void SetParent(ScrollBase* parent); /** * Bind Actor to this scroll view/group. @@ -181,33 +175,28 @@ public: void RemoveConstraintsFromBoundActors(); protected: - static const char* const SCROLL_DOMAIN_OFFSET_PROPERTY_NAME; protected: - /** - * Construct a new ScrollBase. + * Removed default costructor. */ - ScrollBase(); + ScrollBase() = delete; /** * @brief Construct a new ScrollBase. * * @param[in] behaviourFlags Flags to enable */ - ScrollBase( ControlBehaviour behaviourFlags ); + ScrollBase(ControlBehaviour behaviourFlags); protected: - - ScrollBase *mParent; ///< Pointer to ScrollBase parent, if exists. + ScrollBase* mParent; ///< Pointer to ScrollBase parent, if exists. private: - - float mDelay; ///< delay in seconds. - ConstraintStack mConstraintStack; ///< The list of constraints to apply to any actors - ActorInfoContainer mBoundActors; ///< The list of actors that have been bound to this ScrollBase. - + float mDelay; ///< delay in seconds. + ConstraintStack mConstraintStack; ///< The list of constraints to apply to any actors + ActorInfoContainer mBoundActors; ///< The list of actors that have been bound to this ScrollBase. }; } // namespace Internal @@ -216,4 +205,4 @@ private: } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_GROUP_H__ +#endif // DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H