LMMS
Loading...
Searching...
No Matches
PuglButtonEvent Struct Reference

#include <pugl.h>

Public Attributes

PuglEventType type
 PUGL_BUTTON_PRESS or PUGL_BUTTON_RELEASE
PuglEventFlags flags
 Bitwise OR of PuglEventFlag values.
double time
 Time in seconds.
double x
 View-relative X coordinate.
double y
 View-relative Y coordinate.
double xRoot
 Root-relative X coordinate.
double yRoot
 Root-relative Y coordinate.
PuglMods state
 Bitwise OR of PuglMod flags.
uint32_t button
 Button number starting from 0.

Detailed Description

Button press or release event.

Button numbers start from 0, and are ordered: primary, secondary, middle. So, on a typical right-handed mouse, the button numbers are:

Left: 0 Right: 1 Middle (often a wheel): 2

Higher button numbers are reported in the same order they are represented on the system. There is no universal standard here, but buttons 3 and 4 are typically a pair of buttons or a rocker, which are usually bound to "back" and "forward" operations.

Note that these numbers may differ from those used on the underlying platform, since they are manipulated to provide a consistent portable API.

Member Data Documentation

◆ button

uint32_t PuglButtonEvent::button

Button number starting from 0.

◆ flags

PuglEventFlags PuglButtonEvent::flags

Bitwise OR of PuglEventFlag values.

◆ state

PuglMods PuglButtonEvent::state

Bitwise OR of PuglMod flags.

◆ time

double PuglButtonEvent::time

Time in seconds.

◆ type

◆ x

double PuglButtonEvent::x

View-relative X coordinate.

◆ xRoot

double PuglButtonEvent::xRoot

Root-relative X coordinate.

◆ y

double PuglButtonEvent::y

View-relative Y coordinate.

◆ yRoot

double PuglButtonEvent::yRoot

Root-relative Y coordinate.


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