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
//! Programmatic [`plot()`](crate::tree::plot) view commands — the plot
//! counterpart of [`crate::viewport::ViewportRequest`].
//!
//! Apps accumulate requests from event handlers (a "Fit" toolbar button,
//! a "last 60 s" preset) and hand them to the host once per frame via
//! [`crate::event::App::drain_plot_requests`]; each is consumed during
//! [`UiState::prepare_plots`](crate::state::UiState) by the plot whose
//! `.key(...)` it names, where the live data bounds are known. This is
//! the app-side write half of the view API —
//! [`plot_view_by_key`](crate::state::UiState::plot_view_by_key) is the
//! read half — so `build` / `on_event` code can drive the view without
//! `&mut UiState`.
// Lock in full per-item documentation for this module (issue #73).
/// What an app produces to drive a [`plot()`](crate::tree::plot)'s view
/// programmatically. Push once per build via
/// [`App::drain_plot_requests`](crate::event::App::drain_plot_requests);
/// unmatched requests (the keyed plot wasn't in the tree this frame) are
/// dropped, like [`crate::viewport::ViewportRequest`]s.