Global pointer state shared by UIRoot and the widgets.

Click correctness is enforced here by construction: a click only fires when the press STARTED on a widget and the release happens while still over it (pressTarget), so events leaking through closing menus can never trigger whatever sits underneath. captureTarget routes every pointer move to one widget for the duration of a drag (sliders, scrollbars, popup interactions), regardless of what the cursor passes over.

Static variables

@:value(null)staticread onlycaptureTarget:UIComponent = null

The widget receiving exclusive drag callbacks until release.

@:value(false)staticread onlydownOnUI:Bool = false

true while a press that started on UI is held (updated by UIRoot).

@:value(false)staticread onlyoverUI:Bool = false

true while the cursor is over any UI (updated by UIRoot).

@:value(null)staticread onlypressTarget:UIComponent = null

The widget the current press started on (cleared on release).

Static methods

staticcapture(target:UIComponent):Void

Grabs exclusive drag routing until the pointer releases: target receives every onDragMove/onDragEnd regardless of what the cursor passes over.

Parameters:

target

the widget taking the drag

staticreleaseCapture(?target:UIComponent):Void

Drops drag routing.

Parameters:

target

when set, only releases if that widget currently holds capture