ui: tour and help follow the readouts dock
The dock tour stop describes the read-only readouts and their Edit buttons, and the cursors and measures hints point to the dock copy and the pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
38b31360cc
commit
a2ce02db92
2 files changed
+13
-7
No files matched your search
@@ -63,6 +63,10 @@ struct HelpHint {
|
||||
|
||||
/// The table, which is the whole of the curation: a new surface is a row, and the heading row it
|
||||
/// names must already exist in `App` (that is what `ui_app.hpp`'s help-layer fields are for).
|
||||
///
|
||||
/// The trigger, cursors, measurements and signals headings live on slide-over pages, which exist
|
||||
/// (unmapped) whether or not the page is open: their hints are attached all the time and drawn while
|
||||
/// the page is on screen, so the dock needs no hint of its own and the layer has one code path.
|
||||
constexpr HelpHint kHelpHints[] = {
|
||||
{"plot", "The plot",
|
||||
"Every signal you have switched on is drawn here, one row per group of traces, with all rows "
|
||||
@@ -77,12 +81,12 @@ constexpr HelpHint kHelpHints[] = {
|
||||
{"cursors", "The cursors",
|
||||
"Two movable instruments read against the window on screen: two verticals for time, two "
|
||||
"horizontals for the value axis, or the two crossings of each trace. What every plotted row "
|
||||
"reads at the cursor is listed in this pane.",
|
||||
"reads at the cursor is listed in this page; the dock keeps a read-only copy.",
|
||||
"C", &App::cursors_head},
|
||||
{"measures", "The measurements",
|
||||
"Readings over the visible window: average, RMS, top, peak to peak, amplitude, frequency, a "
|
||||
"threshold count and more. Statistics under a reading track how it has varied since the last "
|
||||
"reset, without the plot having to be still.",
|
||||
"reset, without the plot having to be still. The dock lists the values; Edit opens this page.",
|
||||
"", &App::measures_head},
|
||||
{"math", "Math channels",
|
||||
"A channel computed from the streamed ones in a small node graph: sources, gains, filters and "
|
||||
|
||||
+7
-5
@@ -39,12 +39,12 @@ namespace ui_impl {
|
||||
namespace {
|
||||
|
||||
/// The card's width. Wide enough for a comfortable line of the paragraph, narrow enough to fit
|
||||
/// beside the plot on the documented window -- at 756 px the dock is 320 and a card wider than
|
||||
/// beside the plot on the documented window -- at 756 px the dock is 280 and a card wider than
|
||||
/// that is a card that has to cover its own target. It is a *floor* on the box, not a cap on the
|
||||
/// paragraph: the wrapped label is capped by `max_width_chars` so the natural width never exceeds it.
|
||||
constexpr int kCardWidth = 280;
|
||||
/// The gap between the hole and whatever is placed beside it. Eight and not twelve: the dock
|
||||
/// is 320 px, and it has to hold the card and both gaps.
|
||||
/// is 280 px, and it has to hold the card and both gaps.
|
||||
constexpr int kGap = 8;
|
||||
|
||||
/// Places an overlay child of the tour overlay at an exact rectangle. `GtkOverlay` positions an
|
||||
@@ -455,8 +455,10 @@ constexpr TourStep kTourSteps[] = {
|
||||
"the view then freezes on the first event that matches, however rare it is.",
|
||||
&App::trigger_body},
|
||||
{"side", nullptr, "The dock",
|
||||
"The dock beside the plot: the cursors, then the measurements. The buttons in the bar above "
|
||||
"show and hide it.",
|
||||
"The dock beside the plot is a read-only copy of the cursors and of every measurement, in a "
|
||||
"fixed width. Edit, beside each heading, opens that instrument's full panel over the plot; a "
|
||||
"click on a measurement opens its dialog. The side-panel button in the bar above shows and hides "
|
||||
"the dock.",
|
||||
&App::side_box},
|
||||
{"signals", "signals", "Adding a signal",
|
||||
"What can be added: the signals the source declares that are not acquired yet, each with the "
|
||||
@@ -502,7 +504,7 @@ void start_tour(App& app) {
|
||||
app.settings.tour_seen = true;
|
||||
(void)save_settings(app.settings);
|
||||
}
|
||||
// The main window has no page stack (the dock is one scroller): its pages are the slide-over's, and
|
||||
// The main window has no page stack (the dock holds only the readouts): its pages are the slide-over's, and
|
||||
// the view's `on_page` hook opens one (or closes the panel for a stop with no page), replacing the
|
||||
// `page_stack` mechanism the chooser keeps.
|
||||
app.tour.on_page = tour_open_page;
|
||||
|
||||
Reference in new issue
Block a user