ktsu.ImGui.Probes
3.9.0
Prefix Reserved
dotnet add package ktsu.ImGui.Probes --version 3.9.0
NuGet\Install-Package ktsu.ImGui.Probes -Version 3.9.0
<PackageReference Include="ktsu.ImGui.Probes" Version="3.9.0" />
<PackageVersion Include="ktsu.ImGui.Probes" Version="3.9.0" />
<PackageReference Include="ktsu.ImGui.Probes" />
paket add ktsu.ImGui.Probes --version 3.9.0
#r "nuget: ktsu.ImGui.Probes, 3.9.0"
#:package ktsu.ImGui.Probes@3.9.0
#addin nuget:?package=ktsu.ImGui.Probes&version=3.9.0
#tool nuget:?package=ktsu.ImGui.Probes&version=3.9.0
ktsu.ImGui.Probes
Lets a user interface library record where it drew named items, so an automated test can address a widget by name instead of by pixel position.
The package is deliberately tiny and depends on nothing but the ImGui binding. Marking is a cross-cutting concern: widget libraries, dialog libraries and application hosts all want to mark items, and none of them should have to depend on another to do it. Keeping the registry here means a library can be probe-aware without adopting an application framework or a test framework.
Marking an Item
Call immediately after submitting the widget, while it is still the current ImGui item:
if (ImGui.Button("Save"))
{
Save();
}
ImGuiProbes.MarkItem("save");
In production nothing is recording, and the call costs one null check, so a library can mark
unconditionally. MarkItem(prefix, label) builds a qualified name for a component that owns several
items, and MarkRegion(name, min, max) records an explicit rectangle for something drawn manually
rather than submitted as an ImGui item.
Name Qualification
A bare label does not identify an item. Two widgets can share a label, and ImGui keeps them apart through its identifier stack rather than through the label alone, so a name that ignored that context would collide exactly where ImGui does not.
Names are recorded as the current ImGui window, then any pushed scopes, then the item's own name:
ImGuiProbes.PushScope("inspector");
// items marked here become "Settings/inspector/<name>"
ImGuiProbes.PopScope();
ktsu.ImGui.Widgets pushes a probe scope from ScopedId, so anything already scoped for ImGui is
scoped for probes without further work.
Recording
A test host installs a callback and receives every mark:
ImGuiProbes.SetProbe((name, min, max) => record[name] = (min, max));
Enabled is a master switch, independent of whether a probe is installed. Setting it false suppresses
marking without disturbing the callback, which is useful to exclude a hot path from recording, or to
run a scenario twice and confirm the application behaves the same whether or not it is observed.
IsRecording reports whether both conditions hold, and is worth checking before composing a name
that costs something to build.
ktsu.ImGui.App.Testing consumes this package to resolve names to rectangles and click them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Hexa.NET.ImGui (>= 2.2.9)
-
net8.0
- Hexa.NET.ImGui (>= 2.2.9)
-
net9.0
- Hexa.NET.ImGui (>= 2.2.9)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on ktsu.ImGui.Probes:
| Package | Downloads |
|---|---|
|
ktsu.ImGui.Popups
A professional library for modal dialogs and popup components in ImGui.NET, providing message boxes, input prompts with validation (string, int, float), searchable selection lists with type-safe generics, and an advanced filesystem browser with open/save modes, directory navigation, and pattern filtering support. |
|
|
ktsu.ImGui.Widgets
A comprehensive library of custom widgets and UI components for ImGui.NET, featuring radial progress bars with countdown/count-up timers, tabbed interfaces with drag-and-drop support, type-safe combo boxes, resizable divider containers, powerful search boxes with fuzzy matching, icons with event handling, flexible grid layouts, and scoped utilities for IDs and disabling elements. |
|
|
ktsu.ImGui.App.Testing
Headless test harness for ktsu.ImGui.App applications. Renders through a CPU rasterizer with no window, no GPU and no graphics driver, injects input directly into ImGui rather than through the operating system, and advances frames under the test's control so results do not depend on timing. Widgets are addressed by name rather than by coordinate, and rendered frames are captured for measurement in assertions and as artifacts on failure. |
GitHub repositories
This package is not used by any popular GitHub repositories.
## v3.9.0 (minor)
Changes since v3.8.0:
- docs: refer to the host in plain code so the iOS target compiles [patch] ([@matt-edmondson](https://github.com/matt-edmondson))
- feat: let a headless session install its own renderer backend [minor] ([@matt-edmondson](https://github.com/matt-edmondson))
- chore: refresh the API compatibility suppressions [patch] ([@matt-edmondson](https://github.com/matt-edmondson))