Long tap gesture recognizer. More...
#include <Inventor/gestures/recognizers/SoLongTapGestureRecognizer.h>
Public Member Functions | |
SoLongTapGestureRecognizer () | |
Constructor. | |
virtual | ~SoLongTapGestureRecognizer () |
Destructor. | |
SoEvent * | recognize (SoEvent *touchEvent) |
Analyses touch events and returns an SoLongTapGestureEvent if the gesture is recognized, else returns null. | |
SbTime | getMinimumLongTapDuration (void) const |
Gets the minimum duration of a long tap. | |
int | getSpatialRestriction (void) const |
Gets the radius of the limitation circle in which the finger has to stay throughout the gesture. | |
void | setMinimumLongTapDuration (SbTime t) |
Sets the minimum duration of a long tap. | |
void | setSpatialRestriction (int c) |
Sets the radius of the limitation circle in which the finger has to stay throughout the gesture. | |
Long tap gesture recognizer.
SoLongTapGestureRecognizer analyses touch events and recognizes a one finger long-tap (touch-and-hold) gesture. It returns an SoLongTapGestureEvent with the long tap duration if this gesture is recognized. The finger has to stay in a limitation area from the down event to the up event and must stay down for a minimum period of time. This recognizer only generates an END event.
Note:
SoGestureRecognizer, SoRotateGestureRecognizer, SoScaleGestureRecognizer, SoDoubleTapGestureRecognizer, SoLongTapGestureEvent
Definition at line 87 of file SoLongTapGestureRecognizer.h.
SoLongTapGestureRecognizer::SoLongTapGestureRecognizer | ( | ) |
Constructor.
|
virtual |
Destructor.
SbTime SoLongTapGestureRecognizer::getMinimumLongTapDuration | ( | void | ) | const |
Gets the minimum duration of a long tap.
(Default is 1.5 seconds)
int SoLongTapGestureRecognizer::getSpatialRestriction | ( | void | ) | const |
Gets the radius of the limitation circle in which the finger has to stay throughout the gesture.
(Default is 60 pixels).
Analyses touch events and returns an SoLongTapGestureEvent if the gesture is recognized, else returns null.
Event includes the duration of the long tap. Returns a pointer to an internal data object. Do not modify or delete this object.
Implements SoGestureRecognizer.
void SoLongTapGestureRecognizer::setMinimumLongTapDuration | ( | SbTime | t | ) |
Sets the minimum duration of a long tap.
(Default is 1.5 seconds)
void SoLongTapGestureRecognizer::setSpatialRestriction | ( | int | c | ) |
Sets the radius of the limitation circle in which the finger has to stay throughout the gesture.
(Default is 60 pixels)