scope windows: a right-click menu of their own

A scope window is a view with its own arrangement, but its plot had no menu: every right-click
went nowhere, because the main window's row menu acts on the main window's rows.

`on_scope_right_click()` wires each scope window's GL area (beside its drop target) to a menu
that acts on **that window's** row set: y axis auto scale, y axis fixed range (the main menu's
dialog, aimed at the window's rows through `FixedRangeContext::rows`), fit, and one
*Remove '<signal>'* per trace on the plot. A detached window's menu also carries **Attach back
to the main window**. What it deliberately does not carry is an x fit: the window follows the
main window's time span, so an x fit here would be undone by the next frame's mirror.

`remove_trace()` and `FixedRangeContext` are generalized to take the row set they act on (the
main window passes its own). Probe: `[scope-probe] rclick=1` asserts the click gesture is wired
per window; the menu build is exercised by the real right-clicks the smoke makes.
This commit is contained in:
Martino Ferrari committed 2026-11-06 08:55:29 +01:00
1 parent b90a99ec39
commit 2924f7627d
5 files changed
+205 -10

No files matched your search

+3 -1
View File
@@ -145,7 +145,9 @@ every frame, and pumps its render — so the two windows never disagree about th
mode or the span. **A signal badge dragged onto a scope window's plot lands there** — the same
drop the main plot takes, into that window's own row set, on the cell the pointer is over — and
the signal page's *Plot on* buttons list **every window**: one group per window (named, `In
"plot 2"`), one button per plot of it.
"plot 2"`), one button per plot of it. A right-click on a scope window's plot opens **its own
menu** — y axis (auto or a fixed range), fit, remove a trace — acting on that window's rows; a
detached window's menu carries **Attach back to the main window** beside them.
mode or the span.
**The window.** The plot is the window. Under it sits a fixed-height **badge bar** (36 px). Its left