feat: a search's hits are marked on every row, and the panel says how many of them it is showing
This commit is contained in:
1 parent
8ee4effb70
commit
db81ab2700
3 files changed
+140
No files matched your search
@@ -53,6 +53,10 @@ class RowSet {
|
||||
/// measurements to be shown at once, and a fixed number because a `Plot` fixes its cursor
|
||||
/// set at construction.
|
||||
static constexpr int kMeasureMarks = 6;
|
||||
/// Search hits drawn at once, per row. A scan can return thousands; a plot cannot grow its
|
||||
/// cursor set, and sixteen lines over one window is already the most a reader can count. The
|
||||
/// panel states how many of the hits it is showing.
|
||||
static constexpr int kSearchMarks = 16;
|
||||
|
||||
RowSet();
|
||||
|
||||
@@ -112,6 +116,10 @@ class RowSet {
|
||||
std::array<plot::u32, kMeasureMarks> measure_h{};
|
||||
std::array<plot::u32, kMeasureMarks> measure_v{};
|
||||
|
||||
/// The search hits' marks: the same arrangement as the measurement pool above, vertical only
|
||||
/// (a hit is an instant, never a level).
|
||||
std::array<plot::u32, kSearchMarks> search_v{};
|
||||
|
||||
/// One marker per trace per cursor: where each vertical cursor crosses that trace's
|
||||
/// series, drawn only in `mix` mode. Two per slot because the pair crosses a trace
|
||||
/// at two places, and an annotation cannot be shared between them.
|
||||
@@ -255,6 +263,17 @@ class RowSet {
|
||||
/// measurement is drawn", as opposed to merely computed.
|
||||
int measure_marks_placed() const noexcept { return measure_marks_placed_; }
|
||||
|
||||
/// Places the search hits' marks and parks the rest of the pool. `xs` are **display** x values
|
||||
/// (the caller has already taken `stream_at_x0()` off a stream time), the same convention
|
||||
/// `set_measure_marks()` takes a time mark in, and the marks are unselectable for the same
|
||||
/// reason: a hit is where the scope found the condition, not something the pointer may move.
|
||||
///
|
||||
/// `current` indexes the one the navigation is standing on, which is drawn in its own colour, or
|
||||
/// is negative for none. The caller orders `xs`; this places them in the order it is given.
|
||||
void set_search_marks(const std::vector<double>& xs, int current);
|
||||
/// How many search marks the last call placed, which is `min(xs.size(), kSearchMarks)`.
|
||||
int search_marks_placed() const noexcept { return search_marks_placed_; }
|
||||
|
||||
/// Whether every instrument this app *computed* is out of the pointer's reach: the trigger
|
||||
/// marker and the measurement marks. They are readouts -- where the scope put the edge, what a
|
||||
/// measurement measured -- and a user must not be able to drag them; the report in the dump is
|
||||
@@ -479,6 +498,7 @@ class RowSet {
|
||||
/// back, one row's stale echo at a time.
|
||||
|
||||
int measure_marks_placed_ = 0;
|
||||
int search_marks_placed_ = 0;
|
||||
/// The one stream time each vertical cursor is at, whatever row's copy was last moved.
|
||||
double cursor_a_x_ = 0.0;
|
||||
double cursor_b_x_ = 0.0;
|
||||
|
||||
Reference in new issue
Block a user