Dali 3D User Interface Engine
List of all members | Public Member Functions | Public Attributes
Dali::PanGesture Struct Reference

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

#include <pan-gesture.h>

Inheritance diagram for Dali::PanGesture:
Inheritance graph
[legend]
Collaboration diagram for Dali::PanGesture:
Collaboration graph
[legend]

Public Member Functions

 PanGesture ()
 Default Constructor. More...
 
 PanGesture (Gesture::State state)
 Constructor. More...
 
 PanGesture (const PanGesture &rhs)
 Copy constructor. More...
 
PanGestureoperator= (const PanGesture &rhs)
 Assignment operator. More...
 
virtual ~PanGesture ()
 Virtual destructor. More...
 
float GetSpeed () const
 Returns the speed at which the user is moving their fingers. More...
 
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. More...
 
float GetScreenSpeed () const
 Returns the speed at which the user is moving their fingers relative to screen coordinates. More...
 
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. More...
 
- Public Member Functions inherited from Dali::Gesture
 Gesture (const Gesture &rhs)
 Copy constructor. More...
 
Gestureoperator= (const Gesture &rhs)
 Assignment operator. More...
 
virtual ~Gesture ()
 Virtual destructor. More...
 

Public Attributes

Vector2 velocity
 The velocity at which the user is moving their fingers. More...
 
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. More...
 
Vector2 position
 This current touch position of the primary touch point in local actor coordinates. More...
 
Vector2 screenVelocity
 The velocity at which the user is moving their fingers. More...
 
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. More...
 
Vector2 screenPosition
 This current touch position of the primary touch point in screen coordinates. More...
 
unsigned int numberOfTouches
 The total number of fingers touching the screen in a pan gesture. More...
 
- Public Attributes inherited from Dali::Gesture
Type type
 The gesture type. More...
 
State state
 The gesture state. More...
 
unsigned int time
 The time the gesture took place. More...
 

Additional Inherited Members

- Public Types inherited from Dali::Gesture
enum  Type { Pinch = 1 << 0, Pan = 1 << 1, Tap = 1 << 2, LongPress = 1 << 3 }
 Type of gesture. More...
 
enum  State {
  Clear, Started, Continuing, Finished,
  Cancelled, Possible
}
 State of the gesture. More...
 
- Protected Member Functions inherited from Dali::Gesture
 Gesture (Type gestureType, State gestureState)
 This constructor is only used by derived classes. More...
 

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:

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

Definition at line 48 of file pan-gesture.h.

Constructor & Destructor Documentation

Dali::PanGesture::PanGesture ( )

Default Constructor.

.0

Definition at line 27 of file pan-gesture.cpp.

Dali::PanGesture::PanGesture ( Gesture::State  state)

Constructor.

.0

Parameters
[in]stateThe state of the gesture

Definition at line 33 of file pan-gesture.cpp.

Dali::PanGesture::PanGesture ( const PanGesture rhs)

Copy constructor.

.0

Parameters
[in]rhsA reference to the copied handle

Definition at line 39 of file pan-gesture.cpp.

Dali::PanGesture::~PanGesture ( )
virtual

Virtual destructor.

.0

Definition at line 65 of file pan-gesture.cpp.

Member Function Documentation

float Dali::PanGesture::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.

This is always a positive value. .0

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

Definition at line 74 of file pan-gesture.cpp.

References displacement, and Dali::Vector2::Length().

Referenced by UtcDaliPanGestureGetDistance().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::PanGesture::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.

This is always a positive value. .0

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

Definition at line 84 of file pan-gesture.cpp.

References Dali::Vector2::Length(), and screenDisplacement.

Referenced by UtcDaliPanGestureGetScreenDistance().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::PanGesture::GetScreenSpeed ( ) const

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

This is the pixel movement per millisecond. .0

Returns
The speed of the pan (in pixels per millisecond).

Definition at line 79 of file pan-gesture.cpp.

