Package-level declarations

Types

Link copied to clipboard
value class CanvasScope

Local pixel drawing clipped to this region and its ancestors. Does not clear or publish a frame.

Link copied to clipboard
object Colors
Link copied to clipboard
value class DisplayClick(val position: Position2i)

A front-face empty-hand click in published whole-screen pixel coordinates.

Link copied to clipboard

A task-confined drawing recorder, valid only during its enclosing frame block.

Link copied to clipboard
class DisplayHistory(val capacity: Int)

Fixed-capacity chronological samples. NaN records a gap instead of a fabricated zero.

Link copied to clipboard

Pixels per installed block; the same density also applies to holes in the canvas.

Link copied to clipboard
Link copied to clipboard

Pointer lifecycle; Cancel with gesture zero cancels every captured gesture.

Link copied to clipboard
class DisplayUi

A retained tree in an explicit screen viewport. The caller owns polling; render owns incremental frames.

Link copied to clipboard
value class DisplayWidgets(display: CanvasScope)

Stateless widgets: the caller polls input and owns telemetry, commands and frame publication.

Link copied to clipboard

One persistent RGB canvas. Drawing is clipped to its bounds and publishes immediately by default.

Link copied to clipboard
value class TextDisplay : Peripheral

A handle to one persistent canvas through the legacy text grid API. Coordinates are zero-based.

Link copied to clipboard
class UiBuilder

Construction-only DSL. Row/column children flow in declaration order; root and at children overlap. Sizes and positions are pixels, fixed at construction. A retained builder cannot be used after construction.

Link copied to clipboard

A disabled button still blocks clicks. Registering or drawing a button never invokes onClick.

Link copied to clipboard

Local drawing and pointer surface. Call invalidate after changing captured drawing state.

Link copied to clipboard
Link copied to clipboard
abstract class UiElement

A fixed-size element. Mutable presentation properties never change its layout.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Horizontal finite-range slider. Click/drag changes value; assigning value does not invoke the handler.

Link copied to clipboard

Functions

Link copied to clipboard

Creates a bounded local drawing surface at an arbitrary screen position.

Link copied to clipboard
Link copied to clipboard
fun displayUi(bounds: Rect2i, block: UiBuilder.() -> Unit): DisplayUi

Build once, then retain widget references for explicit updates. Root/leaf viewports clip drawing.

Link copied to clipboard

Uses whole-screen coordinates; passing a CanvasScope directly gives local clipped widgets.

Link copied to clipboard
inline fun GraphicalDisplay.frame(block: DisplayFrame.() -> Unit)

Records bounded drawing packets and publishes them together. Exceptions discard the frame; nesting fails.

Link copied to clipboard
fun rgb(red: Int, green: Int, blue: Int): Int

Returns a 24-bit 0xRRGGBB color.