Tizen Native API
Dali::PanGesture Struct Reference

A PanGesture is emitted when the user moves one or more fingers in a particular direction. More...

Inheritance diagram for Dali::PanGesture:
Dali::Gesture

Public Member Functions

 PanGesture ()
 Default Constructor.
 PanGesture (Gesture::State state)
 Constructor.
 PanGesture (const PanGesture &rhs)
 Copy constructor.
PanGestureoperator= (const PanGesture &rhs)
 Assignment operator.
virtual ~PanGesture ()
 Virtual destructor.
float GetSpeed () const
 Returns the speed at which the user is moving their fingers.
float GetDistance () const
 This returns the distance the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the distance moved since the user touched the screen.
float GetScreenSpeed () const
 Returns the speed at which the user is moving their fingers relative to screen coordinates.
float GetScreenDistance () const
 This returns the distance the user has panned (dragged) since the last pan gesture in screen coordinates or, if the gesture has just started, then the distance in screen coordinates moved since the user touched the screen.

Public Attributes

Vector2 velocity
 The velocity at which the user is moving their fingers.
Vector2 displacement
 This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the amount panned since the user touched the screen.
Vector2 position
 This current touch position of the primary touch point in local actor coordinates.
Vector2 screenVelocity
 The velocity at which the user is moving their fingers.
Vector2 screenDisplacement
 This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the amount panned since the user touched the screen.
Vector2 screenPosition
 This current touch position of the primary touch point in screen coordinates.
unsigned int numberOfTouches
 The total number of fingers touching the screen in a pan gesture.

Detailed Description

A PanGesture is emitted when the user moves one or more fingers in a particular direction.

This gesture can be in one of three states, when the pan gesture is first detected: Gesture::Started when the pan gesture is continuing: Gesture::Continuing and finally, when the pan gesture ends: Gesture::Finished.

A pan gesture will end in the following ways:

  • User releases the primary finger (the first touch).
  • User has more fingers on the screen than the maximum specified.
  • User has less fingers on the screen than the minimum specified.
  • Cancelled by the system.

A pan gesture will continue to be sent to the actor under than initial pan until it ends.

Since :
2.4

Constructor & Destructor Documentation

Default Constructor.

Since :
2.4

Constructor.

Since :
2.4
Parameters:
[in]stateThe state of the gesture

Copy constructor.

Since :
2.4
Parameters:
[in]rhsA reference to the copied handle
virtual Dali::PanGesture::~PanGesture ( ) [virtual]

Virtual destructor.

Since :
2.4

Member Function Documentation

This returns the distance the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the distance moved since the user touched the screen.

This is always a positive value.

Since :
2.4
Returns:
The distance, as a float, a user's finger has panned.

This returns the distance the user has panned (dragged) since the last pan gesture in screen coordinates or, if the gesture has just started, then the distance in screen coordinates moved since the user touched the screen.

This is always a positive value.

Since :
2.4
Returns:
The distance, as a float, a user's finger has panned.

Returns the speed at which the user is moving their fingers relative to screen coordinates.

This is the pixel movement per millisecond.

Since :
2.4
Returns:
The speed of the pan (in pixels per millisecond).
float Dali::PanGesture::GetSpeed ( ) const

Returns the speed at which the user is moving their fingers.

This is the pixel movement per millisecond.

Since :
2.4
Returns:
The speed of the pan (in pixels per millisecond).
PanGesture& Dali::PanGesture::operator= ( const PanGesture rhs)

Assignment operator.

Since :
2.4
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this

Member Data Documentation

This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the amount panned since the user touched the screen.

A positive x value shows that the user is panning to the right, a negative x value means the opposite. A positive y value shows that the user is panning downwards, a negative y value means upwards. This value is in local actor coordinates, the actor being the one attached to the PanGestureDetector.

This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or, if the gesture has just started, then the amount panned since the user touched the screen.

A positive x value shows that the user is panning to the right, a negative x value means the opposite. A positive y value shows that the user is panning downwards, a negative y value means upwards. This value is in screen coordinates.

The velocity at which the user is moving their fingers.

This is represented as a Vector2 and is the pixel movement per millisecond. A positive x value shows that the user is panning to the right, a negative x value means the opposite. A positive y value shows that the user is panning downwards, a negative y values means upwards. This value represents the screen coordinates.

The velocity at which the user is moving their fingers.

This is represented as a Vector2 and is the pixel movement per millisecond. A positive x value shows that the user is panning to the right, a negative x value means the opposite. A positive y value shows that the user is panning downwards, a negative y values means upwards. This value represents the local coordinates of the actor attached to the PanGestureDetector.