Skip to main content

Module interaction

Module interaction 

Source
Expand description

BaseviewTranslator - the windowing-toolkit-specific half of truce-gui’s interaction surface. The platform-agnostic data types (InputEvent, MouseButton, Modifiers, WidgetRegion, InteractionState, DragState, DropdownState, dispatch, …) live in truce_gui_types::interaction and are re-exported here so existing truce_gui::interaction::* paths keep working.

Structs§

BaseviewTranslator
Stateful translator from baseview events to truce-gui’s platform-agnostic InputEvent stream.
DragState
DropdownState
State for an open dropdown popup.
InteractionState
Tracks the current mouse / touch interaction state.
Modifiers
Keyboard modifier state at event time.
PopupDrag
Active touch-drag on the open dropdown popup.
WidgetRegion
A widget’s hit region on screen.

Enums§

InputEvent
Platform-agnostic input event consumed by dispatch.
MouseButton
Which mouse button triggered an event.
ParamEdit
A requested edit to a host parameter, emitted by dispatch.

Constants§

SINGLE_POINTER
Single-pointer sentinel for mouse-driven flows. iOS touch dispatch substitutes the UITouch* cast to u64 so multiple fingers can drag independently.

Functions§

dispatch
Route a batch of input events through the widget tree, updating state in place (hover, drag origins, dropdown open/closed, …) and returning the sequence of parameter edits they imply.
dispatch_in
Like dispatch but takes explicit window_size in the same coordinate space as the layout - i.e. the size of the surface the layout is being composited onto.