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
//! **A graph under its header, with a drag bar between** — once, for every tab that
//! shows content above a graph (the Coderoom's connections, the Explorer's live unit
//! graph, …).
//!
//! The owner (loki): "the graph works but is only visible in the lower part of the
//! window, and no drag bar exists". A pane that lays out its lists / layer lines / pane
//! headers first and hands the graph whatever height is left gives the graph the LEAST
//! of the window exactly when there is the most to read above it.
//!
//! [`header_above`]: the header goes in a top region that scrolls when it is
//! longer than its share — by default a quarter of the height, never more than
//! [`HEADER_MAX`] — and the graph takes ALL the rest. Between them is a draggable bar;
//! where the viewer leaves it is remembered in the UI's memory under the region's id
//! (egui's own panel state), so it survives a rebuild of the pane.
/// The header's default share of the height.
pub const HEADER_DEFAULT: f32 = 0.25;
/// The most of the height the header may be dragged to.
pub const HEADER_MAX: f32 = 0.8;
/// Draw `header` (scrolling when long) in a top region with a draggable divider
/// remembered under `id`; everything drawn into `ui` AFTER this call — the graph — gets
/// all the remaining height.