Provided by Matthew Stephenson.
Change-Id: I07eec2480b4ae7ece18eee15a54b012c0349a97d
void ScrollView::TransformTo(const Vector3& position,
DirectionBias horizontalBias, DirectionBias verticalBias)
{
- TransformTo(position, mSnapDuration, horizontalBias, verticalBias);
+ TransformTo(position, mSnapDuration, mSnapAlphaFunction, horizontalBias, verticalBias);
}
-void ScrollView::TransformTo(const Vector3& position, float duration,
+void ScrollView::TransformTo(const Vector3& position, float duration, AlphaFunction alpha,
DirectionBias horizontalBias, DirectionBias verticalBias)
{
Actor self( Self() );
mScrollStartedSignalV2.Emit( currentScrollPosition );
bool animating = AnimateTo(-position,
Vector3::ONE * duration,
- mSnapAlphaFunction,
+ alpha,
true,
horizontalBias,
verticalBias,
ScrollTo(position, duration, DirectionBiasNone, DirectionBiasNone);
}
+void ScrollView::ScrollTo(const Vector3& position, float duration, AlphaFunction alpha)
+{
+ ScrollTo(position, duration, alpha, DirectionBiasNone, DirectionBiasNone);
+}
+
void ScrollView::ScrollTo(const Vector3& position, float duration,
DirectionBias horizontalBias, DirectionBias verticalBias)
{
- DALI_LOG_SCROLL_STATE("[0x%X] position[%.2f, %.2f] duration[%.2f]",
- this, position.x, position.y, duration, int(horizontalBias), int(verticalBias));
+ ScrollTo(position, duration, mSnapAlphaFunction, horizontalBias, verticalBias);
+}
- TransformTo(position, duration, horizontalBias, verticalBias);
+void ScrollView::ScrollTo(const Vector3& position, float duration, AlphaFunction alpha,
+ DirectionBias horizontalBias, DirectionBias verticalBias)
+{
+ DALI_LOG_SCROLL_STATE("[0x%X] position[%.2f, %.2f] duration[%.2f]", this, position.x, position.y, duration, int(horizontalBias), int(verticalBias));
+ TransformTo(position, duration, alpha, horizontalBias, verticalBias);
}
void ScrollView::ScrollTo(unsigned int page)
DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
/**
- * @copydoc ScrollTo(const Vector3&, float, DirectionBias, DirectionBias)
+ * @copydoc ScrollTo(const Vector3&, float, AlhpaFunction, DirectionBias, DirectionBias)
*/
- void TransformTo(const Vector3& position, float duration,
+ void TransformTo(const Vector3& position, float duration, AlphaFunction alpha,
DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
/**
*/
void ScrollTo(const Vector3& position, float duration);
+ /**
+ * @copydoc Toolkit::Scrollable::ScrollTo(const Vector3& position, float duration, AlphaFunction alpha)
+ */
+ void ScrollTo(const Vector3& position, float duration, AlphaFunction alpha);
+
/**
* @copydoc Toolkit::ScrollView::ScrollTo(const Vector3 &position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
*/
void ScrollTo(const Vector3& position, float duration,
DirectionBias horizontalBias, DirectionBias verticalBias);
+ /**
+ * @copydoc Toolkit::ScrollView::ScrollTo(const Vector3 &position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
+ */
+ void ScrollTo(const Vector3& position, float duration, AlphaFunction alpha,
+ DirectionBias horizontalBias, DirectionBias verticalBias);
+
/**
* @copydoc Toolkit::ScrollView::ScrollTo(unsigned int page)
*/
GetImpl(*this).ScrollTo(position, duration);
}
+void ScrollView::ScrollTo(const Vector3 &position, float duration, AlphaFunction alpha)
+{
+ GetImpl(*this).ScrollTo(position, duration, alpha);
+}
+
void ScrollView::ScrollTo(const Vector3 &position, float duration,
DirectionBias horizontalBias, DirectionBias verticalBias)
{
GetImpl(*this).ScrollTo(position, duration, horizontalBias, verticalBias);
}
+void ScrollView::ScrollTo(const Vector3 &position, float duration, AlphaFunction alpha,
+ DirectionBias horizontalBias, DirectionBias verticalBias)
+{
+ GetImpl(*this).ScrollTo(position, duration, alpha, horizontalBias, verticalBias);
+}
+
void ScrollView::ScrollTo(unsigned int page)
{
GetImpl(*this).ScrollTo(page);
*/
void ScrollTo(const Vector3 &position, float duration);
+ /**
+ * @brief Scrolls View to position specified (contents will scroll to this position)
+ *
+ * Position 0,0 is the origin. Increasing X scrolls contents left, while
+ * increasing Y scrolls contents up.
+ * - If Rulers have been applied to the axes, then the contents will scroll until
+ * reaching the domain boundary.
+ * @note Contents will not snap to ruler snap points.
+ *
+ * @param[in] position The position to scroll to.
+ * @param[in] duration The duration of the animation in seconds
+ * @param[in] alpha The alpha function to use
+ */
+ void ScrollTo(const Vector3 &position, float duration, AlphaFunction alpha);
+
/**
* @brief Scrolls View to position specified (contents will scroll to this position).
*
void ScrollTo(const Vector3 &position, float duration,
DirectionBias horizontalBias, DirectionBias verticalBias);
+ /**
+ * @brief Scrolls View to position specified (contents will scroll to this position)
+ *
+ * Position 0,0 is the origin. Increasing X scrolls contents left, while
+ * increasing Y scrolls contents up.
+ * - If Rulers have been applied to the axes, then the contents will scroll until
+ * reaching the domain boundary.
+ * @note Contents will not snap to ruler snap points.
+ * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in
+ * wrap mode, the application developer can decide whether to scroll left or right
+ * to get to the target page
+ *
+ * @param[in] position The position to scroll to.
+ * @param[in] duration The duration of the animation in seconds
+ * @param[in] horizontalBias Whether to bias scrolling to left or right.
+ * @param[in] verticalBias Whether to bias scrolling to top or bottom.
+ * @param[in] alpha Alpha function to use
+ */
+ void ScrollTo(const Vector3 &position, float duration, AlphaFunction alpha,
+ DirectionBias horizontalBias, DirectionBias verticalBias);
+
/**
* @brief Scrolls View to page currently based on assumption that each page is
* "(page) * ScrollViewSize.width, 0".