X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-base-impl.h;h=dcc5f743c091b417b937a2c53ed921e5939c50ae;hb=36a298758d1b6244b7846a0102b528d76002dbda;hp=968e3ab836da18dad5ce4dcf2a6d7280bd0e4e67;hpb=b458e407eba11c73f38da68bce8e967a30ea03e2;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 968e3ab..dcc5f74 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 @@ -21,7 +21,6 @@ // EXTERNAL INCLUDES // TODO - Replace list with dali-vector.h #include -#include #include // INTERNAL INCLUDES @@ -79,8 +78,9 @@ public: */ void ApplyConstraint(Constraint constraint) { - ActiveConstraint activeConstraint = mActor.ApplyConstraint( constraint ); - mConstraints.push_back( activeConstraint ); + Constraint clone = constraint.Clone( mActor ); + clone.Apply(); + mConstraints.push_back( clone ); } /** @@ -90,17 +90,17 @@ public: */ void RemoveConstraints() { - std::vector::iterator it = mConstraints.begin(); - std::vector::iterator end = mConstraints.end(); + std::vector::iterator it = mConstraints.begin(); + std::vector::iterator end = mConstraints.end(); for(;it!=end;++it) { - mActor.RemoveConstraint(*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. + std::vector mConstraints; ///< A list keeping track of constraints applied to the actor via this delegate. }; typedef IntrusivePtr ActorInfoPtr; @@ -192,25 +192,15 @@ protected: ScrollBase(); /** - * 2nd-phase initialization. + * @brief Construct a new ScrollBase. + * + * @param[in] behaviourFlags Flags to enable */ - void RegisterProperties(); + ScrollBase( ControlBehaviour behaviourFlags ); protected: ScrollBase *mParent; ///< Pointer to ScrollBase parent, if exists. - Property::Index mPropertyTime; ///< Scroll Time (0 to animationDuration while animating, otherwise 0) - Property::Index mPropertyPrePosition; ///< Scroll Position ("scroll-position") [function of scroll-x, scroll-y] - Property::Index mPropertyPosition; ///< Scroll Position ("scroll-position") [function of scroll-pre-position] - Property::Index mPropertyOvershootX; ///< Scroll Overshoot ("scroll-overshoot-x") [function of scroll-pre-position, scroll-position] - Property::Index mPropertyOvershootY; ///< Scroll Overshoot ("scroll-overshoot-y") [function of scroll-pre-position, scroll-position] - Property::Index mPropertyWrap; ///< Scroll Wrap ("scroll-wrap") - Property::Index mPropertyPanning; ///< Whether we are panning - Property::Index mPropertyScrolling; ///< Whether we are scrolling - Property::Index mPropertyFinal; ///< Scroll Final Position ("scroll-final") [scroll-position + f(scroll-overshoot)] - Property::Index mPropertyDomainOffset; ///< Scroll Domain Offset ("scroll-domain-offset") keeps track of scroll position as it wraps domains - Property::Index mPropertyPositionDelta; ///< Scroll Position Delta ("scroll-position-delta") - Property::Index mPropertyScrollStartPagePosition; ///< Scroll Start Page Position ("scroll-start-page-position") private: