X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view-impl.h;h=ec7b893f52d91b4af4dbbfa74d17bd50bccef28b;hp=b28872069923852e8b7a4e6526c1a25c65b0456b;hb=ca99959003c0445d5afb437e2be26361dff51623;hpb=71e9401257ac2b3612aef56b6b94303cb1d3a849 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 b288720..ec7b893 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) 2020 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 @@ -367,13 +369,13 @@ public: * @copydoc ScrollTo(const Vector2&) */ void TransformTo(const Vector2& position, - DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone); + DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE); /** * @copydoc ScrollTo(const Vector2&, float, AlhpaFunction, DirectionBias, DirectionBias) */ void TransformTo(const Vector2& position, float duration, AlphaFunction alpha, - DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone); + DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE); /** * @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position) @@ -410,7 +412,7 @@ public: /** * @copydoc Toolkit::ScrollView::ScrollTo(unsigned int page, float duration, DirectionBias bias) */ - void ScrollTo(unsigned int page, float duration, DirectionBias bias = DirectionBiasNone); + void ScrollTo(unsigned int page, float duration, DirectionBias bias = DIRECTION_BIAS_NONE); /** * @copydoc Toolkit::ScrollView::ScrollTo(Actor& actor) @@ -480,8 +482,8 @@ public: */ bool AnimateTo(const Vector2& position, const Vector2& positionDuration, AlphaFunction alpha, bool findShortcuts = true, - DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone, - SnapType snapType = Snap); + DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE, + SnapType snapType = SNAP); /** * @copydoc Toolkit::Scrollable::AddOverlay() @@ -494,6 +496,11 @@ 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 ); @@ -559,11 +566,12 @@ private: // private overridden functions from CustomActorImpl and Controls virtual void OnChildRemove(Actor& child); /** - * From CustomActorImpl; called after a wheelEvent is received by the owning actor. + * Called after a wheelEvent is received by the owning actor. + * @param[in] actor Actor associated with the event. * @param[in] event The wheel event. * @return True if the event should be consumed. */ - virtual bool OnWheelEvent(const WheelEvent& event); + bool OnWheelEvent(Actor actor, const WheelEvent& event); /** * @copydoc Toolkit::Control::OnInitialize() @@ -571,14 +579,14 @@ private: // private overridden functions from CustomActorImpl and Controls virtual void OnInitialize(); /** - * @copydoc CustomActorImpl::OnStageConnection() + * @copydoc CustomActorImpl::OnSceneConnection() */ - virtual void OnStageConnection( int depth ); + virtual void OnSceneConnection( int depth ); /** - * @copydoc CustomActorImpl::OnStageDisconnection() + * @copydoc CustomActorImpl::OnSceneDisconnection() */ - virtual void OnStageDisconnection(); + virtual void OnSceneDisconnection(); /** * @copydoc Toolkit::Control::OnAccessibilityPan() @@ -601,7 +609,7 @@ private: * @param[in] touch The touch information. * @return True if the event should be consumed. */ - bool OnTouch( Actor actor, const TouchData& touch ); + bool OnTouch( Actor actor, const TouchEvent& touch ); /** * Start a timer which calls OnTouchDownTimeout() @@ -717,7 +725,7 @@ private: * * @param[in] gesture The gesture event. */ - void OnGestureEx(Gesture::State state); + void OnGestureEx(GestureState state); /** * Performs snapping while taking into account Velocity of gesture @@ -852,6 +860,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 @@ -932,6 +947,7 @@ private: Constraint mScrollMainInternalPrePositionMaxConstraint; ScrollOvershootIndicatorPtr mOvershootIndicator; + WeakHandle mScrollBar; Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal; @@ -949,6 +965,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 @@ -977,4 +994,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