Cogs.Foundation
Loading...
Searching...
No Matches
Classes | Public Types | Public Attributes | List of all members
Cogs::Gesture Struct Reference

#include <Gestures.h>

Classes

struct  Coord
 
struct  DoubleTap
 
struct  Drag
 
struct  Hover
 
struct  Pan
 
struct  Pinch
 
struct  Press
 
struct  Rotate
 
struct  Swipe
 
struct  Tap
 
struct  Wheel
 

Public Types

enum struct  Kind : uint32_t {
  Hover , Wheel , Tap , DoubleTap ,
  Press , Drag , Swipe , Pan ,
  Rotate , Pinch
}
 
enum struct  State : uint8_t { Started , Changed , Ended , Cancelled }
 

Public Attributes

Kind kind
 Gesture type, see Kind.
 
uint32_t id
 Unique gesture id.
 
State state
 Gesture state, see State.
 
union {
   Hover   hover
 < Specific gesture data. More...
 
   Wheel   wheel
 
   Tap   tap
 
   DoubleTap   doubleTap
 
   Press   press
 
   Drag   drag
 
   Swipe   swipe
 
   Pan   pan
 
   Rotate   rotate
 
   Pinch   pinch
 
}; 
 

Member Enumeration Documentation

◆ Kind

enum struct Cogs::Gesture::Kind : uint32_t
strong
Enumerator
Hover 

Mouse pointer hovers over window without any buttons pressed, single-fire event.

Wheel 

Movemement of the mouse wheel, single-fire event.

Tap 

A short press, see tapMaxDuration, single-fire event.

DoubleTap 

Two taps in quick succession, see doubleTapTreshold, single-fire event.

First tap in a double tap gesture will be also sent as a separate Tap gesture.

Press 

A long press, a press that was too long to be a tap, events on press start and end.

Drag 

Pointer movement with a button pressed or touch, see mouseMoveThreshold and touchMoveThreshold, event gets updates.

Swipe 

Swift pointer movement with button pressed or touch, see swipeMaxDuration, mouseVelocityThreshold and touchVelocityThreshold, event gets updates.

Pan 

Two-finger touch movement where fingers are roughly equidistant, see mouseMoveThreshold and touchMoveThreshold, event gets updates.

Rotate 

Two-finger rotation movement where fingers are roughly equidistant, see rotateThreshold, event gets updates.

Pinch 

Two-finger movement where the two fingers comes closer or farther away, see pinchThreshold, event gets updates.

◆ State

enum struct Cogs::Gesture::State : uint8_t
strong
Enumerator
Started 

Gesture started, used by: Press, Drag, Swipe, Pan, Rotate, Pinch.

Changed 

Gesture changed, used by: Drag, Swipe, Pan, Rotate, Pinch.

Ended 

Gesture ended or single-fire events, used by all gestures.

Cancelled 

Gesture cancelled, used by: Press, Drag, Swipe, Pan, Rotate, Pinch.

Member Data Documentation

◆ 

union { ... } Cogs::Gesture::@1

◆ doubleTap

DoubleTap Cogs::Gesture::doubleTap

◆ drag

Drag Cogs::Gesture::drag

◆ hover

Hover Cogs::Gesture::hover

< Specific gesture data.

◆ id

uint32_t Cogs::Gesture::id

◆ kind

Kind Cogs::Gesture::kind

Gesture type, see Kind.

Referenced by Cogs::Gestures::mouseWheelMove().

◆ pan

Pan Cogs::Gesture::pan

◆ pinch

Pinch Cogs::Gesture::pinch

◆ press

Press Cogs::Gesture::press

◆ rotate

Rotate Cogs::Gesture::rotate

◆ state

State Cogs::Gesture::state

Gesture state, see State.

◆ swipe

Swipe Cogs::Gesture::swipe

◆ tap

Tap Cogs::Gesture::tap

◆ wheel

Wheel Cogs::Gesture::wheel

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