Expand description
VAPP-162 (docs/round-5-contract.md §9): the Button hold gesture as a
pure state machine every painter shares (the core drives it through
Surface::hold; gpui may also run it directly). With hold: true a
press never fires press: pointer down (or Space / Enter key down, key
repeat ignored) starts the hold (holdStart, the pressed state, the
holdingLabel); release within HOLD_SLOP px of the box (or key up of
the key that started it) ends it (holdEnd); the pointer leaving the box
by more than the slop, a pointer cancel, Escape or losing focus cancel it
(holdCancel); after a cancel nothing fires until the next down.
fixtures/interactions-round1.json buttonHold locks it.
Structs§
- Hold
Tracker - One button’s hold.
Enums§
- Hold
Event - What a step fired.
- Hold
Input - One input to a hold. Coordinates are px relative to the button’s
top-left;
width/height= its laid-out box.
Constants§
- HOLD_
SLOP - How far (px) the pointer may wander outside the box while held.