TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::PenState Struct Reference

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

Detailed Description

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.

Member Function Documentation

◆ IsPen()

bool tachyon::PenState::IsPen ( ) const
inline

◆ SetAxis()

void tachyon::PenState::SetAxis ( PenAxis axis,
float value )
inline

Sets one axis; PenAxis::Count changes nothing.

Member Data Documentation

◆ pointer

PointerType tachyon::PenState::pointer = PointerType::Mouse

◆ inProximity

bool tachyon::PenState::inProximity = false

near enough to the tablet to be tracked

◆ touching

bool tachyon::PenState::touching = false

the tip (or eraser) on the tablet

◆ eraser

bool tachyon::PenState::eraser = false

the pen's eraser end is the one in use

◆ buttons

uint8_t tachyon::PenState::buttons = 0

barrel buttons held: bit 0 is the first

◆ pressure

float tachyon::PenState::pressure = 0.0f

0 to 1

◆ tilt

float2 tachyon::PenState::tilt {}

degrees, -90 to 90: x leaning right, y leaning down

◆ distance

float tachyon::PenState::distance = 0.0f

to the tablet, 0 to 1

◆ rotation

float tachyon::PenState::rotation = 0.0f

of the barrel, degrees -180 to 180, clockwise, 0 up

◆ slider

float tachyon::PenState::slider = 0.0f

a finger wheel or slider (an airbrush pen), 0 to 1

◆ tangentialPressure

float tachyon::PenState::tangentialPressure = 0.0f

from squeezing the barrel, 0 to 1


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