layout: detach a figure to its own window, and attach it back
Beside each figure row's full-screen toggle -- same corner, same show-on-approach reveal, same one-figure/never-maximized rules -- a **detach** button moves the figure into a window of its own: copied into a new scope window (titled "detached") and removed from the main window's rows, which then save the change. The detached window is the one scope window with an **attach** control: an overlay wrapping its GL area, a button in the top-right corner revealed by the same pointer-proximity rule from the overlay's own motion controller, and one click appends the figure back to the main window's rows (cells, weights, every slot's signal in its colour) and closes the window. `detach_figure()` / `attach_scope_window()`; the reveal and placement share the maximize buttons' geometry and pointer state, per row. A detached window's rows participate everywhere a scope window's do (drops, the signal page's *Plot on* groups), which the previous commit gave them. Probe: `[maximize-probe]` now counts the detach buttons (`detach_single=0` for one figure, `detach=2` for two, absent while maximized) and reads their corner reveal (`detach_near=1 detach_other=0`, the pointer parked on the detach button's own centre -- the strictest zone of the pair). Real-pointer smoke: hover reveals the pair, clicking detach opens the window, clicking attach closes it with the figure back. Docs: README, the Mallard layout page, the probe readings, the layout invariant, and the tour's plot stop.
This commit is contained in:
1 parent
51b4fad386
commit
5ed75eb470
7 files changed
+303
-28
No files matched your search
@@ -1422,19 +1422,28 @@ Measured output (viewport pixels; the absolute numbers are the headless window's
|
||||
## `[maximize-probe]`
|
||||
|
||||
`UDPSCOPE_PROBE_MAXIMIZE_MS`. The one-click **full-screen row** toggle, exercised through the
|
||||
`RowSet` call the button's handler makes. **Do not run it with `UDPSCOPE_ENABLE_ALL_MS`**: the
|
||||
enable-all probe's second leg clears the front plot two seconds in, and this probe's `before`
|
||||
read then names an empty row (`row0=`) -- a probe race, not a defect. The full-screen recipe:
|
||||
`RowSet` call the button's handler makes (a probe cannot click an overlay button the frame
|
||||
places), arranged as two single-cell rows with one signal each. The two reads after it are the
|
||||
**corner reveal**: no pointer over the area, then a pointer position in the first row's corner
|
||||
(set directly -- the probe owns the state the motion controller fills). Measured output:
|
||||
|
||||
```
|
||||
[maximize-probe] single_buttons=0 before: rows=2 frows=2 row0=sine row1=square buttons=2; max: rows=1 frows=1 flag=1 row0=sine; back: rows=2 row0=sine row1=square flag=0
|
||||
[maximize-probe] corner: hidden_when_off=1 shown_when_near=1 other_row=0
|
||||
[maximize-probe] single_buttons=0 detach_single=0 before: rows=2 frows=2 row0=sine row1=square buttons=2 detach=2; max: rows=1 frows=1 flag=1 row0=sine; back: rows=2 row0=sine row1=square flag=0
|
||||
[maximize-probe] corner: hidden_when_off=1 shown_when_near=1 other_row=0 detach_near=1 detach_other=0
|
||||
```
|
||||
|
||||
- `single_buttons=` is the toggle count *before* the second row is added, while the layout is
|
||||
the default one figure: **0** — one figure has nothing to enlarge *to*, so it carries no
|
||||
button (and `buttons=` is what the same count reads once the second row exists).
|
||||
`detach_single=` is the same for the **detach** buttons: **0** — detaching the only figure
|
||||
would leave the main window with nothing to draw — and `detach=2` once the second row exists
|
||||
(and **0** again on the `max:` line, where a maximized layout has hidden its rows).
|
||||
- the corner leg's `detach_near=1 detach_other=0` read the detach buttons with the same pointer
|
||||
the maximize toggle reads: both come out together at the corner, the other row's stay hidden.
|
||||
The pointer sits on the detach button's own centre — its zone is the strictest of the pair.
|
||||
- `before:` is the arrangement as set: two plots, two figure rows, the signals on their rows,
|
||||
and `buttons=` one overlay toggle per figure row (the toggles are on screen whether or not
|
||||
the layout editor is up).
|
||||
|
||||
Reference in new issue
Block a user