Tizen Native API
4.0
|
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 (unsigned int touches) |
Sets the number of touches required. | |
void | SetTouchesRequired (unsigned int minTouches, unsigned int maxTouches) |
Sets the minimum and maximum touches required. | |
unsigned int | GetMinimumTouchesRequired () const |
Retrieves the minimum number of touches required. | |
unsigned int | 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 (unsigned int touchesRequired) |
Creates an initialized LongPressGestureDetector with the number of touches required. | |
static LongPressGestureDetector | New (unsigned int minTouches, unsigned int 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. |
Detailed Description
This class emits a signals when a long press gesture occurs that meets the requirements set by the application.
- Since:
- 3.0, DALi version 1.0.0
For any valid long press, two signals will be emitted:
- First identifying the beginning (state = Started) i.e. when fingers held down for the required time.
- Second identifying the ending (state = Finished) i.e. when fingers are released.
The application programmer can use this gesture detector as follows:
LongPressGestureDetector detector = LongPressGestureDetector::New(); detector.Attach(myActor); detector.DetectedSignal().Connect(this, &MyApplication::OnLongPress);
- See also:
- LongPressGesture
Signals | Signal Name | Method | |-------------------|-----------------------| | longPressDetected | DetectedSignal() |
Member Typedef Documentation
typedef Signal< void ( Actor, const LongPressGesture& ) > Dali::LongPressGestureDetector::DetectedSignalType |
Gesture detected signal type.
- Since:
- 3.0, DALi version 1.0.0
Constructor & Destructor Documentation
Creates an uninitialized LongPressGestureDetector; this can be initialized with LongPressGestureDetector::New().
Calling member functions with an uninitialized LongPressGestureDetector 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] handle A reference to the copied handle
Member Function Documentation
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 );
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The signal to connect to
- Precondition:
- The gesture detector has been initialized.
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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] handle Handle to an object
- Returns:
- Handle to a LongPressGestureDetector object or an uninitialized handle
Reimplemented from Dali::GestureDetector.
unsigned int Dali::LongPressGestureDetector::GetMaximumTouchesRequired | ( | ) | const |
Retrieves the maximum number of touches required.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The maximum number of touches required
- Precondition:
- The gesture detector has been initialized.
unsigned int Dali::LongPressGestureDetector::GetMinimumTouchesRequired | ( | ) | const |
Retrieves the minimum number of touches required.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The minimum number of touches required
- Precondition:
- The gesture detector has been initialized.
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | ) | [static] |
Creates an initialized LongPressGestureDetector.
By default, this would create a gesture detector that requires only one touch.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- A handle to a newly allocated Dali resource
Reimplemented from Dali::Handle.
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | unsigned int | 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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] touchesRequired The number of touches required
- Returns:
- A handle to a newly allocated Dali resource
static LongPressGestureDetector Dali::LongPressGestureDetector::New | ( | unsigned int | minTouches, |
unsigned int | 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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] minTouches The minimum number of touches required [in] maxTouches The maximum number of touches required
- Returns:
- A handle to a newly allocated Dali resource
LongPressGestureDetector& Dali::LongPressGestureDetector::operator= | ( | const LongPressGestureDetector & | rhs | ) |
This assignment operator is required for (smart) pointer semantics.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] rhs A reference to the copied handle
- Returns:
- A reference to this
void Dali::LongPressGestureDetector::SetTouchesRequired | ( | unsigned int | 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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] touches Touches required
- Precondition:
- The gesture detector has been initialized.
- Note:
- The default is '1'.
void Dali::LongPressGestureDetector::SetTouchesRequired | ( | unsigned int | minTouches, |
unsigned int | maxTouches | ||
) |
Sets the minimum and maximum touches required.
The number of touches corresponds to the number of fingers a user has on the screen.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] minTouches Minimum Touches required [in] maxTouches Maximum Touches required
- Precondition:
- The gesture detector has been initialized.
- Note:
- The default is '1'.