(ScrollView) If animation duration is 0, then return final position in completed...
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scrollable / scroll-view / scroll-view-impl.h
index f60d3de..3f8562f 100644 (file)
@@ -614,6 +614,13 @@ private:
   bool OnTouchDownTimeout();
 
   /**
+   * Called whenever a snap animation has completed
+   * @param[in] source the Animation instance that has completed.
+   * Resets all scrolling animations and states, leaving current scroll position at mPropertyPosition
+   */
+  void ResetScrolling();
+
+  /**
    * Updates mScrollInternalPosition, mScrollPrePosition and mScrollPostPosition from their property counterparts
    */
   void UpdateLocalScrollProperties();
@@ -698,25 +705,18 @@ private:
   void GestureContinuing(const Vector2& panDelta, const Vector2& scaleDelta, float rotationDelta);
 
   /**
-   * Called when either pan starts or animated scroll starts
-   *
-   * @param[in] scroll position where scrolling started in positive scroll coordinates (scroll properties are negative)
-   */
-  void ScrollingStarted( const Vector3& position );
-
-  /**
-   * Called when scrolling stops, either due to interruption from pan or when scroll animation finishes
+   * Called upon pan gesture event.
    *
-   * @param[in] scroll position where scrolling stopped in positive scroll coordinates (scroll properties are negative)
+   * @param[in] gesture The gesture event.
    */
-  void ScrollingStopped( const Vector3& position );
+  void OnPan(PanGesture pan);
 
   /**
-   * Called upon pan gesture event.
+   * Extension of the above gestures.
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan(PanGesture pan);
+  void OnGestureEx(Gesture::State state);
 
   /**
    * Performs snapping while taking into account Velocity of gesture
@@ -929,6 +929,7 @@ private:
   Animation mInternalXAnimation;        ///< Animates mPropertyX to a snap position or application requested scroll position
   Animation mInternalYAnimation;        ///< Animates mPropertyY to a snap position or application requested scroll position
 
+
   Vector2 mLastVelocity;                ///< Record the last velocity from PanGesture (Finish event doesn't have correct velocity)
   LockAxis mLockAxis;
 
@@ -976,8 +977,7 @@ private:
 
   Toolkit::ScrollView::SnapStartedSignalV2 mSnapStartedSignalV2;
 
-  bool mPropertiesUpdated:1;              ///< Flag telling us when we can return local values to application or if we have to return the property
-  bool mInAccessibilityPan:1;             ///< With AccessibilityPan its easier to move between snap positions
+  bool mInAccessibilityPan : 1;           ///< With AccessibilityPan its easier to move between snap positions
   bool mInitialized:1;
   bool mScrolling:1;                      ///< Flag indicating whether the scroll view is being scrolled (by user or animation)
   bool mScrollInterrupted:1;              ///< Flag set for when a down event interrupts a scroll