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

Snapshot of input state for a single recorded OS event. More...

#include <gui_core/input/gui_input_state.h>

Public Member Functions

bool LeftDown () const
bool LeftPressed () const
bool LeftReleased () const
bool RightDown () const
bool RightPressed () const
bool RightReleased () const
bool MiddleDown () const
bool MiddlePressed () const
bool MiddleReleased () const

Public Attributes

tachyon::int2 screenPos {0,0}
tachyon::int2 prevScreenPos {0,0}
tachyon::int2 screenDelta {0,0}
tachyon::MouseButtons buttons = tachyon::MouseButtons::None
tachyon::MouseButtons prevButtons = tachyon::MouseButtons::None
tachyon::KeyModifier modifiers = tachyon::KeyModifier::None
tachyon::float2 scroll {}
 wheel notches (fractional on hi-res devices); label drags: pixels
tachyon::KeyCode lastKey = tachyon::KeyCode::None
tachyon::KeyAction lastKeyAction = tachyon::KeyAction::KeyDown
tachyon::ID dragSourceID = tachyon::ID::Invalid()
 Drag-and-drop source and payload; set for drag events.
uint32_t dragPayloadType = 0
uintptr_t dragPayloadValue = 0
std::string textInput
 Text typed with this event, or dropped (EventType::FileDrop); UTF-8.
std::vector< std::string > droppedFiles
 EventType::FileDrop: the paths of the files dropped (UTF-8).
bool consumed = false
 True when the event was already handled (e.g. Tab by tab navigation).

Detailed Description

Snapshot of input state for a single recorded OS event.

Member Function Documentation

◆ LeftDown()

bool tachyon::InputState::LeftDown ( ) const
inline

◆ LeftPressed()

bool tachyon::InputState::LeftPressed ( ) const
inline

◆ LeftReleased()

bool tachyon::InputState::LeftReleased ( ) const
inline

◆ RightDown()

bool tachyon::InputState::RightDown ( ) const
inline

◆ RightPressed()

bool tachyon::InputState::RightPressed ( ) const
inline

◆ RightReleased()

bool tachyon::InputState::RightReleased ( ) const
inline

◆ MiddleDown()

bool tachyon::InputState::MiddleDown ( ) const
inline

◆ MiddlePressed()

bool tachyon::InputState::MiddlePressed ( ) const
inline

◆ MiddleReleased()

bool tachyon::InputState::MiddleReleased ( ) const
inline

Member Data Documentation

◆ screenPos

tachyon::int2 tachyon::InputState::screenPos {0,0}

◆ prevScreenPos

tachyon::int2 tachyon::InputState::prevScreenPos {0,0}

◆ screenDelta

tachyon::int2 tachyon::InputState::screenDelta {0,0}

◆ buttons

tachyon::MouseButtons tachyon::InputState::buttons = tachyon::MouseButtons::None

◆ prevButtons

tachyon::MouseButtons tachyon::InputState::prevButtons = tachyon::MouseButtons::None

◆ modifiers

tachyon::KeyModifier tachyon::InputState::modifiers = tachyon::KeyModifier::None

◆ scroll

tachyon::float2 tachyon::InputState::scroll {}

wheel notches (fractional on hi-res devices); label drags: pixels

◆ lastKey

tachyon::KeyCode tachyon::InputState::lastKey = tachyon::KeyCode::None

◆ lastKeyAction

tachyon::KeyAction tachyon::InputState::lastKeyAction = tachyon::KeyAction::KeyDown

◆ textInput

std::string tachyon::InputState::textInput

Text typed with this event, or dropped (EventType::FileDrop); UTF-8.

◆ droppedFiles

std::vector<std::string> tachyon::InputState::droppedFiles

EventType::FileDrop: the paths of the files dropped (UTF-8).

◆ consumed

bool tachyon::InputState::consumed = false

True when the event was already handled (e.g. Tab by tab navigation).


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