Event API
Declared by <huxerui/event.h>.
Interaction and input values
Section titled “Interaction and input values”InteractionState: enabled, hovered, pressed, focused, and focus-visible state.InteractionEvent::Type:Press,Release, orCancel;InteractionEvent::Source:PointerorKeyboard.InteractionEvent: type, source, matchingpress_id, and optional node-local pointer position.PointerEventType:Down,Up,Move, orCancel;PointerDeviceKind:Mouse,Touch, orPen.PointerEvent: type, pointer ID, node-local position, device kind, and click count.ScrollEvent: local delta and pointer position.Key:Unknown,Tab,Enter,Space,Escape,Backspace,Delete,ArrowLeft,ArrowRight,ArrowUp,ArrowDown,Home,End,PageUp,PageDown,A,C,V,X,Y,Z,Shift,Control,Alt, andMeta.KeyEventType:DownorUp;KeyModifierscarries Shift, Control, Alt, and Meta flags.KeyEvent: type, key, text, modifiers, and repeat state.BackPhase:Begin,Update,Cancel, orCommit;BackEventcarries phase and progress.
Event<Arguments...>
Section titled “Event<Arguments...>”Base shape for an event key. A key supplies using Signature = void(Arguments...); its type is the identity.
Built-in event groups
Section titled “Built-in event groups”ViewEvents:Click,PointerDown,PointerMove,PointerUp,PointerCancel,FocusChanged,KeyDown,KeyUp, andBackRequested.ToggleEvents::Changed(bool).SliderEvents::Changed(float).SegmentedButtonEvents::Changed(std::size_t).TabsEvents::Changed(std::size_t).NavigationEvents::Changed(std::size_t).DrawerEvents::OpenChanged(bool).TextFieldEvents::Changed(const TextEditingValue&)andSubmitted().
Binding and emission
Section titled “Binding and emission”View::On<Key>(handler) binds a callable compatible with Key::Signature to that view declaration.
UseEvents() returns a copyable EventEmitter; emitter.Emit<Key>(arguments...) sends a component-owned event through the current scope.
EventEmitter::IsConnected() reports whether that scope still owns the event channel.
Binding, lifetime, and coordinates
Section titled “Binding, lifetime, and coordinates”Handlers are copied into the transient View declaration and reconciled with its mounted node.
They run on the Runtime UI thread and remain installed only while that node or scope is mounted.
OnClick is the built-in activation event and also installs default indication; use On<Key> for another typed semantic event.
Pointer positions and scroll deltas are expressed in logical coordinates local to the receiving node.
Platform adapters convert native pixels, screen coordinates, click counts, key identity, and modifiers before dispatch.
EventEmitter is appropriate for a reusable scoped component’s own output; it is not a process-wide event bus.
Handler erasure and dispatch storage live in huxerui::detail and are not extension contracts.

