Skip to main content

Module interaction

Module interaction 

Source
Expand description

Mouse interaction for GUI widgets.

Tracks widget hit regions and maps mouse drags to parameter value changes.

Structs§

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.