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
89
90
91
92
93
94
95
//! Widgets, grouped as catalog traits on `Theme` — import the group, reach
//! the component: `use ui::widgets::{Content, Controls, Layout,
//! Scaffolding, Status};` → `theme.group_box()`, `theme.tab(..)`.
//!
//! What stays here is deliberately trait-shaped: state flags and pure math,
//! neither of which reads the theme as a receiver.
use ;
pub use ;
pub use Content;
pub use ;
pub use ;
pub use ;
pub use Status;
/// What a control paints in the 1px border it keeps for
/// [`crate::focus::focusable`]'s ring: nothing, until focus fills it.
///
/// Always present, never conditional. gpui sizes border-box, so a border that
/// appeared only on focus would shift the content under it by a pixel — a
/// checkbox whose tick jumps as you tab onto it.
pub const RING_SLOT: Hsla = transparent_black;
/// A flag that follows something else until the user takes it over.
///
/// The rule behind a section that opens itself while work streams in and
/// collapses when it stops: auto-follow is right until the first press, and
/// wrong immediately after — whatever the flag does next, the person who
/// clicked has to win. Nothing agent-shaped about it; a build log that unfolds
/// while it runs and a detail pane that follows the selection both want this.
///
/// It is an `Option<bool>` rather than the two flags it reads as (*touched*,
/// plus the value): "untouched, and here is the manual value" is a state that
/// cannot mean anything, and this way it cannot be written.
///
/// ```ignore
/// let open = self.details.get(self.running); // paint this
/// // …on the header's click:
/// self.details.toggle(self.running);
/// ```
;
/// Where `pointer` falls along `axis` as a fraction of `bounds` — what a
/// divider dragged there makes the split, and what a slider dragged there makes
/// the value. `Axis::Horizontal` travels in x.
///
/// Clamped to `min..=1-min` — the dead zone a split passes so neither pane can
/// be squeezed away, and the `0.0` a slider passes because it has none. On a
/// zero-extent container the answer is `min`: the frame before layout has run
/// would otherwise divide by zero.
/// A small state dot — the "working / idle / failed" bead on a row. Takes the
/// tone from the caller so the meaning stays with the caller's domain.