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

Base structure for different gestures that an application can receive. More...

#include <gesture.h>

Inheritance diagram for Dali::Gesture:
Inheritance graph

Public Types

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...

Public Member Functions

 Gesture (const Gesture &rhs)
 Copy constructor. More...
Gestureoperator= (const Gesture &rhs)
 Assignment operator. More...
virtual ~Gesture ()
 Virtual destructor. More...

Public Attributes

Type type
 The gesture type. More...
State state
 The gesture state. More...
unsigned int time
 The time the gesture took place. More...

Protected Member Functions

 Gesture (Type gestureType, State gestureState)
 This constructor is only used by derived classes. More...

Detailed Description

Base structure for different gestures that an application can receive.

A gesture is an event that is produced from a combination of several touch events in a particular order or within a certain time frame (e.g pinch).

To receive a particular gesture, the application has to create and connect to the appropriate GestureDetector.


An instance of this class cannot be created.
See Also

Definition at line 46 of file gesture.h.

Member Enumeration Documentation

State of the gesture.



There is no state associated with this gesture. .0.


The touched points on the screen have moved enough to be considered a gesture. .0.


The gesture is continuing. .0.


The user has lifted a finger or touched an additional point on the screen. .0.


The gesture has been cancelled. .0.


A gesture is possible. .0.

Definition at line 87 of file gesture.h.

Type of gesture.



When two touch points move away or towards each other. .0.


When the user drags their finger(s) in a particular direction. .0.


When the user taps the screen. .0.


When the user continues to touch the same area on the screen for the device configured time. .0.

Definition at line 75 of file gesture.h.

Constructor & Destructor Documentation

Dali::Gesture::Gesture ( const Gesture rhs)

Copy constructor.


[in]rhsA reference to the copied handle

Definition at line 24 of file gesture.cpp.

Dali::Gesture::~Gesture ( )

Virtual destructor.


Definition at line 40 of file gesture.cpp.

Dali::Gesture::Gesture ( Type  gestureType,
State  gestureState 

This constructor is only used by derived classes.


[in]gestureTypeThe type of gesture event.
[in]gestureStateThe state of the gesture event.

Definition at line 44 of file gesture.cpp.

Member Function Documentation

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

Assignment operator.


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

Definition at line 31 of file gesture.cpp.

References state, time, and type.

Referenced by Dali::TapGesture::operator=(), Dali::LongPressGesture::operator=(), Dali::PinchGesture::operator=(), and Dali::PanGesture::operator=().

Here is the caller graph for this function:

Member Data Documentation

State Dali::Gesture::state
unsigned int Dali::Gesture::time
Type Dali::Gesture::type

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