MeshLib Documentation
Loading...
Searching...
No Matches
MR::TouchpadController::Handler Class Reference

#include <MRTouchpadController.h>

Public Types

enum class  GestureState { Begin , Update , End }
 gesture state More...
 

Public Member Functions

virtual ~Handler ()=default
 
void mouseScroll (float dx, float dy, bool kinetic)
 
void rotate (float angle, GestureState state)
 rotate gesture
 
void swipe (float dx, float dy, bool kinetic, GestureState state)
 swipe gesture; kinetic flag is set when the event is produced not by a user action but by hardware 'kinetic' scrolling
 
void zoom (float scale, bool kinetic, GestureState state)
 pitch ('zoom') gesture
 

Detailed Description

Base class for platform-dependent code handling touchpad events

If you want to add touchpad gesture support on your platform, inherit this class, extend the TouchpadController::initialize method and call the corresponding methods on the touchpad events.

Member Enumeration Documentation

◆ GestureState

gesture state

Enumerator
Begin 

gesture has started

Update 

gesture data has updated

End 

gesture has ended

Constructor & Destructor Documentation

◆ ~Handler()

virtual MR::TouchpadController::Handler::~Handler ( )
virtualdefault

Member Function Documentation

◆ mouseScroll()

void MR::TouchpadController::Handler::mouseScroll ( float dx,
float dy,
bool kinetic )

not a touchpad gesture but actually a mouse scroll; call it if mouse scrolls and touchpad swipe gestures are a single event on your platform (and when the event is actually is a mouse scroll)

◆ rotate()

void MR::TouchpadController::Handler::rotate ( float angle,
GestureState state )

rotate gesture

◆ swipe()

void MR::TouchpadController::Handler::swipe ( float dx,
float dy,
bool kinetic,
GestureState state )

swipe gesture; kinetic flag is set when the event is produced not by a user action but by hardware 'kinetic' scrolling

◆ zoom()

void MR::TouchpadController::Handler::zoom ( float scale,
bool kinetic,
GestureState state )

pitch ('zoom') gesture


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