References Dali::Vector2::Length(), and screenVelocity.

Referenced by UtcDaliPanGestureGetScreenSpeed().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::PanGesture::GetSpeed ( ) const

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

This is the pixel movement per millisecond. .0

Returns
The speed of the pan (in pixels per millisecond).

Definition at line 69 of file pan-gesture.cpp.

References Dali::Vector2::Length(), and velocity.

Referenced by Dali::Toolkit::Internal::PageTurnView::OnPan(), Dali::Toolkit::Internal::ItemView::OnPan(), and UtcDaliPanGestureGetSpeed().

Here is the call graph for this function:

Here is the caller graph for this function:

PanGesture & Dali::PanGesture::operator= ( const PanGesture rhs)

Assignment operator.

.0

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

Definition at line 51 of file pan-gesture.cpp.

References displacement, numberOfTouches, Dali::Gesture::operator=(), position, screenDisplacement, screenPosition, screenVelocity, and velocity.

Here is the call graph for this function:

Member Data Documentation

Vector2 Dali::PanGesture::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.

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.

Definition at line 108 of file pan-gesture.h.

Referenced by Dali::Toolkit::Text::Decorator::Impl::DoPan(), Dali::Internal::PanGestureProcessor::EmitPanSignal(), anonymous_namespace{utc-Dali-PanGestureDetector.cpp}::GeneratePan(), GetDistance(), Dali::Toolkit::Internal::AccessibilityManager::HandlePanGesture(), Dali::Toolkit::Internal::TextEditor::OnPan(), Dali::Toolkit::Internal::TextField::OnPan(), Dali::Toolkit::Internal::ScrollBar::OnPan(), Dali::Toolkit::Internal::ItemView::OnPan(), Dali::Toolkit::Internal::ScrollView::OnPan(), operator=(), Dali::Internal::SceneGraph::PanGesture::PanInfo::operator=(), and UtcDaliPanGestureGetDistance().

unsigned int Dali::PanGesture::numberOfTouches
Vector2 Dali::PanGesture::position
Vector2 Dali::PanGesture::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.

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.

Definition at line 133 of file pan-gesture.h.

Referenced by Dali::Internal::PanGestureProcessor::EmitPanSignal(), anonymous_namespace{utc-Dali-PanGestureDetector.cpp}::GeneratePan(), GetScreenDistance(), Dali::Toolkit::Internal::AccessibilityManager::HandlePanGesture(), Dali::Toolkit::Internal::ScrollView::OnPan(), operator=(), Dali::Internal::SceneGraph::PanGesture::PanInfo::operator=(), and UtcDaliPanGestureGetScreenDistance().

Vector2 Dali::PanGesture::screenPosition
Vector2 Dali::PanGesture::screenVelocity

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.

Definition at line 123 of file pan-gesture.h.

Referenced by Dali::Internal::PanGestureProcessor::EmitPanSignal(), anonymous_namespace{utc-Dali-PanGestureDetector.cpp}::GeneratePan(), GetScreenSpeed(), Dali::Toolkit::Internal::AccessibilityManager::HandlePanGesture(), operator=(), Dali::Internal::SceneGraph::PanGesture::PanInfo::operator=(), and UtcDaliPanGestureGetScreenSpeed().

Vector2 Dali::PanGesture::velocity

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.

Definition at line 97 of file pan-gesture.h.

Referenced by Dali::Internal::PanGestureProcessor::EmitPanSignal(), anonymous_namespace{utc-Dali-PanGestureDetector.cpp}::GeneratePan(), GetSpeed(), Dali::Toolkit::Internal::AccessibilityManager::HandlePanGesture(), Dali::Toolkit::Internal::ScrollView::OnPan(), operator=(), Dali::Internal::SceneGraph::PanGesture::PanInfo::operator=(), and UtcDaliPanGestureGetSpeed().


The documentation for this struct was generated from the following files:
Dali Docs Home
Read more about Dali