Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoLongTapGestureRecognizer Class Reference

Long tap gesture recognizer. More...

#include <Inventor/gestures/recognizers/SoLongTapGestureRecognizer.h>

+ Inheritance diagram for SoLongTapGestureRecognizer:

Public Member Functions

 SoLongTapGestureRecognizer ()
 Constructor.
 
virtual ~SoLongTapGestureRecognizer ()
 Destructor.
 
SoEventrecognize (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.
 

Detailed Description

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:

  • In order to get touch events for the gesture recognizer(s) to recognize, the application must explicitly register a touch screen device (SoWinTouchScreen, SoQtTouchScreen, etc).
  • In order to get gesture events, the application must explicitly register gesture recognizers with the touch screen device's touch manager (SoTouchManager).

SEE ALSO

SoGestureRecognizer, SoRotateGestureRecognizer, SoScaleGestureRecognizer, SoDoubleTapGestureRecognizer, SoLongTapGestureEvent

Definition at line 87 of file SoLongTapGestureRecognizer.h.

Constructor & Destructor Documentation

◆ SoLongTapGestureRecognizer()

SoLongTapGestureRecognizer::SoLongTapGestureRecognizer ( )

Constructor.

◆ ~SoLongTapGestureRecognizer()

virtual SoLongTapGestureRecognizer::~SoLongTapGestureRecognizer ( )
virtual

Destructor.

Member Function Documentation

◆ getMinimumLongTapDuration()

SbTime SoLongTapGestureRecognizer::getMinimumLongTapDuration ( void  ) const

Gets the minimum duration of a long tap.

(Default is 1.5 seconds)

◆ getSpatialRestriction()

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).

◆ recognize()

SoEvent * SoLongTapGestureRecognizer::recognize ( SoEvent touchEvent)
virtual

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.

◆ setMinimumLongTapDuration()

void SoLongTapGestureRecognizer::setMinimumLongTapDuration ( SbTime  t)

Sets the minimum duration of a long tap.

(Default is 1.5 seconds)

◆ setSpatialRestriction()

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)


The documentation for this class was generated from the following file: