diff --git a/CMakeLists.txt b/CMakeLists.txt index c51039f..b37e51b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,9 @@ target_compile_definitions(dasModuleImplot PRIVATE IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1 IMPLOT_DISABLE_OBSOLETE_FUNCTIONS=1 IMGUI_API=${IMGUI_IMPORT_ATTR} + # Must match dasImgui's ImWchar width, or ImWchar-taking imgui symbols mangle as + # unsigned short here and unsigned int there, and the link fails on FindGlyph. + IMGUI_USE_WCHAR32=1 $<$:DAS_NO_ASSERTIONS> $<$:DAS_NO_ASSERTIONS> $<$:DAS_NO_ASSERTIONS> diff --git a/bind/bind_implot.das b/bind/bind_implot.das index cad4c16..60b4e4c 100644 --- a/bind/bind_implot.das +++ b/bind/bind_implot.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require cbind/cbind_boost require daslib/fio require daslib/defer diff --git a/daslib/imgui_implot_app.das b/daslib/imgui_implot_app.das index 1dbc29d..ec89279 100644 --- a/daslib/imgui_implot_app.das +++ b/daslib/imgui_implot_app.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 module imgui_implot_app public @@ -20,12 +21,9 @@ def private implot_module_root() : string { def public with_implot_app(feature_path : string; body : block<(app : ImguiApp) : void>) { - //! Spawn `daslang-live` against an implot feature with BOTH the dasImgui and - //! dasImguiImplot modules loaded, run `body` while alive, then shut down. Thin - //! wrapper over `with_imgui_app`: passes the implot module as an extra - //! `-load_module` (dasImgui is always loaded by with_imgui_app, and the implot - //! module requires it, so it must follow) and resolves the - //! `modules/dasImguiImplot/` feature prefix under the implot root. + //! Spawn `daslang-live` against an implot feature with BOTH dasImgui and + //! dasImguiImplot loaded, run `body` while alive, then shut down. The implot module + //! is an extra `-load_module` and MUST follow dasImgui, which it requires. let root = implot_module_root() with_imgui_app(feature_path, [root], root, "modules/dasImguiImplot/", body) } @@ -34,10 +32,9 @@ def public with_implot_recording_app(feature_path : string; output_apng_basename : string; max_seconds : int; body : block<(app : ImguiApp) : void>) { - //! Native-fps recording session against an implot tutorial feature (the common - //! case). Delegates to the fps overload — gen2's trailing-block sugar can't see - //! through a default parameter between the last positional and the block, so the - //! overload pair keeps call sites clean. + //! Native-fps recording session against an implot tutorial feature. A separate + //! overload rather than a default `fps`, because gen2's trailing-block sugar can't + //! see through a default parameter between the last positional and the block. with_implot_recording_app(feature_path, output_apng_basename, max_seconds, RECORD_FPS, body) } @@ -47,9 +44,8 @@ def public with_implot_recording_app(feature_path : string; fps : int; body : block<(app : ImguiApp) : void>) { //! Record an `.apng` of an implot feature with BOTH dasImgui and dasImguiImplot - //! loaded — the recording counterpart of `with_implot_app`. Threads the implot - //! module as an extra `-load_module`, resolves a relative `feature_path` under the - //! implot root, and roots the `.apng` asset dir there too. + //! loaded — the recording counterpart of `with_implot_app`. Relative `feature_path` + //! and the `.apng` asset dir both resolve under the implot root. let root = implot_module_root() with_recording_app(feature_path, output_apng_basename, max_seconds, fps, [root], root, root, body) diff --git a/daslib/imgui_implot_boost.das b/daslib/imgui_implot_boost.das index 5d7455a..0d76d09 100644 --- a/daslib/imgui_implot_boost.das +++ b/daslib/imgui_implot_boost.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false @@ -77,26 +78,26 @@ def public with_colormap(cmap : ImPlotColormap; blk : block) { // Push one ImPlotCol color override (e.g. ImPlotCol.Line) for the body. def public with_style_color(idx : ImPlotCol; col : float4; blk : block) { - PushStyleColor(idx, col) + implot::PushStyleColor(idx, col) invoke(blk) - PopStyleColor(1) + implot::PopStyleColor(1) } // Push one ImPlotStyleVar override for the body — float / int / float2 forms. def public with_style_var(idx : ImPlotStyleVar; value : float; blk : block) { - PushStyleVar(idx, value) + implot::PushStyleVar(idx, value) invoke(blk) - PopStyleVar(1) + implot::PopStyleVar(1) } def public with_style_var(idx : ImPlotStyleVar; value : int; blk : block) { - PushStyleVar(idx, value) + implot::PushStyleVar(idx, value) invoke(blk) - PopStyleVar(1) + implot::PopStyleVar(1) } def public with_style_var(idx : ImPlotStyleVar; value : float2; blk : block) { - PushStyleVar(idx, value) + implot::PushStyleVar(idx, value) invoke(blk) - PopStyleVar(1) + implot::PopStyleVar(1) } // Clip drawing to the plot area (optionally expanded by `expand` px) for the body. @@ -131,37 +132,37 @@ def public with_legend_popup(label_id : string; mouse_button : int; blk : block) def public with_drag_drop_source_item(label_id : string; blk : block) { if (BeginDragDropSourceItem(label_id)) { // native default flags = 0 invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } def public with_drag_drop_source_item(label_id : string; flags : int; blk : block) { if (BeginDragDropSourceItem(label_id, flags)) { invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } def public with_drag_drop_source_plot(blk : block) { if (BeginDragDropSourcePlot()) { // native default flags = 0 invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } def public with_drag_drop_source_plot(flags : int; blk : block) { if (BeginDragDropSourcePlot(flags)) { invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } def public with_drag_drop_source_axis(axis : ImAxis; blk : block) { if (BeginDragDropSourceAxis(axis)) { // native default flags = 0 invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } def public with_drag_drop_source_axis(axis : ImAxis; flags : int; blk : block) { if (BeginDragDropSourceAxis(axis, flags)) { invoke(blk) - EndDragDropSource() + implot::EndDragDropSource() } } @@ -169,19 +170,19 @@ def public with_drag_drop_source_axis(axis : ImAxis; flags : int; blk : block) { def public with_drag_drop_target_plot(blk : block) { if (BeginDragDropTargetPlot()) { invoke(blk) - EndDragDropTarget() + implot::EndDragDropTarget() } } def public with_drag_drop_target_axis(axis : ImAxis; blk : block) { if (BeginDragDropTargetAxis(axis)) { invoke(blk) - EndDragDropTarget() + implot::EndDragDropTarget() } } def public with_drag_drop_target_legend(blk : block) { if (BeginDragDropTargetLegend()) { invoke(blk) - EndDragDropTarget() + implot::EndDragDropTarget() } } diff --git a/daslib/imgui_implot_boost_v2.das b/daslib/imgui_implot_boost_v2.das index 8b08bac..7eb5185 100644 --- a/daslib/imgui_implot_boost_v2.das +++ b/daslib/imgui_implot_boost_v2.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false @@ -36,9 +37,8 @@ def private finalize_state(widget_ident : string; kind : string; var state : aut struct LegendEntry { //! One legend entry of a `plot` scope, captured per frame into `PlotScopeState.legend`. - //! Lets a test / recording target a synthetic legend-toggle click (`legend_toggle`) at the - //! exact rect ImPlot hit-tests, and verify the series hid / showed (`shown`). The rect is - //! screen-space pixels `[x0,y0]`–`[x1,y1]`; entries are in legend (submission) order. + //! Lets a test target a synthetic `legend_toggle` click at the exact rect ImPlot hit-tests + //! and verify the series hid / showed. Screen-space px, in legend (submission) order. series : string //! series label (the `label_id` passed to plot_line / etc.); `label` is a reserved word shown : bool //! series currently visible (false after a legend-toggle hide) hovered : bool //! legend entry is hovered this frame (sync gate for a synthetic toggle click) @@ -49,11 +49,9 @@ struct LegendEntry { } struct PlotScopeState { - //! Per-frame snapshot of a `plot` scope, pasted into the widget's snapshot - //! payload by `stateless_finalize`. Geometry is screen-space pixels; - //! limits / mouse are in plot DATA coordinates. Everything but `visible` is - //! captured between BeginPlot/EndPlot — the only window where ImPlot's query - //! functions are valid — so the fields are absent on a clipped/collapsed plot. + //! Per-frame snapshot of a `plot` scope, pasted into the widget's snapshot payload by + //! `stateless_finalize`. Geometry is screen-space px; limits / mouse are plot DATA coords. + //! All but `visible` is captured between BeginPlot/EndPlot, ImPlot's only valid query window. @optional pos : float2 //! plot area top-left, screen px @optional plot_size : float2 //! plot area size, screen px @optional x_min : double //! X axis lower limit (data coords) @@ -72,20 +70,16 @@ struct PlotScopeState { @optional mouse_x : double //! GetPlotMousePos().x (data coords) @optional mouse_y : double //! GetPlotMousePos().y @optional legend_retries : int //! internal: frames left to re-read not-yet-resolved legend labels - visible : bool //! BeginPlot returned true (plot drew this frame) + visible : bool //! BeginPlot returned true; when false the captured fields above are absent legend : array //! per-series legend entries (label / shown / clickable rect), legend order; empty when not visible } let private LEGEND_LABEL_RETRY_FRAMES = 240 // bounded window to resolve a just-registered item's label +// Read the legend AFTER EndPlot, by title: rect / shown are written during EndPlot's legend render. +// LegendEntryLabel returns a das-heap-owned copy (issue #9), so cached labels survive ImPlot resetting +// its Legend.Labels next frame; the cache is rebuilt only when the entry set size changes. def private capture_legend(var state : PlotScopeState; title : string) { - // Read the plot's legend into the snapshot AFTER EndPlot, by title — the rect / shown are - // written during EndPlot's legend render, so GetPlot(title) gives current-frame values. - // LegendEntryLabel returns a das-heap-owned copy (it allocateString's into our context — see - // the C++ forwarder, issue #9), so the cached label stays valid even after ImPlot resets its - // internal Legend.Labels buffer next frame. We cache labels (rebuild only when the entry set - // changes) rather than re-allocating every frame. Rects / shown are cheap scalars, refreshed - // every frame. (A relabel with no count change reads stale — exotic for a steady plot.) let n = LegendEntryCount(title) if (length(state.legend) != n) { state.legend |> clear() @@ -95,10 +89,7 @@ def private capture_legend(var state : PlotScopeState; title : string) { } state.legend_retries = LEGEND_LABEL_RETRY_FRAMES } - // A newly-registered item reports into the legend (count / rect / show) a frame or two before - // ImPlot resolves its label, so the initial cache can hold "". Re-read empty labels for a bounded - // window after the entry set last changed, then stop — resolves the lag without per-frame string - // churn, and terminates even if a label were ever legitimately empty (a hidden "##id"). + // ImPlot resolves a new item's label a frame or two after its legend slot, so re-read empty ones. let resolving = state.legend_retries > 0 for (i in range(n)) { let r = LegendEntryRect(title, i) @@ -119,11 +110,9 @@ def private capture_legend(var state : PlotScopeState; title : string) { [container] def plot(var state : PlotScopeState; title : string; size : float2; flags : ImPlotFlags; blk : block) { - //! `BeginPlot(title, size, flags)` / `EndPlot()` — only-on-true pairing, so the - //! body and the state capture run iff the plot is visible. Registers as kind - //! "implot_plot"; the snapshot payload mirrors PlotState (geometry + axis limits - //! + hovered + mouse-plot-pos), captured in-scope where ImPlot's queries are valid. - //! Items submitted in the body nest under this plot's snapshot path. + //! `BeginPlot(title, size, flags)` / `EndPlot()` — only-on-true pairing, so the body and + //! the state capture run iff the plot is visible. Registers as kind "implot_plot" with a + //! PlotScopeState payload; items in the body nest under this plot's snapshot path. let im_open = BeginPlot(title, size, flags) state.visible = im_open var box = float4(0.0f, 0.0f, 0.0f, 0.0f) @@ -252,7 +241,7 @@ def public set_axes(x_axis : ImAxis; y_axis : ImAxis) { } // ===== Next-item styling (SetNext*) ===== -// + // Auto-sentinels mirror ImPlot's defaults: weight/size/alpha = -1 ("auto"), // color = float4(0,0,0,-1) (IMPLOT_AUTO_COL). Pass an explicit value to override. @@ -290,7 +279,7 @@ def public next_axes_to_fit() { } // ===== Plot items (float | double | int) ===== -// + // Single OR-typed wrappers over the type-overloaded native forwarders. The paired // x/y forms tie both arrays to one element type T (mixed-type x/y has no native // overload). `flags` is the per-item ImPlot*Flags as a bare int (all are typedef int). @@ -440,9 +429,8 @@ def public plot_bar_groups(label_ids : array; item_count : int; group_count : int; group_size : double = 0.67lf; shift : double = 0.0lf; flags : int = 0) { //! `PlotBarGroups(...)` — `item_count` series clustered into `group_count` groups. - //! `values` is a flat `item_count*group_count` row-major matrix (`values[item*group_count+group]`) - //! and `label_ids` names one series per row. The Stacked flag stacks within a group, Horizontal - //! flips the bars onto the y-axis. + //! `values` is a flat row-major `item_count*group_count` matrix (`values[item*group_count+group]`); + //! `label_ids` names one series per row. Stacked stacks within a group, Horizontal flips to y. PlotBarGroups(label_ids, values, item_count, group_count, group_size, shift, flags) } @@ -457,15 +445,10 @@ def public plot_pie_chart(label_ids : array; } // ===== Drag tools ===== -// -// Interactive handles INSIDE a plot scope: the user drags them and their bound -// value updates in place. Unlike the items above, a drag tool owns mutable state -// (the value being dragged), so the caller passes a PERSISTENT state struct (a -// global) — the wrapper mutates it through `addr` each frame and serializes it -// into the snapshot under a path nested below the plot (`/`), with a -// bbox computed from the handle's DATA position via PlotToPixels (a drag tool -// submits no normal ImGui item, so GetItemRect — what widget_finalize captures — -// would be stale). That bbox is what a test/playwright synth-drags onto. + +// Interactive handles INSIDE a plot scope owning mutable state: the caller passes a PERSISTENT +// (global) state struct, mutated each frame and serialized under `/`. The bbox comes +// from PlotToPixels(DATA pos) — a drag tool submits no ImGui item, so GetItemRect would be stale. struct DragPointState { //! A draggable (x,y) point handle. x/y are plot DATA coordinates and update in @@ -572,12 +555,10 @@ def public pixels_to_plot(px : float2; } // ===== Colormaps ===== -// -// A colormap maps a normalized t in [0,1] to a color. Push one (with_colormap / -// push_colormap) and the auto-colored items + heatmaps inside it sample their colors -// from it; colormap_scale draws the matching colorbar legend. `cmap` is the -// ImPlotColormap enum (Deep / Viridis / Plasma / Jet / Greys / …) — passed straight -// through (the binding exposes ImPlot's typedef-int colormap handle AS the enum). + +// A colormap maps normalized t in [0,1] to a color: push one (with_colormap / push_colormap) and +// the auto-colored items + heatmaps inside sample from it; colormap_scale draws the colorbar. +// `cmap` is ImPlotColormap (Deep / Viridis / …) — ImPlot's typedef-int handle exposed AS the enum. def public push_colormap(cmap : ImPlotColormap) { //! `PushColormap(cmap)` — make `cmap` the active colormap for subsequent items. diff --git a/daslib/imgui_implot_playwright.das b/daslib/imgui_implot_playwright.das index 349b0c2..0540026 100644 --- a/daslib/imgui_implot_playwright.das +++ b/daslib/imgui_implot_playwright.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 module imgui_implot_playwright public @@ -103,8 +104,7 @@ let private AXIS_GUTTER_PX = 18.0f // into the tick-label strip just outside t let private AXIS_DRAG_STEPS = 6 def private continuous_axis_drag(app : ImguiApp; from_pt : tuple; to_pt : tuple) { - // ImPlot integrates io.MouseDelta per frame, so a pan needs a CONTINUOUS multi-waypoint drag (a - // single from->to jump does not move the axis). Walk the cursor across waypoints, button held. + // ImPlot integrates io.MouseDelta per frame: a pan needs a CONTINUOUS multi-waypoint drag, and a single from->to jump does not move the axis. let dur = 120 let endt = 120 + AXIS_DRAG_STEPS * dur var ev <- [ @@ -126,13 +126,9 @@ def private continuous_axis_drag(app : ImguiApp; from_pt : tuple; } def public drag_axis(s : PlotSession; axis : ImAxis; delta_px : float) { - //! Continuous drag along ONE axis's gutter (the tick-label strip just outside the data area), - //! panning ONLY that axis — the multi-axis "rescale just this one" gesture, distinct from a - //! plot-body pan (which moves every axis at once). Locates the gutter from the plot geometry - //! (pos / plot_size) in the snapshot: Y axes drag vertically by `delta_px`, X axes horizontally. - //! Supports the X1 / X2 / Y1 / Y2 gutters (primary + first auxiliary). Silent no-op when the plot - //! isn't visible or `axis` is unsupported — gate the effect with `wait_for_axis_limit_changed` / - //! `record_check_changed` on the axis's range field (e.g. "y2_max"). + //! Continuous drag along ONE axis's gutter (the tick-label strip outside the data area), panning + //! ONLY that axis — unlike a plot-body pan, which moves every axis. `delta_px` is vertical for Y + //! axes, horizontal for X; X1/X2/Y1/Y2 only. No-op if not visible — gate with `wait_for_axis_limit_changed`. var snap = snapshot(s.app) let p = plot_payload(snap, s) return if (!(p?["visible"] ?? false)) @@ -154,11 +150,10 @@ def public drag_axis(s : PlotSession; axis : ImAxis; delta_px : float) { } // ===== drag-tool handles ===== -// -// A drag tool registers under `/` with the handle's screen bbox, so the -// generic `drag(app, handle_path(s, id), dx, dy)` presses its center and drags it. -// These readers pull the bound VALUE out of the handle's payload; `wait_for_point_moved` -// gates a synthetic drag landing (value moved off its baseline) before asserting. + +// A drag tool registers under `/` with the handle's screen bbox, so the generic +// `drag(app, handle_path(s, id), dx, dy)` presses its center and drags it. These readers pull the +// bound VALUE out of the payload; `wait_for_point_moved` gates a synthetic drag before asserting. def public handle_path(s : PlotSession; id : string) : string { //! Snapshot path of a drag handle declared as `` inside this session's plot. @@ -241,11 +236,10 @@ def public wait_for_hovered(s : PlotSession; expected : bool = true; max_frames } // ===== legend entries ===== -// + // The v2 `plot` scope serializes its per-series legend (label / shown / clickable rect) into -// `payload.legend`. These helpers find an entry by series label so a test reads as intent -// ("toggle the cos series, expect it hidden") and a recording drives a REAL synthetic click at -// the exact rect ImPlot hit-tests — clicking a legend entry hides / shows that series. +// `payload.legend`. These helpers find an entry by series label so a recording drives a REAL +// synthetic click at the exact rect ImPlot hit-tests — clicking an entry hides / shows the series. struct LegendEntryView { found : bool //! a legend entry with this label was present in the snapshot @@ -285,12 +279,9 @@ def public series_shown(var snap : JsonValue?; s : PlotSession; series : string) } def public legend_toggle(s : PlotSession; series : string) { - //! Synthesize a REAL left-click on the `series` legend entry, toggling its visibility - //! (ImPlot hides / shows the series). Moves the cursor onto the entry, waits until it reports - //! hovered (so the press can't batch ahead of HoveredId — the windowed-vsync press-before-hover - //! race), then clicks in place and blocks until the gesture settles. Silently no-ops when the - //! entry is absent OR hover never registers — the caller MUST gate the effect with - //! `wait_for_series_shown`. + //! Synthesize a REAL left-click on the `series` legend entry, toggling its visibility. Waits for + //! the entry to report hovered before pressing, so the click can't batch ahead of HoveredId (the + //! windowed-vsync race). No-op if absent or never hovered — MUST gate on `wait_for_series_shown`. var snap = snapshot(s.app) let v = legend_entry(snap, s, series) return if (!v.found) @@ -309,9 +300,8 @@ def public legend_toggle(s : PlotSession; series : string) { def public wait_for_legend_hover(s : PlotSession; series : string; expected : bool = true; max_frames : int = 300) : JsonValue? { //! Poll until the `series` legend entry's hover state equals `expected` — the sync gate for - //! `legend_toggle`: after `move_to` onto the entry, this confirms ImPlot registered the hover - //! before the press, so the click can't batch ahead of `HoveredId` (the windowed-vsync - //! press-before-hover race). Bounded; returns the matching snapshot or null on timeout. + //! `legend_toggle`: confirms ImPlot registered the hover before the press, so the click can't + //! batch ahead of `HoveredId`. Bounded; returns the matching snapshot or null on timeout. return wait_until(s.app, max_frames) $(var snap) { return legend_entry(snap, s, series).hovered == expected } @@ -320,10 +310,8 @@ def public wait_for_legend_hover(s : PlotSession; series : string; expected : bo def public wait_for_series_shown(s : PlotSession; series : string; expected : bool; max_frames : int = 300) : JsonValue? { //! Poll until the `series`' legend entry is PRESENT and its visibility equals `expected` — the - //! gate for a `legend_toggle` actually landing. Requiring presence is deliberate: `series_shown` - //! reads false for both hidden AND absent, so gating on it alone would let "wait for hidden" - //! pass on a missing series (telemetry gone / wrong path) — a false-positive gate. Returns the - //! matching snapshot or null on timeout. + //! gate for a `legend_toggle` landing. Presence is required deliberately: `series_shown` reads + //! false for both hidden AND absent, so alone it would pass "wait for hidden" on a gone series. return wait_until(s.app, max_frames) $(var snap) { let e = legend_entry(snap, s, series) return e.found && e.shown == expected diff --git a/examples/tutorial/bar_groups_and_pie.das b/examples/tutorial/bar_groups_and_pie.das index 864e193..21730ff 100644 --- a/examples/tutorial/bar_groups_and_pie.das +++ b/examples/tutorial/bar_groups_and_pie.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/colormaps_and_style.das b/examples/tutorial/colormaps_and_style.das index 9f0e66c..66944e2 100644 --- a/examples/tutorial/colormaps_and_style.das +++ b/examples/tutorial/colormaps_and_style.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/drag_tools.das b/examples/tutorial/drag_tools.das index 9267795..15d38fb 100644 --- a/examples/tutorial/drag_tools.das +++ b/examples/tutorial/drag_tools.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/heatmap_histogram.das b/examples/tutorial/heatmap_histogram.das index b88c4a3..689c134 100644 --- a/examples/tutorial/heatmap_histogram.das +++ b/examples/tutorial/heatmap_histogram.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/line_plot.das b/examples/tutorial/line_plot.das index 81e3de9..43d79ed 100644 --- a/examples/tutorial/line_plot.das +++ b/examples/tutorial/line_plot.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/multi_axes.das b/examples/tutorial/multi_axes.das index 1cce2d0..a18599f 100644 --- a/examples/tutorial/multi_axes.das +++ b/examples/tutorial/multi_axes.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/multi_series.das b/examples/tutorial/multi_series.das index b41c492..3ca7305 100644 --- a/examples/tutorial/multi_series.das +++ b/examples/tutorial/multi_series.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/query_and_hover.das b/examples/tutorial/query_and_hover.das index 7d0dc9a..deea728 100644 --- a/examples/tutorial/query_and_hover.das +++ b/examples/tutorial/query_and_hover.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/realtime_scroll.das b/examples/tutorial/realtime_scroll.das index f06a471..7b0014f 100644 --- a/examples/tutorial/realtime_scroll.das +++ b/examples/tutorial/realtime_scroll.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/shaded_and_stairs.das b/examples/tutorial/shaded_and_stairs.das index e00839b..6208a3d 100644 --- a/examples/tutorial/shaded_and_stairs.das +++ b/examples/tutorial/shaded_and_stairs.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/examples/tutorial/subplots.das b/examples/tutorial/subplots.das index 1625a05..86a07bf 100644 --- a/examples/tutorial/subplots.das +++ b/examples/tutorial/subplots.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui/imgui_harness require imgui/imgui_containers_builtin diff --git a/tests/integration/record_bar_groups_and_pie.das b/tests/integration/record_bar_groups_and_pie.das index eaeb4f5..22fe561 100644 --- a/tests/integration/record_bar_groups_and_pie.das +++ b/tests/integration/record_bar_groups_and_pie.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_colormaps_and_style.das b/tests/integration/record_colormaps_and_style.das index 3823696..2e6b5cd 100644 --- a/tests/integration/record_colormaps_and_style.das +++ b/tests/integration/record_colormaps_and_style.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_drag_tools.das b/tests/integration/record_drag_tools.das index 93e6f03..1c3971a 100644 --- a/tests/integration/record_drag_tools.das +++ b/tests/integration/record_drag_tools.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_heatmap_histogram.das b/tests/integration/record_heatmap_histogram.das index edca44c..7eab450 100644 --- a/tests/integration/record_heatmap_histogram.das +++ b/tests/integration/record_heatmap_histogram.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_line_plot.das b/tests/integration/record_line_plot.das index d76fd56..4a5e01c 100644 --- a/tests/integration/record_line_plot.das +++ b/tests/integration/record_line_plot.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_multi_axes.das b/tests/integration/record_multi_axes.das index ece5ff4..88c747a 100644 --- a/tests/integration/record_multi_axes.das +++ b/tests/integration/record_multi_axes.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_multi_series.das b/tests/integration/record_multi_series.das index fc26c27..e41b19d 100644 --- a/tests/integration/record_multi_series.das +++ b/tests/integration/record_multi_series.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_query_and_hover.das b/tests/integration/record_query_and_hover.das index 33bb133..8d6c40a 100644 --- a/tests/integration/record_query_and_hover.das +++ b/tests/integration/record_query_and_hover.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_realtime_scroll.das b/tests/integration/record_realtime_scroll.das index d566a54..eccb78c 100644 --- a/tests/integration/record_realtime_scroll.das +++ b/tests/integration/record_realtime_scroll.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_shaded_and_stairs.das b/tests/integration/record_shaded_and_stairs.das index b38f41f..f935f0f 100644 --- a/tests/integration/record_shaded_and_stairs.das +++ b/tests/integration/record_shaded_and_stairs.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/record_subplots.das b/tests/integration/record_subplots.das index df87f29..11cef00 100644 --- a/tests/integration/record_subplots.das +++ b/tests/integration/record_subplots.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false @@ -23,10 +24,9 @@ let COS = "PLOT_WIN/GRID/P_COS" let LEAD_MS = 800u let HOLD_TOL = 0.5lf // a non-boxed cell's range must not drift more than this (data units) -// Box-select zoom is a RIGHT-button drag (ImPlot's default Select binding): press inside the -// cell, drag a box, release -> the cell zooms to the box. Walk a few waypoints so the rubber -// band is visible on screen. Unlike a pan, the box is press-corner to release-corner (not -// io.MouseDelta integrated), but the waypoints make it read as a deliberate drag. +// Box-select zoom is a RIGHT-button drag (ImPlot's default Select binding): press inside the cell, +// drag a box, release -> the cell zooms to the box. Unlike a pan the box is press-corner to +// release-corner, not io.MouseDelta integrated; the waypoints just make the rubber band visible. def box_zoom(app : ImguiApp; from_pt : tuple; to_pt : tuple) { let steps = 5 let dur = 130 diff --git a/tests/integration/test_axis_limits.das b/tests/integration/test_axis_limits.das index d2e3903..2119f60 100644 --- a/tests/integration/test_axis_limits.das +++ b/tests/integration/test_axis_limits.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_bar_groups_and_pie.das b/tests/integration/test_bar_groups_and_pie.das index f4df1aa..bb58e02 100644 --- a/tests/integration/test_bar_groups_and_pie.das +++ b/tests/integration/test_bar_groups_and_pie.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_colormaps.das b/tests/integration/test_colormaps.das index dba1878..a00e86f 100644 --- a/tests/integration/test_colormaps.das +++ b/tests/integration/test_colormaps.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_drag_tools.das b/tests/integration/test_drag_tools.das index 67bf681..2b329fc 100644 --- a/tests/integration/test_drag_tools.das +++ b/tests/integration/test_drag_tools.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_heatmap_histogram.das b/tests/integration/test_heatmap_histogram.das index 109dbbf..2722080 100644 --- a/tests/integration/test_heatmap_histogram.das +++ b/tests/integration/test_heatmap_histogram.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_line_plot.das b/tests/integration/test_line_plot.das index d79327f..792a96b 100644 --- a/tests/integration/test_line_plot.das +++ b/tests/integration/test_line_plot.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_multi_axes.das b/tests/integration/test_multi_axes.das index bd2d06a..84c30db 100644 --- a/tests/integration/test_multi_axes.das +++ b/tests/integration/test_multi_axes.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false @@ -36,9 +37,8 @@ def test_multi_axes(t : T?) { // Secondary-axis telemetry: Y2 (pressure) is captured, ranging ~[950,1050], independent of Y1. t |> success(abs(plot_axis_limit(m, s, "y2_max") - 1050.0lf) < 1.0lf, "Y2 (pressure) max captured ~1050") // The Y2-routed series' legend label resolves (the first-frame label fix). Poll, don't - // one-shot: ImPlot can resolve the label a few frames after the item first registers, so a - // read on the axis-convergence snapshot races it. Now runs on all platforms — issue #9 (the - // macOS empty/garbage label) is fixed in the LegendEntryLabel forwarder (returns an owned copy). + // one-shot: ImPlot can resolve the label a few frames after the item registers. Runs on all + // platforms — issue #9 (macOS empty/garbage label) is fixed in the LegendEntryLabel forwarder. t |> success(wait_for_series_shown(s, "pressure", true) != null, "pressure series present in legend (Y2 label captured)") // Drag ONLY the Y2 gutter: pressure's range must move while temp (Y1) and X1 stay put — the diff --git a/tests/integration/test_multi_series.das b/tests/integration/test_multi_series.das index 3e91619..fb72503 100644 --- a/tests/integration/test_multi_series.das +++ b/tests/integration/test_multi_series.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_plot_hover.das b/tests/integration/test_plot_hover.das index 75c5644..5ae83ea 100644 --- a/tests/integration/test_plot_hover.das +++ b/tests/integration/test_plot_hover.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_plot_snapshot.das b/tests/integration/test_plot_snapshot.das index b0d07e6..a3a87af 100644 --- a/tests/integration/test_plot_snapshot.das +++ b/tests/integration/test_plot_snapshot.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui require imgui/imgui_harness diff --git a/tests/integration/test_query_and_hover.das b/tests/integration/test_query_and_hover.das index e55a107..63ab3af 100644 --- a/tests/integration/test_query_and_hover.das +++ b/tests/integration/test_query_and_hover.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_realtime_scroll.das b/tests/integration/test_realtime_scroll.das index 2be0020..4be4a44 100644 --- a/tests/integration/test_realtime_scroll.das +++ b/tests/integration/test_realtime_scroll.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_shaded_and_stairs.das b/tests/integration/test_shaded_and_stairs.das index 201a89f..134012b 100644 --- a/tests/integration/test_shaded_and_stairs.das +++ b/tests/integration/test_shaded_and_stairs.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_stats_items.das b/tests/integration/test_stats_items.das index fd546db..1caa031 100644 --- a/tests/integration/test_stats_items.das +++ b/tests/integration/test_stats_items.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui require imgui/imgui_harness diff --git a/tests/integration/test_subplots.das b/tests/integration/test_subplots.das index be80af8..9e27030 100644 --- a/tests/integration/test_subplots.das +++ b/tests/integration/test_subplots.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options indenting = 4 options no_unused_block_arguments = false options no_unused_function_arguments = false diff --git a/tests/integration/test_v1_scopes.das b/tests/integration/test_v1_scopes.das index b4ac8f4..91d770e 100644 --- a/tests/integration/test_v1_scopes.das +++ b/tests/integration/test_v1_scopes.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true require imgui require imgui/imgui_harness diff --git a/utils/implot2rst.das b/utils/implot2rst.das index d4086c4..b1b09e6 100644 --- a/utils/implot2rst.das +++ b/utils/implot2rst.das @@ -1,4 +1,5 @@ options gen2 +options _comment_hygiene = true options rtti = true require daslib/fio