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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Per-frame composite & overlay-dismiss registries used by
//! [`super::LayoutManager::consume_event`].
//!
//! Both registries live on the per-window [`super::WindowBranch`] and are
//! cleared once per frame. Composites push entries from inside their
//! `register_layout_manager_*` helpers.
use crateRect;
use crateWidgetKind;
use crateLayerId;
use crateWidgetId;
// ---------------------------------------------------------------------------
// Per-frame composite registry — used by consume_event
// ---------------------------------------------------------------------------
/// The kind of a registered composite, used for event routing in
/// [`super::LayoutManager::consume_event`].
/// One entry in the per-frame composite registry.
///
/// Composites push one entry in their `register_layout_manager_*` helper.
/// [`super::LayoutManager::consume_event`] walks these in overlay-first
/// order (Modal → Popup → Dropdown → ContextMenu → Toolbar → Sidebar)
/// to route [`super::DispatchEvent`]s without the app spelling out the
/// chain manually.
// ---------------------------------------------------------------------------
// Overlay dismiss registry
// ---------------------------------------------------------------------------
/// A single entry in the per-frame overlay dismiss registry.
///
/// Composites push one entry when they call their
/// `register_layout_manager_*` helper. The LayoutManager uses these
/// entries to implement [`super::LayoutManager::dismiss_topmost_at`].
/// Map a composite [`WidgetKind`] to its coordinator [`LayerId`], or
/// `None` for atomics.
pub