1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! The catalog's pointer-button admission test.
//!
//! Every interactive component in this crate asks the same question before it
//! enters a press/activation state — "may this button start a press?"
//! ([`presses`]) — so the catalog has exactly one answer to it.
use ;
/// Whether `p` carries a button that may begin a press.
///
/// A press/activation machine — a `pressed` visual or state layer, a pointer
/// capture, an up-inside callback, a drag, a scrim-dismiss arming — starts on
/// the **primary** button alone: the left mouse button, or any touch/pen
/// contact (which every shell reports as [`PointerButton::Primary`] too). A
/// secondary press is a context gesture, and no component in this catalog does
/// anything with it, so it is left for a context-menu consumer instead of
/// activating the control under the cursor.
///
/// A modal barrier (a dialog/sheet/menu scrim) still **swallows** a secondary
/// press — it blocks the page behind it whatever button pressed — it just never
/// arms a dismiss from one.
///
/// Move/hover arms deliberately do **not** consult this: hover chrome and
/// cursor shapes are position-driven, and a move carries no meaningful button.
/// Neither do the focus-session arms (`request_focus`, an IME publish): the
/// root reads any `Down` that bubbles no claim as a blur, whatever button
/// carried it, so a secondary press inside an open overlay must still re-claim.
///
/// `frust_shadcn`'s `hit::presses` and `frust_widgets`' `authoring::presses` are
/// the same predicate for their own trees; each catalog keeps its own copy
/// rather than depending on a sibling design-system crate.
pub