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=660606c469849979f6faee292c252165d0ea3abe;hp=e100e755afe65189092b83f61a49e05bf8d54727;hb=1f316c7e8f22f1ada38dfdff44d556205bb40ca4;hpb=306d2f61a1b64179e801fa8a0bb2bd7b4e9dd682 diff --git a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h index e100e75..660606c 100644 --- a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h @@ -19,12 +19,11 @@ */ // EXTERNAL INCLUDES -#include +#include // INTERNAL INCLUDES #include #include -#include namespace Dali { @@ -44,37 +43,16 @@ typedef IntrusivePtr ScrollablePtr; class Scrollable : public Control { public: - static const std::string SCROLLABLE_CAN_SCROLL_VERTICAL; - static const std::string SCROLLABLE_CAN_SCROLL_HORIZONTAL; /** - * Create a new Scrollable. - * @return A public handle to the newly allocated Scrollable. + * @copydoc Dali::Toolkit::Scrollable::IsOvershootEnabled */ -// static Dali::Toolkit::Scrollable New(); - -public: - - /** - * @copydoc Dali::Toolkit::Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType type) - */ - bool IsScrollComponentEnabled(Toolkit::Scrollable::ScrollComponentType type) const; - - /** - * @copydoc Dali::Toolkit::Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType type) - */ - void EnableScrollComponent(Toolkit::Scrollable::ScrollComponentType type); - - /** - * @copydoc Dali::Toolkit::Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType type) - */ - void DisableScrollComponent(Toolkit::Scrollable::ScrollComponentType type); + bool IsOvershootEnabled() const; /** - * Gets the size of the domain (minimum/maximum extents for each axis to scroll to) - * @return the domain size + * @copydoc Dali::Toolkit::Scrollable::SetOvershootEnabled */ - virtual Vector3 GetDomainSize() const = 0; + void SetOvershootEnabled(bool enable); /** * Adds actor as an Overlay to Scrollable @@ -96,7 +74,7 @@ public: * Retrieves current scroll position. * @returns The current scroll position. */ - virtual Vector3 GetCurrentScrollPosition() const = 0; + virtual Vector2 GetCurrentScrollPosition() const = 0; /** * Scrolls Scrollable to position specified (contents will scroll to this position) @@ -105,7 +83,7 @@ public: * @param[in] position The position to scroll to. * @param[in] duration The duration of the animation in seconds */ - virtual void ScrollTo(const Vector3 &position, float duration) = 0; + virtual void ScrollTo(const Vector2 &position, float duration) = 0; /** * Set the color of the overshoot effect. @@ -129,14 +107,19 @@ public: */ float GetOvershootAnimationSpeed() const; + /** + * @copydoc Dali::Toolkit::Scrollable::GetOvershootSize() + */ + const Vector2& GetOvershootSize() const; + private: /** - * Temporary function to override EnableScrollComponent functionality for overshoot + * 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 SetOvershootEnabled(bool enable) {} + virtual void EnableScrollOvershoot(bool enable) {} public: //Signals @@ -156,11 +139,6 @@ public: //Signals Toolkit::Scrollable::ScrollCompletedSignalType& ScrollCompletedSignal(); /** - * @copydoc Dali::Toolkit::Scrollable::ScrollClampedSignal() - */ - Toolkit::Scrollable::ScrollClampedSignalType& ScrollClampedSignal(); - - /** * Connects a callback function with the object's signals. * @param[in] object The object providing the signal. * @param[in] tracker Used to disconnect the signal. @@ -197,14 +175,16 @@ protected: Scrollable(); /** - * A reference counted object may only be deleted by calling Unreference() + * @brief Construct a new Scrollable. + * + * @param[in] behaviourFlags Flags to enable */ - virtual ~Scrollable(); + Scrollable( ControlBehaviour behaviourFlags ); /** - * Register common properties + * A reference counted object may only be deleted by calling Unreference() */ - void RegisterCommonProperties(); + virtual ~Scrollable(); private: @@ -213,7 +193,7 @@ private: * * @return The current position */ - Vector3 GetPropertyPosition() const; + Vector2 GetPropertyPosition() const; private: @@ -223,39 +203,20 @@ private: // Undefined Scrollable& operator=(const Scrollable& rhs); - /** - * Helper to create an initialized ScrollComponent - * @param[in] scrollable reference to ScrollView implementation - * @param[in] type the type of scroll component to create. - * @return A pointer to the created ScrollComponent. - */ - Toolkit::ScrollComponent NewScrollComponent(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type); - protected: Vector4 mOvershootEffectColor; /// mComponent; ///< ScrollComponent (such as a scrollbar/page indicator/status) + Dali::AlphaFunction::BuiltinFunction mScrollToAlphaFunction; ///< The ScrollTo() animations use this Toolkit::Scrollable::ScrollStartedSignalType mScrollStartedSignal; Toolkit::Scrollable::ScrollUpdatedSignalType mScrollUpdatedSignal; Toolkit::Scrollable::ScrollCompletedSignalType mScrollCompletedSignal; - Toolkit::Scrollable::ScrollClampedSignalType mScrollClampedSignal; private: - typedef std::map ComponentContainer; - typedef ComponentContainer::iterator ComponentIter; - - ComponentContainer mComponents; ///< ScrollComponent (such as a scrollbar/page indicator/status) bool mOvershootEnabled:1; };