fix(plot,render,glfw): a hue-neutral crosshair, an em-dash placeholder, one layout per figure event, and a usable readout switch
This commit is contained in:
1 parent
10d5129fbf
commit
a14f333dbe
10 files changed
+175
-70
No files matched your search
@@ -174,10 +174,11 @@ class Host {
|
||||
void on_scroll(f64 dx, f64 dy) noexcept;
|
||||
void on_key(int key, int action, int mods) noexcept;
|
||||
|
||||
/// The index of the figure row a framebuffer pixel belongs to, by the rule
|
||||
/// `controller_at()` routes by: the row the pixel is in, or the nearest row when it is in none
|
||||
/// (a row gap, or a margin outside the figure). 0 while no figure is set.
|
||||
u32 row_at(f32 x, f32 y) const noexcept;
|
||||
/// The index of the row of `rows` a framebuffer y belongs to: the row it is in, or the nearest
|
||||
/// row when it is in none (a row gap, a margin outside the figure). One rule, shared by the event
|
||||
/// routing and the crosshair sync -- and taking the rects rather than reading them, so a caller
|
||||
/// that has just laid the figure out does not make it lay out again for this.
|
||||
static u32 row_in(const std::vector<Rect>& rows, f32 y) noexcept;
|
||||
|
||||
/// Spreads the hover over a whole `Figure` (spec §15).
|
||||
///
|
||||
@@ -193,8 +194,9 @@ class Host {
|
||||
/// whose controller has no crosshair clears the figure's.
|
||||
///
|
||||
/// Called once per frame from the run loop, so a scripted run that bypasses the GLFW callbacks
|
||||
/// gets the same synced figure a real pointer does.
|
||||
void sync_figure_crosshair() noexcept;
|
||||
/// gets the same synced figure a real pointer does. `rows` is the figure's row rects, which the
|
||||
/// run loop has just read -- the one layout per frame this shares with the row viewports.
|
||||
void sync_figure_crosshair(const std::vector<Rect>& rows) noexcept;
|
||||
|
||||
Plot plot_;
|
||||
input::Controller controller_; ///< forwards its viewport to `plot_`
|
||||
|
||||
Reference in new issue
Block a user