*
*/
-#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
+// CLASS HEADER
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
using namespace Dali;
// spacing must be present.
if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
{
+ if( wrap )
+ {
+ position = WrapInDomain(position, mDomain.min, mDomain.max);
+ }
page = floor((position - mDomain.min) / mSpacing + 0.5f);
if(wrap)
const std::string ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME( "scroll-overshoot-x" );
const std::string ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME( "scroll-overshoot-y" );
const std::string ScrollView::SCROLL_FINAL_PROPERTY_NAME( "scroll-final" );
-const std::string ScrollView::SCROLL_X_PROPERTY_NAME( "scroll-x" );
-const std::string ScrollView::SCROLL_Y_PROPERTY_NAME( "scroll-y" );
const std::string ScrollView::SCROLL_SCALE_PROPERTY_NAME( "scroll-scale" );
const std::string ScrollView::SCROLL_WRAP_PROPERTY_NAME( "scroll-wrap" );
const std::string ScrollView::SCROLL_PANNING_PROPERTY_NAME( "scroll-panning" );
GetImpl(*this).SetRulerY(ruler);
}
-void ScrollView::SetRulerScaleX(RulerPtr ruler)
-{
- GetImpl(*this).SetRulerScaleX(ruler);
-}
-
-void ScrollView::SetRulerScaleY(RulerPtr ruler)
-{
- GetImpl(*this).SetRulerScaleY(ruler);
-}
-
void ScrollView::SetScrollSensitive(bool sensitive)
{
GetImpl(*this).SetScrollSensitive(sensitive);
GetImpl(*this).SetWrapMode(enable);
}
-int ScrollView::GetRefreshInterval() const
+int ScrollView::GetScrollUpdateDistance() const
{
- return GetImpl(*this).GetRefreshInterval();
+ return GetImpl(*this).GetScrollUpdateDistance();
}
-void ScrollView::SetRefreshInterval(int milliseconds)
+void ScrollView::SetScrollUpdateDistance(int distance)
{
- GetImpl(*this).SetRefreshInterval(milliseconds);
+ GetImpl(*this).SetScrollUpdateDistance(distance);
}
bool ScrollView::GetAxisAutoLock() const
GetImpl(*this).SetFlickSpeedCoefficient(speed);
}
+Vector2 ScrollView::GetMinimumDistanceForFlick() const
+{
+ return GetImpl(*this).GetMinimumDistanceForFlick();
+}
+
+void ScrollView::SetMinimumDistanceForFlick( const Vector2& distance )
+{
+ GetImpl(*this).SetMinimumDistanceForFlick(distance);
+}
+
+float ScrollView::GetMinimumSpeedForFlick() const
+{
+ return GetImpl(*this).GetMinimumSpeedForFlick();
+}
+
+void ScrollView::SetMinimumSpeedForFlick( float speed )
+{
+ GetImpl(*this).SetMinimumSpeedForFlick(speed);
+}
+
float ScrollView::GetMaxFlickSpeed() const
{
return GetImpl(*this).GetMaxFlickSpeed();
GetImpl(*this).SetScrollPosition(position);
}
-Vector3 ScrollView::GetCurrentScrollScale() const
-{
- return GetImpl(*this).GetCurrentScrollScale();
-}
-
unsigned int ScrollView::GetCurrentPage() const
{
return GetImpl(*this).GetCurrentPage();
}
-void ScrollView::TransformTo(const Vector3& position, const Vector3& scale, float rotation)
-{
- GetImpl(*this).TransformTo(position, scale, rotation);
-}
-
-void ScrollView::TransformTo(const Vector3& position, const Vector3& scale, float rotation, float duration)
-{
- GetImpl(*this).TransformTo(position, scale, rotation, duration);
-}
-
void ScrollView::ScrollTo(const Vector3 &position)
{
GetImpl(*this).ScrollTo(position);
return GetImpl(*this).ScrollToSnapPoint();
}
-void ScrollView::ScaleTo(const Vector3 &scale)
-{
- GetImpl(*this).ScaleTo(scale);
-}
-
-void ScrollView::ScaleTo(const Vector3 &scale, float duration)
-{
- GetImpl(*this).ScaleTo(scale, duration);
-}
-
void ScrollView::ApplyConstraintToChildren(Constraint constraint)
{
GetImpl(*this).ApplyConstraintToChildren(constraint);