TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
Input

Input state, handlers, commands, shortcuts and undo history. More...

Classes

struct  tachyon::CommandID
 Handle to a registered command, stable for the manager's lifetime. More...
class  tachyon::CommandManager
 Registry of commands: named actions with an optional icon and an optional shortcut key, each firing one callback when invoked (clicked from a menu / toolbar, or via its key). More...
class  tachyon::InputHandlerBroadcaster
 Sends every platform input event to all handlers (e.g. More...
struct  tachyon::ElementEvent
 An input event delivered to an element's EventHandler. More...
struct  tachyon::RecordedInputEvent
 A single OS input event recorded for dispatch this frame. More...
class  tachyon::InputManager
 Receives raw OS events, records them, and runs the frame's input pipeline (tab navigation, text editor focus, dispatch, post-dispatch). More...
struct  tachyon::InputState
 Snapshot of input state for a single recorded OS event. More...
struct  tachyon::FileDrag
 A drag from another application, of files or text, over one of the app's windows. More...
struct  tachyon::FileDrop
 Files or text dropped from another application. More...
class  tachyon::IPlatformInputHandler
 Platform-level input interface: receives raw OS events (keyboard, mouse) and forwards them into the GUI input pipeline. More...
struct  tachyon::PointerDrag
 One press on an element that may become a drag. More...
class  tachyon::UndoHistory
 The app's undo history: steps that each undo and redo one change. More...

Typedefs

using tachyon::EventHandler = std::function<bool(ElementEvent&& input)>
 Element-level input handler used by the immediate-mode dispatcher; returns true when it consumed the event.

Enumerations

enum class  tachyon::CommandMode : uint32_t { tachyon::CommandMode::Default = 0 }
 A set of shortcuts that is active while the app says so (e.g. More...
enum class  tachyon::KeyModifier : uint8_t {
  tachyon::KeyModifier::None = 0 , tachyon::KeyModifier::Shift = 1 , tachyon::KeyModifier::Control = 2 , tachyon::KeyModifier::Alt = 4 ,
  tachyon::KeyModifier::Option = 8 , tachyon::KeyModifier::Command = 16
}
 Modifier keys held, combined with |. More...
enum class  tachyon::MouseButtons : uint8_t {
  tachyon::MouseButtons::None = 0 , tachyon::MouseButtons::Left = 1 , tachyon::MouseButtons::Middle = 2 , tachyon::MouseButtons::Right = 4 ,
  tachyon::MouseButtons::X1 = 8 , tachyon::MouseButtons::X2 = 16
}
 Mouse buttons, combined with |. More...
enum class  tachyon::KeyAction : uint8_t { tachyon::KeyAction::KeyDown , tachyon::KeyAction::KeyUp , tachyon::KeyAction::KeyChar }
 A keyboard event: a key down or up, or a typed character (KeyChar). More...
enum class  tachyon::MouseAction : uint8_t { tachyon::MouseAction::MouseDown , tachyon::MouseAction::MouseUp }
 Whether a mouse button went down or up. More...
enum class  tachyon::FileDropAction : uint8_t {
  tachyon::FileDropAction::Begin , tachyon::FileDropAction::Move , tachyon::FileDropAction::File , tachyon::FileDropAction::Text ,
  tachyon::FileDropAction::Complete
}
 A step of a drag from another application (files, text) over one of the app's windows. More...
enum class  tachyon::EventType : uint8_t {
  tachyon::EventType::None = 0 , tachyon::EventType::MouseMove , tachyon::EventType::MouseDown , tachyon::EventType::MouseUp ,
  tachyon::EventType::MouseScroll , tachyon::EventType::KeyDown , tachyon::EventType::KeyUp , tachyon::EventType::TextInput ,
  tachyon::EventType::DragEnter , tachyon::EventType::DragOver , tachyon::EventType::DragOut , tachyon::EventType::Drop ,
  tachyon::EventType::LabelDragBegin , tachyon::EventType::LabelDrag , tachyon::EventType::LabelDragEnd , tachyon::EventType::LabelDragCancel ,
  tachyon::EventType::FileDragOver , tachyon::EventType::FileDrop
}
 The kind of input event the GUI dispatches to element handlers. More...
enum class  tachyon::KeyCode : uint32_t {
  tachyon::KeyCode::None = 0 , tachyon::KeyCode::Return , tachyon::KeyCode::Escape , tachyon::KeyCode::Backspace ,
  tachyon::KeyCode::Tab , tachyon::KeyCode::Space , tachyon::KeyCode::Exclaim , tachyon::KeyCode::DoubleQuote ,
  tachyon::KeyCode::Hash , tachyon::KeyCode::Percent , tachyon::KeyCode::Dollar , tachyon::KeyCode::Ampersand ,
  tachyon::KeyCode::Quote , tachyon::KeyCode::LeftParen , tachyon::KeyCode::RightParen , tachyon::KeyCode::Asterisk ,
  tachyon::KeyCode::Plus , tachyon::KeyCode::Comma , tachyon::KeyCode::Minus , tachyon::KeyCode::Period ,
  tachyon::KeyCode::Slash , tachyon::KeyCode::Key0 , tachyon::KeyCode::Key1 , tachyon::KeyCode::Key2 ,
  tachyon::KeyCode::Key3 , tachyon::KeyCode::Key4 , tachyon::KeyCode::Key5 , tachyon::KeyCode::Key6 ,
  tachyon::KeyCode::Key7 , tachyon::KeyCode::Key8 , tachyon::KeyCode::Key9 , tachyon::KeyCode::Colon ,
  tachyon::KeyCode::Semicolon , tachyon::KeyCode::Less , tachyon::KeyCode::Equals , tachyon::KeyCode::Greater ,
  tachyon::KeyCode::Question , tachyon::KeyCode::At , tachyon::KeyCode::LeftBracket , tachyon::KeyCode::Backslash ,
  tachyon::KeyCode::RightBracket , tachyon::KeyCode::Caret , tachyon::KeyCode::Underscore , tachyon::KeyCode::Backquote ,
  tachyon::KeyCode::KeyA , tachyon::KeyCode::KeyB , tachyon::KeyCode::KeyC , tachyon::KeyCode::KeyD ,
  tachyon::KeyCode::KeyE , tachyon::KeyCode::KeyF , tachyon::KeyCode::KeyG , tachyon::KeyCode::KeyH ,
  tachyon::KeyCode::KeyI , tachyon::KeyCode::KeyJ , tachyon::KeyCode::KeyK , tachyon::KeyCode::KeyL ,
  tachyon::KeyCode::KeyM , tachyon::KeyCode::KeyN , tachyon::KeyCode::KeyO , tachyon::KeyCode::KeyP ,
  tachyon::KeyCode::KeyQ , tachyon::KeyCode::KeyR , tachyon::KeyCode::KeyS , tachyon::KeyCode::KeyT ,
  tachyon::KeyCode::KeyU , tachyon::KeyCode::KeyV , tachyon::KeyCode::KeyW , tachyon::KeyCode::KeyX ,
  tachyon::KeyCode::KeyY , tachyon::KeyCode::KeyZ , tachyon::KeyCode::Capslock , tachyon::KeyCode::F1 ,
  tachyon::KeyCode::F2 , tachyon::KeyCode::F3 , tachyon::KeyCode::F4 , tachyon::KeyCode::F5 ,
  tachyon::KeyCode::F6 , tachyon::KeyCode::F7 , tachyon::KeyCode::F8 , tachyon::KeyCode::F9 ,
  tachyon::KeyCode::F10 , tachyon::KeyCode::F11 , tachyon::KeyCode::F12 , tachyon::KeyCode::Printscreen ,
  tachyon::KeyCode::Scrolllock , tachyon::KeyCode::Pause , tachyon::KeyCode::Insert , tachyon::KeyCode::Home ,
  tachyon::KeyCode::PageUp , tachyon::KeyCode::Delete , tachyon::KeyCode::End , tachyon::KeyCode::PageDown ,
  tachyon::KeyCode::Right , tachyon::KeyCode::Left , tachyon::KeyCode::Down , tachyon::KeyCode::Up ,
  tachyon::KeyCode::NUMLOCKCLEAR , tachyon::KeyCode::KeyPadDivide , tachyon::KeyCode::KeyPadMultiply , tachyon::KeyCode::KeyPadMinus ,
  tachyon::KeyCode::KeyPadPlus , tachyon::KeyCode::KeyPadEnter , tachyon::KeyCode::KeyPad1 , tachyon::KeyCode::KeyPad2 ,
  tachyon::KeyCode::KeyPad3 , tachyon::KeyCode::KeyPad4 , tachyon::KeyCode::KeyPad5 , tachyon::KeyCode::KeyPad6 ,
  tachyon::KeyCode::KeyPad7 , tachyon::KeyCode::KeyPad8 , tachyon::KeyCode::KeyPad9 , tachyon::KeyCode::KeyPad0 ,
  tachyon::KeyCode::KeyPadPeriod , tachyon::KeyCode::KeyPadEquals , tachyon::KeyCode::KeyPadComma , tachyon::KeyCode::KeyPadEqualsAs400 ,
  tachyon::KeyCode::KeyPad00 , tachyon::KeyCode::KeyPad000 , tachyon::KeyCode::KeyPadLeftParen , tachyon::KeyCode::KeyPadRightParen ,
  tachyon::KeyCode::KeyPadLeftBrace , tachyon::KeyCode::KeyPadRightBrace , tachyon::KeyCode::KeyPadTab , tachyon::KeyCode::KeyPadBackspace ,
  tachyon::KeyCode::KeyPadA , tachyon::KeyCode::KeyPadB , tachyon::KeyCode::KeyPadC , tachyon::KeyCode::KeyPadD ,
  tachyon::KeyCode::KeyPadE , tachyon::KeyCode::KeyPadF , tachyon::KeyCode::KeyPadXor , tachyon::KeyCode::KeyPadPower ,
  tachyon::KeyCode::KeyPadPercent , tachyon::KeyCode::KeyPadLess , tachyon::KeyCode::KeyPadGreater , tachyon::KeyCode::KeyPadAmpersand ,
  tachyon::KeyCode::KeyPadDoubleAmpersand , tachyon::KeyCode::KeyPadVerticalbar , tachyon::KeyCode::KeyPadDoubleVerticalbar , tachyon::KeyCode::KeyPadColon ,
  tachyon::KeyCode::KeyPadHash , tachyon::KeyCode::KeyPadSpace , tachyon::KeyCode::KeyPadAt , tachyon::KeyCode::KeyPadExclam ,
  tachyon::KeyCode::KeyPadMemstore , tachyon::KeyCode::KeyPadMemrecall , tachyon::KeyCode::KeyPadMemclear , tachyon::KeyCode::KeyPadMemadd ,
  tachyon::KeyCode::KeyPadMemsubtract , tachyon::KeyCode::KeyPadMemmultiply , tachyon::KeyCode::KeyPadMemdivide , tachyon::KeyCode::KeyPadPlusminus ,
  tachyon::KeyCode::KeyPadClear , tachyon::KeyCode::KeyPadClearentry , tachyon::KeyCode::KeyPadBinary , tachyon::KeyCode::KeyPadOctal ,
  tachyon::KeyCode::KeyPadDecimal , tachyon::KeyCode::KeyPadHexadecimal , tachyon::KeyCode::Application , tachyon::KeyCode::Power ,
  tachyon::KeyCode::F13 , tachyon::KeyCode::F14 , tachyon::KeyCode::F15 , tachyon::KeyCode::F16 ,
  tachyon::KeyCode::F17 , tachyon::KeyCode::F18 , tachyon::KeyCode::F19 , tachyon::KeyCode::F20 ,
  tachyon::KeyCode::F21 , tachyon::KeyCode::F22 , tachyon::KeyCode::F23 , tachyon::KeyCode::F24 ,
  tachyon::KeyCode::Execute , tachyon::KeyCode::Help , tachyon::KeyCode::Menu , tachyon::KeyCode::Select ,
  tachyon::KeyCode::Stop , tachyon::KeyCode::Again , tachyon::KeyCode::Undo , tachyon::KeyCode::Cut ,
  tachyon::KeyCode::Copy , tachyon::KeyCode::Paste , tachyon::KeyCode::Find , tachyon::KeyCode::Mute ,
  tachyon::KeyCode::Volumeup , tachyon::KeyCode::Volumedown , tachyon::KeyCode::Alterase , tachyon::KeyCode::Sysreq ,
  tachyon::KeyCode::Cancel , tachyon::KeyCode::Clear , tachyon::KeyCode::Prior , tachyon::KeyCode::Return2 ,
  tachyon::KeyCode::Separator , tachyon::KeyCode::Out , tachyon::KeyCode::Oper , tachyon::KeyCode::Clearagain ,
  tachyon::KeyCode::Crsel , tachyon::KeyCode::Exsel , tachyon::KeyCode::ThousandsSeparator , tachyon::KeyCode::DecimalSeparator ,
  tachyon::KeyCode::CurrencyUnit , tachyon::KeyCode::CurrencySubUnit , tachyon::KeyCode::LeftControl , tachyon::KeyCode::LeftShift ,
  tachyon::KeyCode::LeftAlt , tachyon::KeyCode::LeftCommand , tachyon::KeyCode::RightControl , tachyon::KeyCode::RightShift ,
  tachyon::KeyCode::RightAlt , tachyon::KeyCode::RightCommand , tachyon::KeyCode::Mode , tachyon::KeyCode::AudioNext ,
  tachyon::KeyCode::AudioPrev , tachyon::KeyCode::AudioStop , tachyon::KeyCode::AudioPlay , tachyon::KeyCode::AudioMute ,
  tachyon::KeyCode::MediaSelect , tachyon::KeyCode::WWW , tachyon::KeyCode::Mail , tachyon::KeyCode::Calculator ,
  tachyon::KeyCode::Computer , tachyon::KeyCode::ACSearch , tachyon::KeyCode::ACHome , tachyon::KeyCode::ACBack ,
  tachyon::KeyCode::ACForward , tachyon::KeyCode::ACStop , tachyon::KeyCode::ACRefresh , tachyon::KeyCode::ACBookmarks ,
  tachyon::KeyCode::BrightnessDown , tachyon::KeyCode::BrightnessUp , tachyon::KeyCode::DisplaySwitch , tachyon::KeyCode::KeyboardIlluminationToggle ,
  tachyon::KeyCode::KeyboardIlluminationDown , tachyon::KeyCode::KeyboardIlluminationUp , tachyon::KeyCode::Eject , tachyon::KeyCode::Sleep ,
  tachyon::KeyCode::App1 , tachyon::KeyCode::App2 , tachyon::KeyCode::AudioRewind , tachyon::KeyCode::AudioFastforward ,
  tachyon::KeyCode::SoftLeft , tachyon::KeyCode::SoftRight , tachyon::KeyCode::Call , tachyon::KeyCode::EndCall
}
 Keys by what the keyboard layout makes them, not by position. More...

Functions

float tachyon::DoubleClickMilliseconds () noexcept
 The most time between the two clicks of a double-click, milliseconds: the OS's setting, which the application reads from its window backend every frame.
void tachyon::SetDoubleClickMilliseconds (float milliseconds) noexcept
 Sets DoubleClickMilliseconds; values of 0 or less are ignored.
EventHandler tachyon::Chain (EventHandler first, EventHandler second)
 A handler that tries first, then second when first returns false.
constexpr bool tachyon::IsDragTravel (int2 delta, int32_t distance) noexcept
 Whether the pointer moving delta pixels from a press makes it a drag: distance pixels or more in a straight line.
constexpr bool tachyon::IsDragCancelKey (const InputState &s) noexcept
 Escape going down: cancels the drag of the element that has the event.

Variables

constexpr float tachyon::kWheelScrollStep = 30.0f
 scrolled per wheel notch (CSS px)
constexpr int32_t tachyon::kDragStartDistance = 4
 pointer travel before a press becomes a drag (CSS px)
constexpr float tachyon::kDefaultDoubleClickMs = 500.0f
 The OS's double-click time if the platform reports one, else this, milliseconds.
tachyon::ID tachyon::InputState::dragSourceID = tachyon::ID::Invalid()
 Drag-and-drop source and payload; set for drag events.
uint32_t tachyon::InputState::dragPayloadType = 0
uintptr_t tachyon::InputState::dragPayloadValue = 0

Detailed Description

Input state, handlers, commands, shortcuts and undo history.

Typedef Documentation

◆ EventHandler

using tachyon::EventHandler = std::function<bool(ElementEvent&& input)>

#include <gui_core/input/gui_input_handler_func.h>

Element-level input handler used by the immediate-mode dispatcher; returns true when it consumed the event.

Enumeration Type Documentation

◆ CommandMode

enum class tachyon::CommandMode : uint32_t
strong

#include <gui_core/input/gui_command_manager.h>

A set of shortcuts that is active while the app says so (e.g.

a node view's while it has the focus). Opaque: other values come from CommandManager::RegisterMode. Default is always registered and is the fallback when the active mode has no matching command.

Enumerator
Default 

◆ KeyModifier

enum class tachyon::KeyModifier : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

Modifier keys held, combined with |.

The Alt key reports as Option on macOS; Command is the Cmd key there and the Windows or Super key elsewhere.

Enumerator
None 
Shift 
Control 
Alt 
Option 
Command 

◆ MouseButtons

enum class tachyon::MouseButtons : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

Mouse buttons, combined with |.

Enumerator
None 
Left 
Middle 
Right 
X1 
X2 

◆ KeyAction

enum class tachyon::KeyAction : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

A keyboard event: a key down or up, or a typed character (KeyChar).

Enumerator
KeyDown 
KeyUp 
KeyChar 

◆ MouseAction

enum class tachyon::MouseAction : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

Whether a mouse button went down or up.

Enumerator
MouseDown 
MouseUp 

◆ FileDropAction

enum class tachyon::FileDropAction : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

A step of a drag from another application (files, text) over one of the app's windows.

Enumerator
Begin 

a drag came over the window

Move 

it's at screenPos

File 

dropped: one of its files, the path in data

Text 

dropped: text, in data

Complete 

it's over: after a drop's files and text, or it left the window

◆ EventType

enum class tachyon::EventType : uint8_t
strong

#include <gui_core/input/gui_input_enums.h>

The kind of input event the GUI dispatches to element handlers.

Enumerator
None 
MouseMove 
MouseDown 

which button: state.buttons & ~state.prevButtons

MouseUp 

which button: state.prevButtons & ~state.buttons

MouseScroll 
KeyDown 
KeyUp 
TextInput 
DragEnter 
DragOver 
DragOut 
Drop 
LabelDragBegin 

label -> control: drag starting; state.scroll.x = 0

LabelDrag 

label -> control: drag in progress; state.scroll.x = pixels moved since the start

LabelDragEnd 

label -> control: drag committed

LabelDragCancel 

label -> control: drag cancelled (Escape)

FileDragOver 

Files or text from another application are dragged over the element: return true to take them.

What's dragged is known only once it's dropped.

FileDrop 

Dropped on the element: state.droppedFiles, state.textInput.

Return true when it took them; otherwise its parent is offered them, then the application's handler.

◆ KeyCode

enum class tachyon::KeyCode : uint32_t
strong

#include <gui_core/input/gui_input_enums.h>

Keys by what the keyboard layout makes them, not by position.

KeyAction::KeyChar events carry a Unicode codepoint in this type instead.

Enumerator
None 
Return 
Escape 
Backspace 
Tab 
Space 
Exclaim 
DoubleQuote 
Hash 
Percent 
Dollar 
Ampersand 
Quote 
LeftParen 
RightParen 
Asterisk 
Plus 
Comma 
Minus 
Period 
Slash 
Key0 
Key1 
Key2 
Key3 
Key4 
Key5 
Key6 
Key7 
Key8 
Key9 
Colon 
Semicolon 
Less 
Equals 
Greater 
Question 
At 
LeftBracket 
Backslash 
RightBracket 
Caret 
Underscore 
Backquote 
KeyA 
KeyB 
KeyC 
KeyD 
KeyE 
KeyF 
KeyG 
KeyH 
KeyI 
KeyJ 
KeyK 
KeyL 
KeyM 
KeyN 
KeyO 
KeyP 
KeyQ 
KeyR 
KeyS 
KeyT 
KeyU 
KeyV 
KeyW 
KeyX 
KeyY 
KeyZ 
Capslock 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
Printscreen 
Scrolllock 
Pause 
Insert 
Home 
PageUp 
Delete 
End 
PageDown 
Right 
Left 
Down 
Up 
NUMLOCKCLEAR 
KeyPadDivide 
KeyPadMultiply 
KeyPadMinus 
KeyPadPlus 
KeyPadEnter 
KeyPad1 
KeyPad2 
KeyPad3 
KeyPad4 
KeyPad5 
KeyPad6 
KeyPad7 
KeyPad8 
KeyPad9 
KeyPad0 
KeyPadPeriod 
KeyPadEquals 
KeyPadComma 
KeyPadEqualsAs400 
KeyPad00 
KeyPad000 
KeyPadLeftParen 
KeyPadRightParen 
KeyPadLeftBrace 
KeyPadRightBrace 
KeyPadTab 
KeyPadBackspace 
KeyPadA 
KeyPadB 
KeyPadC 
KeyPadD 
KeyPadE 
KeyPadF 
KeyPadXor 
KeyPadPower 
KeyPadPercent 
KeyPadLess 
KeyPadGreater 
KeyPadAmpersand 
KeyPadDoubleAmpersand 
KeyPadVerticalbar 
KeyPadDoubleVerticalbar 
KeyPadColon 
KeyPadHash 
KeyPadSpace 
KeyPadAt 
KeyPadExclam 
KeyPadMemstore 
KeyPadMemrecall 
KeyPadMemclear 
KeyPadMemadd 
KeyPadMemsubtract 
KeyPadMemmultiply 
KeyPadMemdivide 
KeyPadPlusminus 
KeyPadClear 
KeyPadClearentry 
KeyPadBinary 
KeyPadOctal 
KeyPadDecimal 
KeyPadHexadecimal 
Application 
Power 
F13 
F14 
F15 
F16 
F17 
F18 
F19 
F20 
F21 
F22 
F23 
F24 
Execute 
Help 
Menu 
Select 
Stop 
Again 
Undo 
Cut 
Copy 
Paste 
Find 
Mute 
Volumeup 
Volumedown 
Alterase 
Sysreq 
Cancel 
Clear 
Prior 
Return2 
Separator 
Out 
Oper 
Clearagain 
Crsel 
Exsel 
ThousandsSeparator 
DecimalSeparator 
CurrencyUnit 
CurrencySubUnit 
LeftControl 
LeftShift 
LeftAlt 
LeftCommand 
RightControl 
RightShift 
RightAlt 
RightCommand 
Mode 
AudioNext 
AudioPrev 
AudioStop 
AudioPlay 
AudioMute 
MediaSelect 
WWW 
Mail 
Calculator 
Computer 
ACSearch 
ACHome 
ACBack 
ACForward 
ACStop 
ACRefresh 
ACBookmarks 
BrightnessDown 
BrightnessUp 
DisplaySwitch 
KeyboardIlluminationToggle 
KeyboardIlluminationDown 
KeyboardIlluminationUp 
Eject 
Sleep 
App1 
App2 
AudioRewind 
AudioFastforward 
SoftLeft 
SoftRight 
Call 
EndCall 

Function Documentation

◆ DoubleClickMilliseconds()

float tachyon::DoubleClickMilliseconds ( )
noexcept

#include <gui_core/input/gui_input_enums.h>

The most time between the two clicks of a double-click, milliseconds: the OS's setting, which the application reads from its window backend every frame.

◆ SetDoubleClickMilliseconds()

void tachyon::SetDoubleClickMilliseconds ( float milliseconds)
noexcept

#include <gui_core/input/gui_input_enums.h>

Sets DoubleClickMilliseconds; values of 0 or less are ignored.

◆ Chain()

EventHandler tachyon::Chain ( EventHandler first,
EventHandler second )
inline

#include <gui_core/input/gui_input_handler_func.h>

A handler that tries first, then second when first returns false.

◆ IsDragTravel()

bool tachyon::IsDragTravel ( int2 delta,
int32_t distance )
constexprnoexcept

#include <gui_core/input/gui_pointer_drag.h>

Whether the pointer moving delta pixels from a press makes it a drag: distance pixels or more in a straight line.

Every press that can be a click or a drag decides with this, at Px(kDragStartDistance).

◆ IsDragCancelKey()

bool tachyon::IsDragCancelKey ( const InputState & s)
constexprnoexcept

#include <gui_core/input/gui_pointer_drag.h>

Escape going down: cancels the drag of the element that has the event.

Variable Documentation

◆ kWheelScrollStep

float tachyon::kWheelScrollStep = 30.0f
constexpr

#include <gui_core/input/gui_input_enums.h>

scrolled per wheel notch (CSS px)

◆ kDragStartDistance

int32_t tachyon::kDragStartDistance = 4
constexpr

#include <gui_core/input/gui_input_enums.h>

pointer travel before a press becomes a drag (CSS px)

◆ kDefaultDoubleClickMs

float tachyon::kDefaultDoubleClickMs = 500.0f
constexpr

#include <gui_core/input/gui_input_enums.h>

The OS's double-click time if the platform reports one, else this, milliseconds.

◆ dragSourceID

tachyon::ID tachyon::InputState::dragSourceID = tachyon::ID::Invalid()

Drag-and-drop source and payload; set for drag events.

◆ dragPayloadType

uint32_t tachyon::InputState::dragPayloadType = 0

◆ dragPayloadValue

uintptr_t tachyon::InputState::dragPayloadValue = 0