Tizen Native API
5.5
|
This class emits a signals when a long press gesture occurs that meets the requirements set by the application. More...
Public Types | |
typedef Signal< void(Actor, const LongPressGesture &) > | DetectedSignalType |
Gesture detected signal type. | |
Public Member Functions | |
LongPressGestureDetector () | |
Creates an uninitialized LongPressGestureDetector; this can be initialized with LongPressGestureDetector::New(). | |
~LongPressGestureDetector () | |
Destructor. | |
LongPressGestureDetector (const LongPressGestureDetector &handle) | |
This copy constructor is required for (smart) pointer semantics. | |
LongPressGestureDetector & | operator= (const LongPressGestureDetector &rhs) |
This assignment operator is required for (smart) pointer semantics. | |
void | SetTouchesRequired (uint32_t touches) |
Sets the number of touches required. | |
void | SetTouchesRequired (uint32_t minTouches, uint32_t maxTouches) |
Sets the minimum and maximum touches required. | |
uint32_t | GetMinimumTouchesRequired () const |
Retrieves the minimum number of touches required. | |
uint32_t | GetMaximumTouchesRequired () const |
Retrieves the maximum number of touches required. | |
DetectedSignalType & | DetectedSignal () |
This signal is emitted when the specified long press is detected on the attached actor. | |
Static Public Member Functions | |
static LongPressGestureDetector | New () |
Creates an initialized LongPressGestureDetector. | |
static LongPressGestureDetector | New (uint32_t touchesRequired) |
Creates an initialized LongPressGestureDetector with the number of touches required. | |
static LongPressGestureDetector | New (uint32_t minTouches, uint32_t maxTouches) |
Creates an initialized LongPressGestureDetector with the minimum and maximum number of touches required. | |
static LongPressGestureDetector | DownCast (BaseHandle handle) |
Downcasts a handle to LongPressGestureDetector handle. |
This class emits a signals when a long press gesture occurs that meets the requirements set by the application.
For any valid long press, two signals will be emitted:
The application programmer can use this gesture detector as follows:
LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(myActor); detector.DetectedSignal().Connect(this, &MyApplication::OnLongPress);
Signals | Signal Name | Method | |-------------------|-----------------------| | longPressDetected | DetectedSignal() |
typedef Signal< void ( Actor, const LongPressGesture& ) > Dali::LongPressGestureDetector::DetectedSignalType |
Gesture detected signal type.
Creates an uninitialized LongPressGestureDetector; this can be initialized with LongPressGestureDetector::New().
Calling member functions with an uninitialized LongPressGestureDetector handle is not allowed.
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
This copy constructor is required for (smart) pointer semantics.
[in] | handle | A reference to the copied handle |
This signal is emitted when the specified long press is detected on the attached actor.
A callback of the following type may be connected:
void YourCallbackName( Actor actor, const LongPressGesture& gesture );
static LongPressGestureDetector Dali::LongPressGestureDetector::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to LongPressGestureDetector handle.
If handle points to a LongPressGestureDetector object, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::GestureDetector.
uint32_t Dali::LongPressGestureDetector::GetMaximumTouchesRequired | ( | ) | const |
Retrieves the maximum number of touches required.
uint32_t Dali::LongPressGestureDetector::GetMinimumTouchesRequired | ( | ) | const |
Retrieves the minimum number of touches required.
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | ) | [static] |
Creates an initialized LongPressGestureDetector.
By default, this would create a gesture detector that requires only one touch.
Reimplemented from Dali::Handle.
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | uint32_t | touchesRequired | ) | [static] |
Creates an initialized LongPressGestureDetector with the number of touches required.
A long press gesture will be emitted from this detector if the number of fingers touching the screen is equal to the touches required.
[in] | touchesRequired | The number of touches required |
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | uint32_t | minTouches, |
uint32_t | maxTouches | ||
) | [static] |
Creates an initialized LongPressGestureDetector with the minimum and maximum number of touches required.
A long press gesture will be emitted from this detector if the number of fingers touching the screen falls between the minimum and maximum touches set.
[in] | minTouches | The minimum number of touches required |
[in] | maxTouches | The maximum number of touches required |
LongPressGestureDetector& Dali::LongPressGestureDetector::operator= | ( | const LongPressGestureDetector & | rhs | ) |
This assignment operator is required for (smart) pointer semantics.
[in] | rhs | A reference to the copied handle |
void Dali::LongPressGestureDetector::SetTouchesRequired | ( | uint32_t | touches | ) |
Sets the number of touches required.
The number of touches corresponds to the number of fingers a user has on the screen. This sets the minimum and maximum touches to the input parameter.
[in] | touches | Touches required |
void Dali::LongPressGestureDetector::SetTouchesRequired | ( | uint32_t | minTouches, |
uint32_t | maxTouches | ||
) |
Sets the minimum and maximum touches required.
The number of touches corresponds to the number of fingers a user has on the screen.
[in] | minTouches | Minimum Touches required |
[in] | maxTouches | Maximum Touches required |