Tizen Native API
Dali::TapGestureDetector Class Reference

This class emits a signal when a tap gesture occurs that meets the requirements set by the application. More...

Inheritance diagram for Dali::TapGestureDetector:
Dali::GestureDetector Dali::Handle Dali::BaseHandle

Public Types

typedef Signal< void(Actor,
const TapGesture &) > 
DetectedSignalType
 Signal type for detected signal.

Public Member Functions

 TapGestureDetector ()
 Create an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New().
 ~TapGestureDetector ()
 Destructor.
 TapGestureDetector (const TapGestureDetector &handle)
 This copy constructor is required for (smart) pointer semantics.
TapGestureDetectoroperator= (const TapGestureDetector &rhs)
 This assignment operator is required for (smart) pointer semantics.
void SetMinimumTapsRequired (unsigned int minimumTaps)
 Set the minimum number of taps required.
void SetMaximumTapsRequired (unsigned int maximumTaps)
 Set the maximum number of taps required.
unsigned int GetMinimumTapsRequired () const
 Retrieves the minimum number of taps required.
unsigned int GetMaximumTapsRequired () const
 Retrieves the maximum number of taps required.
DetectedSignalTypeDetectedSignal ()
 This signal is emitted when the specified tap is detected on the attached actor.

Static Public Member Functions

static TapGestureDetector New ()
 Create an initialized TapGestureDetector.
static TapGestureDetector New (unsigned int tapsRequired)
 Create an initialized TapGestureDetector with the specified parameters.
static TapGestureDetector DownCast (BaseHandle handle)
 Downcast a handle to TapGestureDetector handle.

Detailed Description

This class emits a signal when a tap gesture occurs that meets the requirements set by the application.

See TapGestureDetector::SetTapsRequired

A TapGesture is a discrete gesture, which means it does not have any state information attached to it. Please see TapGesture for more information.

The application programmer can use this gesture detector as follows:

 TapGestureDetector detector = TapGestureDetector::New();
 detector.Attach(myActor);
 detector.DetectedSignal().Connect(this, &MyApplication::OnTap);
Since :
2.4
Note:
Multi-touch taps are not currently supported. However, multiple taps (double & triple tap etc.) are supported.
See also:
TapGesture

Member Typedef Documentation

Signal type for detected signal.

Since :
2.4

Constructor & Destructor Documentation

Create an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New().

Calling member functions with an uninitialized TapGestureDetector handle is not allowed.

Since :
2.4

Destructor.

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

Since :
2.4

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

Since :
2.4
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

This signal is emitted when the specified tap is detected on the attached actor.

A callback of the following type may be connected:

   void YourCallbackName( Actor actor, const TapGesture& gesture );
Since :
2.4
Returns:
The signal to connect to.
Precondition:
The gesture detector has been initialized.

Downcast a handle to TapGestureDetector handle.

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

Since :
2.4
Parameters:
[in]handleHandle to an object
Returns:
Handle to a TapGestureDetector object or an uninitialized handle

Reimplemented from Dali::GestureDetector.

Retrieves the maximum number of taps required.

Since :
2.4
Returns:
The maximum taps required.
Precondition:
The gesture detector has been initialized.

Retrieves the minimum number of taps required.

Since :
2.4
Returns:
The minimum taps required.
Precondition:
The gesture detector has been initialized.

Create an initialized TapGestureDetector.

By default, this would create a gesture detector which requires one tap with one touch.

Since :
2.4
Returns:
A handle to a newly allocated Dali resource.

Reimplemented from Dali::Handle.

static TapGestureDetector Dali::TapGestureDetector::New ( unsigned int  tapsRequired) [static]

Create an initialized TapGestureDetector with the specified parameters.

Since :
2.4
Parameters:
[in]tapsRequiredThe minimum & maximum number of taps required.
Returns:
A handle to a newly allocated Dali resource.
TapGestureDetector& Dali::TapGestureDetector::operator= ( const TapGestureDetector rhs)

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

Since :
2.4
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this
void Dali::TapGestureDetector::SetMaximumTapsRequired ( unsigned int  maximumTaps)

Set the maximum number of taps required.

The tap count is the number of times a user should "tap" the screen.

Since :
2.4
Parameters:
[in]maximumTapsThe maximum taps required.
Precondition:
The gesture detector has been initialized.
Note:
The default is '1'.
void Dali::TapGestureDetector::SetMinimumTapsRequired ( unsigned int  minimumTaps)

Set the minimum number of taps required.

The tap count is the number of times a user should "tap" the screen.

Since :
2.4
Parameters:
[in]minimumTapsThe minimum taps required.
Precondition:
The gesture detector has been initialized.
Note:
The default is '1'.