X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view-impl.h;h=2c2829a31c23ae72d4109f9be509906c5bc28120;hb=acd889e1216f09643136902ba7a115c2e5589418;hp=082a0465213781e4ff916cdbdc77c247a5602d18;hpb=4bf366c7c657eacb5cf150fa52e34263ca16218f;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h index 082a046..2c2829a 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__ -#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__ +#ifndef DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H +#define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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,9 +22,11 @@ #include #include #include +#include // INTERNAL INCLUDES #include +#include #include #include #include @@ -191,6 +193,13 @@ public: void SetRulerY(RulerPtr ruler); /** + * Retrieve the touch sensitivity. + * + * @return whether the touch sensitivity is true or false. + */ + bool GetScrollSensitive(); + + /** * @copydoc Toolkit::ScrollView::SetScrollSensitive */ void SetScrollSensitive(bool sensitive); @@ -206,11 +215,25 @@ public: void SetSnapOvershootAlphaFunction(AlphaFunction alpha); /** + * Retrieve the duartion of Snap Overshoot animation + * + * @return the duration. + */ + float GetSnapOvershootDuration(); + + /** * @copydoc Toolkit::ScrollView::SetSnapOvershootDuration */ void SetSnapOvershootDuration(float duration); /** + * Retrieve whether Actor Auto-Snap mode is enabled or not. + * + * @return Actor Auto-Snap mode Enabled flag. + */ + bool GetActorAutoSnap(); + + /** * @copydoc Toolkit::ScrollView::SetActorAutoSnap */ void SetActorAutoSnap(bool enable); @@ -343,11 +366,6 @@ public: Vector2 GetCurrentScrollPosition() const; /** - * @copydoc Toolkit::Scrollable::GetDomainSize - */ - Vector2 GetDomainSize() const; - - /** * @copydoc ScrollTo(const Vector2&) */ void TransformTo(const Vector2& position, @@ -478,10 +496,33 @@ public: void RemoveOverlay(Actor actor); /** + * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize + */ + void SetOvershootSize( const Vector2& size ); + + /** * @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor */ void SetOvershootEffectColor( const Vector4& color ); + //properties + + /** + * Called when a property of an object of this type is set. + * @param[in] object The object whose property is set. + * @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 ); + + /** + * Called to retrieve a property of an object of this type. + * @param[in] object The object whose property is to be retrieved. + * @param[in] index The property index. + * @return The current value of the property. + */ + static Property::Value GetProperty( BaseObject* object, Property::Index index ); + public: //Signals /** @@ -500,7 +541,7 @@ public: //Signals */ static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); -private: // private overriden functions from CustomActorImpl and Controls +private: // private overridden functions from CustomActorImpl and Controls /** * @copydoc Dali::CustomActorImpl::OnSizeAnimation(Animation&, const Vector3&) @@ -525,16 +566,6 @@ private: // private overriden functions from CustomActorImpl and Controls virtual void OnChildRemove(Actor& child); /** - * From CustomActorImpl; called after a touchSignal is received by the owning actor. - * - * We don't listen to these events as content within the contain may consume events. - * - * @param[in] event The touch event. - * @return True if the event should be consumed. - */ - virtual bool OnTouchEvent(const TouchEvent& event); - - /** * From CustomActorImpl; called after a wheelEvent is received by the owning actor. * @param[in] event The wheel event. * @return True if the event should be consumed. @@ -569,6 +600,17 @@ private: // private overriden functions from CustomActorImpl and Controls private: /** + * Called after a touchSignal is received by the owning actor. + * + * We don't consume these events as content within the container may consume events. + * + * @param[in] actor The touched actor. + * @param[in] touch The touch information. + * @return True if the event should be consumed. + */ + bool OnTouch( Actor actor, const TouchData& touch ); + + /** * Start a timer which calls OnTouchDownTimeout() */ void StartTouchDownTimer(); @@ -817,6 +859,13 @@ private: */ void OnScrollUpdateNotification(Dali::PropertyNotification& source); + /** + * Set up default rulers using a property map + * @param[in] scrollModeMap A map defining the characteristics of X and Y scrolling + * using either FixedRuler or DefaultRuler. + */ + void SetScrollMode( const Property::Map& scrollModeMap ); + private: // Undefined @@ -855,7 +904,7 @@ private: Vector2 mLastVelocity; ///< Record the last velocity from PanGesture (Finish event doesn't have correct velocity) LockAxis mLockAxis; - Timer mTouchDownTimer; ///< Used to interrupt snap-animation. This cannot be done in OnTouchEvent without breaking fast flick behavior. + Timer mTouchDownTimer; ///< Used to interrupt snap-animation. This cannot be done in OnTouch without breaking fast flick behavior. float mScrollUpdateDistance; ///< Distance for scrolling to travel for the scroll update notifications Dali::PropertyNotification mScrollXUpdateNotification; ///< scroll x position update notification @@ -897,6 +946,7 @@ private: Constraint mScrollMainInternalPrePositionMaxConstraint; ScrollOvershootIndicatorPtr mOvershootIndicator; + WeakHandle mScrollBar; Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal; @@ -914,6 +964,7 @@ private: bool mDefaultMaxOvershoot:1; ///< Whether to use default max overshoot or application defined one bool mCanScrollHorizontal:1; ///< Local value of our property to check against bool mCanScrollVertical:1; ///< Local value of our property to check against + bool mTransientScrollBar:1; ///< True if scroll-bar should be automatically show/hidden during/after panning }; } // namespace Internal @@ -942,4 +993,4 @@ inline const Toolkit::Internal::ScrollView& GetImpl(const Toolkit::ScrollView& s } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H__ +#endif // DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H