Tizen Native API  4.0
Dali::GestureDetector Class Reference

GestureDetectors analyse a stream of touch events and attempt to determine the intention of the user. More...

Inheritance diagram for Dali::GestureDetector:
Dali::Handle Dali::BaseHandle Dali::LongPressGestureDetector Dali::PanGestureDetector Dali::PinchGestureDetector Dali::TapGestureDetector

Public Member Functions

 GestureDetector ()
 Creates an uninitialized GestureDetector.
 ~GestureDetector ()
 Dali::GestureDetector is intended as a base class.
 GestureDetector (const GestureDetector &handle)
 This copy constructor is required for (smart) pointer semantics.
GestureDetectoroperator= (const GestureDetector &rhs)
 This assignment operator is required for (smart) pointer semantics.
void Attach (Actor actor)
 Attaches an actor to the gesture.
void Detach (Actor actor)
 Detaches the attached actor from the gesture detector.
void DetachAll ()
 Detaches all the actors that have been attached to the gesture detector.
size_t GetAttachedActorCount () const
 Returns the number of actors attached to the gesture detector.
Actor GetAttachedActor (size_t index) const
 Returns an actor by index. An empty handle if the index is not valid.

Static Public Member Functions

static GestureDetector DownCast (BaseHandle handle)
 Downcasts a handle to GestureDetector handle.

Detailed Description

GestureDetectors analyse a stream of touch events and attempt to determine the intention of the user.

An actor is attached to a gesture detector and if the detector recognises a pattern in its analysis, it will emit a detected signal to the application.

This is the base class for different gesture detectors available and provides functionality that is common to all the gesture detectors.

Since:
3.0, DALi version 1.0.0
See also:
Gesture

Constructor & Destructor Documentation

Creates an uninitialized GestureDetector.

This can be initialized with one of the derived gesture detectors' New() methods. For example, PanGestureDetector::New().

Calling member functions with an uninitialized Dali::GestureDetector handle is not allowed.

Since:
3.0, DALi version 1.0.0

Dali::GestureDetector is intended as a base class.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since:
3.0, DALi version 1.0.0

This copy constructor is required for (smart) pointer semantics.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

Attaches an actor to the gesture.

The detected signal will be dispatched when the gesture occurs on the attached actor.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]actorThe actor to attach to the gesture detector
Precondition:
The gesture detector has been initialized.
Note:
You can attach several actors to a gesture detector.

Detaches the attached actor from the gesture detector.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]actorThe actor to detach from the gesture detector
Precondition:
The gesture detector has been initialized.
The specified actor has been attached to the gesture detector.

Detaches all the actors that have been attached to the gesture detector.

Since:
3.0, DALi version 1.0.0
Precondition:
The gesture detector has been initialized.
At least one actor has been attached to the gesture detector.

Downcasts a handle to GestureDetector handle.

If handle points to a GestureDetector object, the downcast produces valid handle. If not, the returned handle is left uninitialized.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]handleHandle to an object
Returns:
Handle to a GestureDetector object or an uninitialized handle

Reimplemented from Dali::Handle.

Reimplemented in Dali::PanGestureDetector, Dali::LongPressGestureDetector, Dali::TapGestureDetector, and Dali::PinchGestureDetector.

Returns an actor by index. An empty handle if the index is not valid.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]indexThe attached actor's index
Returns:
The attached actor or an empty handle
Precondition:
The gesture detector has been initialized.

Returns the number of actors attached to the gesture detector.

Since:
3.0, DALi version 1.0.0
Returns:
The count
Precondition:
The gesture detector has been initialized.
GestureDetector& Dali::GestureDetector::operator= ( const GestureDetector rhs)

This assignment operator is required for (smart) pointer semantics.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this