Tizen Native API  6.0
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 ()
 Creates 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 (uint32_t minimumTaps)
 Sets the minimum number of taps required.
void SetMaximumTapsRequired (uint32_t maximumTaps)
 Sets the maximum number of taps required.
uint32_t GetMinimumTapsRequired () const
 Retrieves the minimum number of taps required.
uint32_t 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 ()
 Creates an initialized TapGestureDetector.
static TapGestureDetector New (uint32_t tapsRequired)
 Creates an initialized TapGestureDetector with the specified parameters.
static TapGestureDetector DownCast (BaseHandle handle)
 Downcasts 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::SetMinimumTapsRequired See TapGestureDetector::SetMaximumTapsRequired

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:
3.0, DALi version 1.0.0
Note:
Multi-touch taps (two or more points of contact with the surface) are not currently supported. However, multiple taps (double & triple tap etc.) are supported.

Signals | Signal Name | Method | |--------------|-----------------------| | tapDetected | DetectedSignal() |

See also:
TapGesture

Member Typedef Documentation

Signal type for detected signal.

Since:
3.0, DALi version 1.0.0

Constructor & Destructor Documentation

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

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

Since:
3.0, DALi version 1.0.0

Destructor.

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

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:
3.0, DALi version 1.0.0
Returns:
The signal to connect to
Precondition:
The gesture detector has been initialized.

Downcasts 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:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
Returns:
The maximum taps required
Precondition:
The gesture detector has been initialized.

Retrieves the minimum number of taps required.

Since:
3.0, DALi version 1.0.0
Returns:
The minimum taps required
Precondition:
The gesture detector has been initialized.

Creates an initialized TapGestureDetector.

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

Since:
3.0, DALi version 1.0.0
Returns:
A handle to a newly allocated Dali resource

Reimplemented from Dali::Handle.

static TapGestureDetector Dali::TapGestureDetector::New ( uint32_t  tapsRequired) [static]

Creates an initialized TapGestureDetector with the specified parameters.

Since:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this
void Dali::TapGestureDetector::SetMaximumTapsRequired ( uint32_t  maximumTaps)

Sets the maximum number of taps required.

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

Since:
3.0, DALi version 1.0.0
Parameters:
[in]maximumTapsThe maximum taps required
Precondition:
The gesture detector has been initialized.
Note:
The default is '1', the maximum is 2.
void Dali::TapGestureDetector::SetMinimumTapsRequired ( uint32_t  minimumTaps)

Sets the minimum number of taps required.

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

Since:
3.0, DALi version 1.0.0
Parameters:
[in]minimumTapsThe minimum taps required
Precondition:
The gesture detector has been initialized.
Note:
The default is '1', the maximum is 2.