Ui & Plot
The root Viewer application value and complete oa::Plot retained-figure namespace, presented with matching C++ and Python notation.
Examples
Ui
Functions
Classes
0 members
0 members
4 members
─── CvFrame ────────────────────────────────────────────────────────────────
0 members
─── CvOverlay ──────────────────────────────────────────────────────────────
Source8 members
0 members
0 members
10 members
0 members
0 members
One source-anchored glyph quad. anchor is normalized to the source image; offsets and dimensions are compose-target pixels so labels remain readable while the image camera pans and zooms.
Source11 members
upload caller-provided planes. inPlanes and inDtypes must have the same length (1–4). Each span is W*H * sizeof(dtype) bytes. Synchronous.
Decode any stb_image-supported file to planar U8. 1-channel files → gray (channelCount=1). 3-channel files → RGB (channelCount=3). 4-channel files → RGBA (channelCount=4). HDR (.hdr) → planar F32. synchronous (transfer completes on return).
11 members
─── InputSystem ────────────────────────────────────────────────────────────
YAML schema: {version: 1, bindings: [{action, key, modifiers, context, allow_repeat}]}. Loading is transactional for syntax and schema errors. Without yaml-cpp these calls report Unimplemented, never success.
register the reusable Realm tool bindings. This installs named actions with no callbacks; the application owns every operation they trigger: F12 — screenshot ctrl+R — start/stop recording Space — toggle camera ctrl+Z — undo (node graph) ctrl+Y — redo ctrl+S — save F — fit-to-view (node canvas)
0 members
─── KeyAction ──────────────────────────────────────────────────────────────
Source1 members
─── KeyBinding ─────────────────────────────────────────────────────────────
Source14 members
0 members
0 members
0 members
─── Caller-borrowed hit-test records ────────────────────────────────────────
Source0 members
0 members
─── TextLayout ───────────────────────────────────────────────────────────── CPU-side layout: strictly decodes UTF-8, selects explicit per-codepoint font fallback, and uses HarfBuzz for OpenType substitution, positioning, and source-byte clusters over OA's embedded left-to-right coverage. Paragraph BiDi and right-to-left script coverage are intentionally outside this API.
Source8 members
─── TextAtlas ────────────────────────────────────────────────────────────── Manages the device-side coverage atlas and the glyph metadata table.
Selects the nearest generated physical-pixel strike. Returns nullptr for unmapped codepoints or an invalid font/size.
2 members
0 members
0 members
Immutable generated artifact handed from a training/evaluation producer to the viewer. The texture allocation is shared; the timeline token prevents presentation until the producing GPU batch has completed. Replacing a pending frame drops it without ever blocking the training owner.
Source0 members
13 members
Inherits public ViewerLiveSource
Source74 members
─── Ui ──────────────────────────────────────────────────────────────────────
valid after widgets are submitted and until the next beginFrame. This is a flat, caller-borrowed platform-adapter snapshot, not an OA-owned desktop or document tree. bounds are ancestor-clipped physical pixels.
The viewport is required only by top-layer popup/tooltip placement. Viewer supplies its live compose extent. content scale converts the init style's logical geometry into physical pixels; event coordinates and explicit PixelRect values remain physical. Non-finite/non-positive scale is a frame error.
beginPopup/endPopup render through the same deferred UI compositor, but their commands are submitted after every base-layer command. Popup calls must use the same parent scope as openPopup.
Explicit rows hug measured item widths and advance with layout.gap. Column items otherwise stretch across the panel's padded inner width.
Scroll panels retain only interaction/offset state under their stable ID. content coordinates are shifted and every nested draw/hit-test is clipped to the viewport. inContentHeight includes any layout padding. The caller owns content data; endScrollPanel must close the matching begin call.
Borrows the Viewer-owned atlas and allocates completion-tracked dynamic glyph slots. Bind once before the first frame; the atlas must outlive Ui.
Explicit renderer completion and release boundary. Waits every exact frame completion accepted by markFrameSubmitted before releasing pipelines, descriptor slots, and transient upload storage.
Selection is caller-owned. Empty lists, invalid selection indices and invalid popup metrics are reported through recordRender.
One reusable viewport/chart/canvas grid. The default decimal hierarchy is 10-unit minor, 100-unit major, 1000-unit super-major, plus black axes and a subtle theme-derived vertical background gradient.
Host values → heatmap through the same bounded frame-safe upload ring as PlotLine. Intended for compact metric tables and recorded oa::plot figures.
Matrix convenience overload. rows/cols and value type are inferred when omitted, and matrix byte offsets are honored for views.
texture values are engine-checked before recording. Buffer-backed shared leases are retained through the exact markFrameSubmitted completion.
Planar path: blitPlanar.slang handles per-channel dtype conversion + sRGB. inPlanes must remain at a stable address through markFrameSubmitted; that call attaches the exact consumer event used by its non-blocking RAII path.
source stage/access describe the producer's last write made visible to this sampled read. Defaults preserve compute storage-image producers; graphics render targets must pass their color-attachment scopes.
Called once after init, before the first frame. inComposeImageView: vkImageView (as void*) of the compose storage image (set=1, slot 0).
Single-line UTF-8 editor. Returns true only when inOutText changes. The caller owns the value; the field retains bounded local edit history and IME composition state. It supports single/double/triple-click caret/word/all selection, shift and word navigation, scalar-safe deletion, clipboard, ctrl/Cmd+Z redo variants, Home/End, horizontal scrolling, visible native pre-edit and committed UTF-8 input. An external value replacement rebases local undo history; document-level undo remains application policy.
label does not soft-wrap; text wraps to the current panel's inner width. Both honor explicit newlines, require an active panel and a bound text atlas, and report misuse through recordRender instead of dropping text.
Marks transient resources sampled by this frame. Plot buffers are recycled only after the exact engine-owned graphics completion is reached.
draw one adaptive world-space canvas grid in one compute dispatch. Canvas screen coordinates are local to inRect; colors follow the current style.
at most one interactive popup owns pointer/keyboard input. The no-anchor overload anchors to the most recently submitted interactive item. The explicit overload supports context menus and application-defined anchors.
CPU explicit-X/Y metric arrays -> one GPU polyline dispatch. The shader handles arbitrary segment direction without one dispatch per segment.
Finite fractions are clamped to [0, 1]. An empty overlay renders a rounded integer percentage; an explicit overlay is centered without soft wrapping.
Draws a passive compact label/value row. Empty values leave the returned Value rectangle available for a caller-owned editor control.
draw filled or outlined axis-aligned rectangles directly into the GPU compose image. Rectangles must already be clipped to its extent.
draw normalized rectangle records from a bindless GPU buffer in one dispatch. inDstRect maps source-image coordinates into the compose image.
Sliders clamp the referenced value into [min, max] and return true only when it changes. Focused sliders accept arrow-key adjustment (1% of the range, shift=10x, ctrl=0.1x); pointer drags remain captured outside bounds.
Divides an explicit rectangle without beginning either child panel. The caller owns and may persist inOutRatio; it is the first region's fraction of the extent remaining after handleSize. Pointer drags retain capture outside the handle. Focused row splits accept Left/Right, and focused column splits accept Up/Down; shift/ctrl use the shared coarse/fine scale.
Draws one caller-owned tab sequence. Selection and overflow position live in inOutState; close and reorder are returned as requests so OA never owns documents or mutates their order. Left/Right/Home/End navigate the focused sequence and ctrl/Cmd+W requests closure of a closable focused tab.
Returns and clears a focused editor's pending copy/cut payload so the platform layer can publish it without introducing SDL into Ui.
Positioned GPU text primitive for plots, overlays, and other fixed-layout drawing. It does not participate in panel flow; inRect is an absolute compose-space clip/alignment rectangle. Stretch alignment is invalid.
Explicit transport timeline. inOutFraction is normalized to [0, 1]; returns true when pointer scrubbing changes it.
Attaches to the immediately preceding interactive item. tooltip geometry is passive and shares the top-layer command route with popups.
One row of a caller-flattened hierarchy. The caller owns open/selection state and applies open when openChanged is returned. Pointer activation on the disclosure toggles only; activation elsewhere selects. Focused tree rows use Up/Down to select among prior rendered rows, Left/Right to close or open, and Return/Space to activate. Explicit rectangles make the row directly compatible with virtualRows.
Returns the visible half-open row range for the active scroll panel. rows start after layout.padding.top and use inRowHeight + inRowGap stride. Overscan is expressed in rows and is clamped to the item count.
0 members
3 members
0 members
0 members
1 members
─── UiInputState ──────────────────────────────────────────────────────────── Stable per-frame snapshot updated by Ui::beginFrame before widget dispatch.
Source0 members
0 members
0 members
─── Widget config structs ────────────────────────────────────────────────────
Source0 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
5 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
24 members
Windowed or headless application session for inspecting OA images, video, audio and live GPU output. The Viewer owns UI, input, window and presenter state. It either creates one engine for run() or borrows the caller's engine for run(oa::Engine & ); it never creates a second device runtime in that path.
Unified blocking preview front door. Paths are decoder-probed as image, video, then audio and may either own an application engine or borrow the caller's presentation-capable engine. Direct GPU values always borrow the caller's engine and retain the exact completion contract of show().
run the windowed session against an existing presentation-capable engine. The viewer borrows the engine and closes only its presenter/window state.
Headless sink for a ready buffer-backed texture. Image-backed renderer frames use their owning session's saveTo/consumeReadback contract.
Compatibility spelling for blocking one-shot display sinks. Matrix and image overloads record the RGBA8 conversion into the engine's matching private recorder, submit it once, and pass its exact completion into presentation. New code uses preview() so file-backed and direct values share one discoverable verb.
Examples
0 members
0 members
10 members
Non-owning live producer attached to the one Viewer application lifecycle. It may render domain-specific overlays, but it never owns the window, swapchain, input pump or presentation submission.
24 members
Viewport — Passive view description for rendering Declares: camera, target, viewport, and view-specific settings. Does NOT: handle input, own windows, manage swapchains, or animate.
═══════════════════════════════════════════════════════════════════════ clear values ═══════════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════════ layer filtering ═══════════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════════ Render target (required) ═══════════════════════════════════════════════════════════════════════
2 members
ViewportDesc — viewport rectangle and depth range.
Source3 members
─── WorldAabb ──────────────────────────────────────────────────────────────
SourceEnums
U8 · U16 · F32 · BF16
Global · NodeCanvas · TextInput · Timeline
═════════════════════════════════════════════════════════════════════════════ RenderLayer — layer/filter flags for selective rendering ═════════════════════════════════════════════════════════════════════════════
None · Default · Ui · Overlay · Background · Debug · All
None · Focus · Activate · Toggle · Increment · Decrement · SetValue · Close
─── Accessibility export ───────────────────────────────────────────────
Button · Checkbox · Slider · TextField · ComboBox · MenuItem · Tab · TreeItem · Splitter · Timeline
None · Disabled · Focused · Checked · Selected · Expanded · Editable · HasPopup
Start · Center · End · Stretch
Previous · Next
─── UiEventType ─────────────────────────────────────────────────────────────
None · MouseMove · MouseDown · MouseUp · MouseScroll · KeyDown · KeyUp · KeyChar · WindowResize · WindowClose · WindowFocus · WindowBlur · Pinch · TextEditing
─── UiKey ─────────────────────────────────────────────────────────────────── SDL3 scancode subset. values deliberately match SDL_Scancode to allow direct cast; do not rely on the numeric values in switch logic.
Unknown · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z · Num1 · Num2 · Num3 · Num4 · Num5 · Num6 · Num7 · Num8 · Num9 · Num0 · Return · Escape · Backspace · Tab · Space · Minus · Equals · Comma · Period · Slash · Home · Delete · End · Right · Left · Down · Up · F1 · F2 · F3 · F4 · F5 · F6 · F7 · F8 · F9 · F10 · F11 · F12 · KpEnter · Kp1 · Kp2 · Kp3 · Kp4 · Kp5 · Kp6 · Kp7 · Kp8 · Kp9 · Kp0
─── UiPinchPhase ────────────────────────────────────────────────────────────
None · Begin · Update · End
─── UiScrollGesture ─────────────────────────────────────────────────────── Classified once in the input layer (SDL wheel heuristics). Navigation maps each gesture to its own sensitivity — wheel zoom, touchpad pan, pinch zoom.
None · MouseWheel · TouchpadPan · PinchScroll
Fill · Fixed · Hug
LeftToRight · BottomToTop
Waveform · Spectrum · Mel
Auto · Image · Video · Audio · Live
Image2D · Scene3D · Matrix · Video · CameraStream
Constants & Variables
Classes
17 members
─── Axes ──────────────────────────────────────────────────────────────────
Default-constructible so oa::plot::Figure can hold oa::Vector <Axes >. Use Figure::ax(r, c) to obtain a reference rather than constructing one yourself.
Additional caption line under the image (used by the classify tutorial to show the ground-truth label when prediction is wrong). alpha zero uses theme secondary text.
Dense row-major heatmap. This is the compact plotting contract for confusion matrices and other evaluation tables.
histogram convenience: finite samples are binned on the host into an ordered bar artist. Metric histories are intentionally small telemetry.
Image grid call. The texture is sampled directly by oa::Ui into this axes subregion; Figure does not read its pixels back for composition.
title above the axes. Color controls the text color (red/green for the classify-tutorial correct/wrong indicator). alpha zero uses theme text.
0 members
16 members
Render the fixed-size figure into a semantic RGBA image. The result is a normalized Float32 [1, 4, height, width] oa::Image and may be passed to oa::Viewer, Vision operations, or an image encoder. This semantic-image sink performs one terminal GPU readback and upload; show() remains GPU-resident. Every label uses the same generated coverage data as interactive text.
replay the complete figure directly into an active oa::Ui GPU frame. The configured aspect ratio and all title/label bands remain stable on resize.
Headless GPU render -> PNG. The explicit overload completes pending producers through the supplied engine; the convenience overload uses the active operation context. One readback occurs only after composition. output includes raster bases, ordered line/scatter/bar artists, heatmaps, legends, figure/axes titles and labels, and captions.
open an interactive window, render until closed. Returns when the user closes the window or the run loop exits.
0 members
0 members
0 members
─── Per-call optional formatting ──────────────────────────────────────────
Source0 members
Compute the pixel rect of the (row, col) cell inside an output of (inW × inH), after explicit figure-level title/x/y bands are reserved. Used by every terminal sink so the layout is identical across them.
Source0 members
Enums
Dark · Light
Render
Classes
43 members
0 members
17 members
beginFrame copies the complete semantic mesh snapshot before returning. No caller-owned mesh memory is retained.
Scene compilation validates stable identities, hierarchy, transforms, and configured geometry capacity before recording. The semantic scene remains caller-owned and no caller memory is retained.
The UI overload starts immediate command collection. ui() is non-null only for a renderer created with oa::UiRenderConfig.
Mandatory explicit shutdown boundary. It waits only exact outstanding producer/consumer events and reports failures.
Normal submission keeps targets device-resident and records no host copy. consumeReadback is the explicit synchronous sink. markConsumed registers the exact graphics completion of an external image consumer. abandonFrame never waits; Collect recycles completed retired slots.
0 members
4 members
generation-safe non-owning handle for one submitted renderer target. Color() remains valid until the exact frame is consumed or abandoned.
Source