Cogs.Core
Classes | Public Types | Public Attributes | List of all members
Cogs::Gesture Struct Reference

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
 
}; 
 

Detailed Description

Definition at line 20 of file Gestures.h.

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.

Definition at line 87 of file Gestures.h.

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

Definition at line 101 of file Gestures.h.

Member Data Documentation

◆ doubleTap

DoubleTap Cogs::Gesture::doubleTap

Definition at line 116 of file Gestures.h.

◆ drag

Drag Cogs::Gesture::drag

Definition at line 118 of file Gestures.h.

◆ hover

Hover Cogs::Gesture::hover

< Specific gesture data.

Definition at line 113 of file Gestures.h.

◆ id

uint32_t Cogs::Gesture::id

Unique gesture id.

Definition at line 110 of file Gestures.h.

◆ kind

Kind Cogs::Gesture::kind

Gesture type, see Kind.

Definition at line 109 of file Gestures.h.

◆ pan

Pan Cogs::Gesture::pan

Definition at line 120 of file Gestures.h.

◆ pinch

Pinch Cogs::Gesture::pinch

Definition at line 122 of file Gestures.h.

◆ press

Press Cogs::Gesture::press

Definition at line 117 of file Gestures.h.

◆ rotate

Rotate Cogs::Gesture::rotate

Definition at line 121 of file Gestures.h.

◆ state

State Cogs::Gesture::state

Gesture state, see State.

Definition at line 111 of file Gestures.h.

◆ swipe

Swipe Cogs::Gesture::swipe

Definition at line 119 of file Gestures.h.

◆ tap

Tap Cogs::Gesture::tap

Definition at line 115 of file Gestures.h.

◆ wheel

Wheel Cogs::Gesture::wheel

Definition at line 114 of file Gestures.h.


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