SoLongTapGestureRecognizer Class Reference

Long tap gesture recognizer. More...

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

Inheritance diagram for SoLongTapGestureRecognizer:
SoGestureRecognizer

List of all members.

Public Member Functions

 SoLongTapGestureRecognizer ()
virtual ~SoLongTapGestureRecognizer ()
SoEventrecognize (SoEvent *touchEvent)
SbTime getMinimumLongTapDuration (void) const
int getSpatialRestriction (void) const
void setMinimumLongTapDuration (SbTime t)
void setSpatialRestriction (int c)

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:

SEE ALSO

SoGestureRecognizer, SoRotateGestureRecognizer, SoScaleGestureRecognizer, SoDoubleTapGestureRecognizer, SoLongTapGestureEvent

See related examples:

QtTouchEvent, WinTouchEvent


Constructor & Destructor Documentation

SoLongTapGestureRecognizer::SoLongTapGestureRecognizer (  ) 

Constructor.

virtual SoLongTapGestureRecognizer::~SoLongTapGestureRecognizer (  )  [virtual]

Destructor.


Member Function Documentation

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

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.

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)


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/