|
TachyonUI 1.1.0
High-performance UI for building tools.
|
The pen, as it was at a pointer event. More...
#include <gui_core/input/gui_input_state.h>
Public Member Functions | |
| bool | IsPen () const |
| void | SetAxis (PenAxis axis, float value) |
| Sets one axis; PenAxis::Count changes nothing. | |
Public Attributes | |
| PointerType | pointer = PointerType::Mouse |
| bool | inProximity = false |
| near enough to the tablet to be tracked | |
| bool | touching = false |
| the tip (or eraser) on the tablet | |
| bool | eraser = false |
| the pen's eraser end is the one in use | |
| uint8_t | buttons = 0 |
| barrel buttons held: bit 0 is the first | |
| float | pressure = 0.0f |
| 0 to 1 | |
| float2 | tilt {} |
| degrees, -90 to 90: x leaning right, y leaning down | |
| float | distance = 0.0f |
| to the tablet, 0 to 1 | |
| float | rotation = 0.0f |
| of the barrel, degrees -180 to 180, clockwise, 0 up | |
| float | slider = 0.0f |
| a finger wheel or slider (an airbrush pen), 0 to 1 | |
| float | tangentialPressure = 0.0f |
| from squeezing the barrel, 0 to 1 | |
The pen, as it was at a pointer event.
A pen also drives the pointer as a mouse: its tip is the left button. A mouse reads as pressure 1 while a button is held, 0 otherwise, so a brush works with either.
|
inline |
|
inline |
Sets one axis; PenAxis::Count changes nothing.
| PointerType tachyon::PenState::pointer = PointerType::Mouse |
| bool tachyon::PenState::inProximity = false |
near enough to the tablet to be tracked
| bool tachyon::PenState::touching = false |
the tip (or eraser) on the tablet
| bool tachyon::PenState::eraser = false |
the pen's eraser end is the one in use
| uint8_t tachyon::PenState::buttons = 0 |
barrel buttons held: bit 0 is the first
| float tachyon::PenState::pressure = 0.0f |
0 to 1
| float2 tachyon::PenState::tilt {} |
degrees, -90 to 90: x leaning right, y leaning down
| float tachyon::PenState::distance = 0.0f |
to the tablet, 0 to 1
| float tachyon::PenState::rotation = 0.0f |
of the barrel, degrees -180 to 180, clockwise, 0 up
| float tachyon::PenState::slider = 0.0f |
a finger wheel or slider (an airbrush pen), 0 to 1
| float tachyon::PenState::tangentialPressure = 0.0f |
from squeezing the barrel, 0 to 1