#include <dali/public-api/animation/constraints.h>
#include <dali/devel-api/common/stage.h>
#include <dali/public-api/events/wheel-event.h>
-#include <dali/public-api/events/touch-data.h>
+#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/property-map.h>
return false;
}
-bool ScrollView::OnTouch( Actor actor, const TouchData& touch )
+bool ScrollView::OnTouch( Actor actor, const TouchEvent& touch )
{
if(!mSensitive)
{
if(mRulerX->GetType() == Ruler::Free)
{
// Free panning mode
- targetScrollPosition.x += event.z * mWheelScrollDistanceStep.x;
+ targetScrollPosition.x += event.GetDelta() * mWheelScrollDistanceStep.x;
ClampPosition(targetScrollPosition);
ScrollTo(-targetScrollPosition);
}
else if(!mScrolling)
{
// Snap mode, only respond to the event when the previous snap animation is finished.
- ScrollTo(GetCurrentPage() - event.z);
+ ScrollTo(GetCurrentPage() - event.GetDelta());
}
}
else
if(mRulerY->GetType() == Ruler::Free)
{
// Free panning mode
- targetScrollPosition.y += event.z * mWheelScrollDistanceStep.y;
+ targetScrollPosition.y += event.GetDelta() * mWheelScrollDistanceStep.y;
ClampPosition(targetScrollPosition);
ScrollTo(-targetScrollPosition);
}
else if(!mScrolling)
{
// Snap mode, only respond to the event when the previous snap animation is finished.
- ScrollTo(GetCurrentPage() - event.z * mRulerX->GetTotalPages());
+ ScrollTo(GetCurrentPage() - event.GetDelta() * mRulerX->GetTotalPages());
}
}