#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/property-map.h>
#include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/devel-api/events/pan-gesture-devel.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
// while the scroll view is panning, the state needs to be reset.
if ( mPanning )
{
- PanGesture cancelGesture( Gesture::Cancelled );
+ PanGesture cancelGesture = DevelPanGesture::New( Gesture::Cancelled );
OnPan( cancelGesture );
}
}
// translate Gesture input to get useful data...
- switch(gesture.state)
+ switch(gesture.GetState())
{
case Gesture::Started:
{
DALI_LOG_SCROLL_STATE("[0x%X] Pan Started", this);
- mPanStartPosition = gesture.position - gesture.displacement;
+ const Vector2& position = gesture.GetPosition();
+ mPanStartPosition = position - gesture.GetDisplacement();
UpdateLocalScrollProperties();
GestureStarted();
mPanning = true;
self.SetProperty( Toolkit::ScrollView::Property::PANNING, true );
- self.SetProperty( Toolkit::ScrollView::Property::START_PAGE_POSITION, Vector3(gesture.position.x, gesture.position.y, 0.0f) );
+ self.SetProperty( Toolkit::ScrollView::Property::START_PAGE_POSITION, Vector3(position.x, position.y, 0.0f) );
UpdateMainInternalConstraint();
Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
if ( mPanning )
{
DALI_LOG_SCROLL_STATE("[0x%X] Pan Continuing", this);
- GestureContinuing(gesture.screenDisplacement);
+ GestureContinuing(gesture.GetScreenDisplacement());
}
else
{
{
if ( mPanning )
{
- DALI_LOG_SCROLL_STATE("[0x%X] Pan %s", this, ( ( gesture.state == Gesture::Finished ) ? "Finished" : "Cancelled" ) );
+ DALI_LOG_SCROLL_STATE("[0x%X] Pan %s", this, ( ( gesture.GetState() == Gesture::Finished ) ? "Finished" : "Cancelled" ) );
UpdateLocalScrollProperties();
- mLastVelocity = gesture.velocity;
+ mLastVelocity = gesture.GetVelocity();
mPanning = false;
self.SetProperty( Toolkit::ScrollView::Property::PANNING, false );
} // end switch(gesture.state)
- OnGestureEx(gesture.state);
+ OnGestureEx(gesture.GetState());
}
void ScrollView::OnGestureEx(Gesture::State state)