final class UIPointer
package smidr.input
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
staticread onlycaptureTarget:UIComponent = null
The widget receiving exclusive drag callbacks until release.
staticread onlydownOnUI:Bool = false
true while a press that started on UI is held (updated by UIRoot).
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 |
|---|