Long tap gesture recognizer. More...
#include <Inventor/gestures/recognizers/SoLongTapGestureRecognizer.h>
Public Member Functions | |
SoLongTapGestureRecognizer () | |
virtual | ~SoLongTapGestureRecognizer () |
SoEvent * | recognize (SoEvent *touchEvent) |
SbTime | getMinimumLongTapDuration (void) const |
int | getSpatialRestriction (void) const |
void | setMinimumLongTapDuration (SbTime t) |
void | setSpatialRestriction (int c) |
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
SoLongTapGestureRecognizer::SoLongTapGestureRecognizer | ( | ) |
Constructor.
virtual SoLongTapGestureRecognizer::~SoLongTapGestureRecognizer | ( | ) | [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)