Repository navigation
fix(ariadne): windows fit their content, scroll what doesn't fit, and reopen from a Windows menu - #828
Merged
Conversation
… reopen from a Windows menu A window with no size: drew as a 32 px stub in the ImGui backend. On a new window's hidden measuring frame ImGui's size is its 32 px minimum; the backend reported it as the §11.4 geometry, the core persisted it and seeded it back next frame, and SetWindowSize with a size cancels ImGui's auto-fit. volren_bunny / volslice_bunny / mesh_lab showed every control window as one stub at (60, 60). ImGui backend: - report no geometry while a window is still fitting (backend.h documents the contract) - measure labeled widgets at ImGui's auto-resize width (16 font sizes) while fitting - stop the fit at the view's edge, never below an authored min: - give every window a horizontal scroll bar as well as the vertical one - flow windows with no pos: and no persisted geometry down the left edge in columns, instead of stacking at ImGui's (60, 60); a window opened later goes after the rest - reserve label room for combo and colour widgets too, like sliders and inputs FTXUI: an unsized window stops at the screen's edge, and a body larger than its window becomes a frame with a scroll bar. Windows menu (core, so ImGui, FTXUI and the tvision host all get it): a ticked item per window, bound to tree.<id>.open, for the windows the document's own menus don't already toggle. It goes after the document's menus; a document with no menubar but a closable window gets one for it. Every window now honours tree.<id>.open. A `- windows_menu: <title>` menubar entry places it, a top-level `windows_menu: false` turns it off. Docs: ARIADNE.md §5.8 (sizing) and §5.9 (Windows menu); the stub caveats are gone. Tests: cvcgl_imgui_window_fit, cvcgl_imgui_windows_menu (new), ariadne_runtime_test, ariadne_loader_test, ariadne_ftxui_test. Goldens: windows.png (the over-wide line scrolls; the menubar for its closable window) and menus.png (the Windows menu), regenerated under Mesa llvmpipe.
Owner
Author
|
Local run on 637dced (Windows, Release + shared): |
Master's #820 landed its own window fitting in the ImGui backend: a window with no size: fits its widgets every frame and takes no size from its persisted geometry, windows with no pos: stack down the left of the work area around the windows that stand where they are, a sized window scrolls both ways, and an authored pos: is measured from below the menu bar. That replaces this branch's ImGui sizing (fit once, report no geometry while fitting, its own flow cursor), so ImGuiBackend.h/.cpp and cvcgl_imgui_window_fit.cpp are master's, and backend.h's contract and the roadmap's §11.4 text are master's again. The runtime test of the dropped contract (a fitting window's geometry is not persisted) goes with it. What this branch still adds on top: - The core's built-in Windows menu (ARIADNE.md §5.9), and tree.<id>.open honoured by every window. A host's menus count as the document's, so arigl's Settings > Keys... keeps the Keys window out of it; under a host without such a menu the Windows menu is how the Keys window opens. A menu already in the bar with the Windows menu's title, like fem_gallery.ari's own Windows menu, now takes the built-in items after a separator instead of a second menu of the same name in the bar. - The FTXUI backend stops an unsized window at the screen's edge and scrolls a body that does not fit. - In a sized ImGui window a combo or colour widget reserves room for its label, like a slider or an input. The loader takes both master's keys: and this branch's windows_menu: (block, schema, widget type). ARIADNE.md §5.8 describes master's ImGui sizing; §5.9 gains the host-menu and same-title rules. The duplicate cvcgl_imgui_window_fit target from the merge is gone. cvcgl_imgui_windows_menu also checks that a reopened window takes its place in the column without landing on another, and that a window stands below the menu bar the Windows menu brings. New runtime tests cover the same-title merge and host menus. menus.png and windows.png are master's here. Both documents now draw the Windows menu (menus.ari after Help; windows.ari, whose closable window gives it a bar, with every window below that bar), so both goldens need regenerating under llvmpipe.
The Windows menu now draws in both pictures: after Help in menus, and as the only menu in windows' bar, with every window below it. Both are the llvmpipe renders from CI (run 40729298897, the ari-golden-Linux-libcvc-release artifact), as CVC_UPDATE_GOLDEN=1 writes them under the reference renderer (ARIADNE.md section 12).
transfix
added a commit
that referenced
this pull request
Oct 29, 2026
The project version and the cvcpkg recipe family move to 3.7.4. Every recipe is at cvc_revision 1 already, so none restarts. 3.7.4 carries the whole plant ledger on every plant (#876): plant_sample's vehicle contact and what each plant measures, the dynamic plants' building and vehicle contacts and attitude, nav_stats' vehicle_hits, cvc/nav/plant_ledger.h, and publish_nav_stats writing every item, n/a where a plant does not measure it. demo3's Ledger screen (CVC-DBG/cvcdbg#256) reads it. It also carries SDL3 owning cvcGL's onscreen window (#829), state_exec's state-incr, state-cas and state-swap (#860), and Ariadne's window fitting (#828) and room relay test counting (#867).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A window with no
size:drew as a 32 px stub in the ImGui backend.volren_bunny,volslice_bunnyandmesh_labshowed every control window as one stub at (60, 60).Cause. On a new window's hidden measuring frame, ImGui's size is its 32 px minimum. The backend reported that as the §11.4 geometry. The core persisted it and seeded it back on the next frame, and
SetWindowSizewith a size > 0 cancels ImGui's auto-fit.What changes
ImGui backend
backend.hdocuments the contract.min:.pos:and no persisted geometry flow down the left edge in columns instead of stacking at ImGui's (60, 60). A window opened later goes after the rest.FTXUI. An unsized window stops at the screen's edge. A body larger than its window becomes a frame with a scroll bar that follows focus.
Windows menu (core, ARIADNE.md §5.9). Requested via the tf_editor work: "the windows should be openable from the main menu if they have been closed".
tree.<id>.open, so a closed window can always be opened again.lsystem_forest's Settings menu andconference_roster's View menu are untouched, and windows made byrepeat:are not listed.tree.<id>.open.- windows_menu: <title>in a menubar places it there; a top-levelwindows_menu: falseturns it off.Docs. ARIADNE.md §5.8 (sizing) and §5.9 (Windows menu). The "collapsed stub" caveats are removed, and the roadmap §3.0.3b has a note on the change.
Tests
cvcgl_imgui_window_fit: headless, 32 checks covering fit, scrolling, small viewport, persisted geometry and authored size winning, flow placement, late-opened windows, and row splits. 16 of the checks fail against master's backend.cvcgl_imgui_windows_menu: closes a window, then reopens it by clicking through ImGui input.ariadne_runtime_test: fit contract, plus 4 Windows-menu cases.ariadne_loader_test:windows_menuparsing.ariadne_ftxui_test: 4 sizing/scroll cases and reopening from the menu. The hosted test now expects the Windows menu in the host's menu model.windows.pngchanges because its over-wide line now scrolls and its closable window brings a menubar.menus.pngchanges because of the Windows menu title. Both were regenerated under Mesa llvmpipe on Windows (mesa-dist-win 26.1.7, the CI pin); the other three goldens match that renderer within 1.Verified (Windows, Release + shared)
ctest -R "Ariadne|ariadne|cvcgl"passed 505/507. The two failures were fixed (a test's glyph expectation, and the windows golden) and re-run green.arigl snapshotof the three demos andhello.ari, plus an interactivearigl run, show every window open, fitted and non-overlapping.