egui

Immediate-mode GUI primitives for Kit inspired by egui

Disclaimer

This project is still a work-in-progress and may not work correctly.

Files

FileDescription
.editorconfigEditor formatting configuration
.gitignoreGit ignore rules for build artifacts and dependencies
.tool-versionsasdf tool versions
LICENSEMIT license file
README.mdThis file
assets/Icons and fonts used by demos and rendering
c/kit_egui_clipboard.hClipboard FFI header
c/kit_egui_clipboard.mmacOS clipboard FFI implementation
c/kit_egui_clipboard_stub.cNon-macOS clipboard FFI stub
dev/Screenshot, parity, and demo-generation tooling
docs/.keepPlaceholder for generated documentation
examples/basic.kitBasic widget gallery example
examples/demo-app.kitLarger egui-style demo app
kit.tomlPackage manifest with metadata, dependencies, and tasks
src/main.kitCore EGUI API
src/paint.kitPaint shapes, colors, textures, and geometry
src/sdl.kitSDL window, input, clipboard, and app-loop integration
src/wgpu.kitWGPU renderer adapter
tests/egui.test.kitCore EGUI tests
tests/sdl.test.kitSDL integration tests
tests/viewport.test.kitViewport command tests
tests/wgpu.test.kitWGPU renderer tests

Dependencies

PackageSource
sdlhttps://gitlab.com/kit-lang/packages/kit-sdl
tiny-skiahttps://gitlab.com/kit-lang/packages/kit-tiny-skia
imagehttps://gitlab.com/kit-lang/packages/kit-image
wgpuhttps://gitlab.com/kit-lang/packages/kit-wgpu

Installation

kit add gitlab.com/kit-lang/packages/kit-egui.git

Usage

import Kit.EGUI as EGUI
import Kit.EGUI.{
  Context,
}
import Kit.EGUI.SDL as EGUISDL

type Model = Model {
  count: Int,
}

render-ui = fn(model: Model, ctx: Context) =>
  panel = EGUI.begin-central-panel ctx
  title = EGUI.heading panel.ctx "Hello from kit-egui"
  button = EGUI.button title.ctx "Clicked ${Int.to-string model.count}x"
  next-count = if EGUI.clicked? button.response then model.count + 1 else model.count
  {ctx: EGUI.end-panel panel button.ctx, model: Model {count: next-count}}

main = fn =>
  EGUISDL.run-app-window "kit-egui" 640 480 (Model {count: 0}) render-ui

main

Development

Running Examples

Run the basic example with the interpreter:

kit run examples/basic.kit

Run the demo app:

kit run examples/demo-app.kit

Compile an example to a native binary:

kit build examples/basic.kit && ./basic

Running Tests

Run the test suite:

kit test

Run the test suite with coverage:

kit test --coverage

Running kit dev

Run the standard development workflow (format, check, test):

kit dev

This will:

  1. Format and check source files in src/
  2. Run tests in tests/ with coverage

Generating Documentation

Generate API documentation from doc comments:

kit doc

Note: Kit sources with doc comments (##) will generate HTML documents in docs/*.html

Cleaning Build Artifacts

Remove generated files, caches, and build artifacts:

kit task clean

Note: Defined in kit.toml.

Local Installation

To install this package locally for development:

kit install

This installs the package to ~/.kit/packages/@kit/egui/, making it available for import as Kit.EGUI in other projects.

License

This package is released under the MIT License - see LICENSE for details.

Note: This package is inspired by egui which is licensed under MIT OR Apache-2.0.

Exported Functions & Types

Stroke

Stroke style for outlines.

Variants

Stroke {width, color}

StrokeKind

How a stroke is placed relative to a shape edge.

Variants

StrokeInside
StrokeMiddle
StrokeOutside

CornerRadius

Per-corner radius for rounded rectangles.

Variants

CornerRadius {nw, ne, sw, se}

TextureHandle

Lightweight texture handle metadata.

Variants

TextureHandle {id, name, width, height, bytes-per-pixel, options}

Vertex

GPU-friendly 2D vertex.

Variants

Vertex {pos, uv, color}

Mesh

Textured triangles in two dimensions.

Variants

Mesh {indices, vertices, texture-id}

PaintCallbackInfo

Information passed to a custom paint callback.

Variants

PaintCallbackInfo {viewport, clip-rect, pixels-per-point, screen-width-px, screen-height-px}

PaintCallback

Backend-specific paint callback placeholder.

Variants

PaintCallback {rect, callback-id}

Primitive

Rendering primitive: a mesh or custom callback.

Variants

PrimitiveMesh {mesh}
PrimitiveCallback {callback}

ClippedPrimitive

A rendering primitive within a clip rectangle.

Variants

ClippedPrimitive {clip-rect, primitive}

Shadow

Soft rectangular shadow style.

Variants

Shadow {offset, blur, spread, color}

Hsva

Hue, saturation, value, alpha color in linear space.

Variants

Hsva {h, s, v, a}

HsvaGamma

Hue, saturation, gamma-corrected value, alpha color.

Variants

HsvaGamma {h, s, v, a}

Rangef

Inclusive float range, matching upstream Rangef.

Variants

Rangef {min, max}

Align

One-dimensional alignment: min/start, center, or max/end.

Variants

AlignMin
AlignCenter
AlignMax

Align2

Two-dimensional alignment, one value for x and one for y.

Variants

Align2 {x, y}

Vec2b

Two bools, one for each axis.

Variants

Vec2b {x, y}

Sense

What sort of interaction a widget is sensitive to.

Variants

Sense {senses-click?, senses-drag?, is-focusable?}

TextWrapMode

How static text widgets constrain text that exceeds available width.

Variants

TextWrapModeExtend
TextWrapModeWrap
TextWrapModeTruncate

Direction

Main axis direction for a layout.

Variants

DirectionLeftToRight
DirectionRightToLeft
DirectionTopDown
DirectionBottomUp

Layout

Placement and justification rules for laying out child widgets.

Variants

Layout {main-dir, main-wrap?, main-align, main-justify?, cross-align, cross-justify?}

Margin

Per-side spacing around framed content.

Variants

Margin {left, right, top, bottom}

PointerButton

Pointer button associated with the current pointer event.

Variants

PrimaryButton
SecondaryButton
MiddleButton
Extra1Button
Extra2Button

Key

Keyboard keys reported by upstream-style input events.

Variants

KeyArrowDown
KeyArrowLeft
KeyArrowRight
KeyArrowUp
KeyEscape
KeyTab
KeyBackspace
KeyEnter
KeySpace
KeyInsert
KeyDelete
KeyHome
KeyEnd
KeyPageUp
KeyPageDown
KeyCopy
KeyCut
KeyPaste
KeyColon
KeyComma
KeyBackslash
KeySlash
KeyPipe
KeyQuestionmark
KeyExclamationmark
KeyOpenBracket
KeyCloseBracket
KeyOpenCurlyBracket
KeyCloseCurlyBracket
KeyBacktick
KeyMinus
KeyPeriod
KeyPlus
KeyEquals
KeySemicolon
KeyQuote
KeyNum0
KeyNum1
KeyNum2
KeyNum3
KeyNum4
KeyNum5
KeyNum6
KeyNum7
KeyNum8
KeyNum9
KeyA
KeyB
KeyC
KeyD
KeyE
KeyF
KeyG
KeyH
KeyI
KeyJ
KeyK
KeyL
KeyM
KeyN
KeyO
KeyP
KeyQ
KeyR
KeyS
KeyT
KeyU
KeyV
KeyW
KeyX
KeyY
KeyZ
KeyF1
KeyF2
KeyF3
KeyF4
KeyF5
KeyF6
KeyF7
KeyF8
KeyF9
KeyF10
KeyF11
KeyF12
KeyF13
KeyF14
KeyF15
KeyF16
KeyF17
KeyF18
KeyF19
KeyF20
KeyF21
KeyF22
KeyF23
KeyF24
KeyF25
KeyF26
KeyF27
KeyF28
KeyF29
KeyF30
KeyF31
KeyF32
KeyF33
KeyF34
KeyF35
KeyBrowserBack

Modifiers

State of the modifier keys for upstream-style input events.

Variants

Modifiers {alt?, ctrl?, shift?, mac-cmd?, command?}

HoveredFile

File metadata for a file hovering over the UI.

Variants

HoveredFile {path, mime}

DroppedFile

File metadata for a file dropped onto the UI.

Variants

DroppedFile {path, name, mime, last-modified-seconds, bytes}

TouchDeviceId

Touch device identifier reported by upstream-style touch events.

Variants

TouchDeviceId {id}

TouchId

Touch occurrence identifier reported by upstream-style touch events.

Variants

TouchId {id}

TouchPhase

Touch event phase.

Variants

TouchStart
TouchMove
TouchEnd
TouchCancel

MouseWheelUnit

Unit associated with a mouse wheel event delta.

Variants

MouseWheelPoint
MouseWheelLine
MouseWheelPage

ImeEvent

Input method editor event.

Variants

ImeEnabled
ImePreedit {text}
ImeCommit {text}
ImeDisabled

Event

Upstream-style input event generated by a backend integration.

Variants

EventCopy
EventCut
EventPaste {text}
EventText {text}
EventKey {key, physical-key, has-physical-key?, pressed, repeat, modifiers}
EventPointerMoved {pos}
EventMouseMoved {delta}
EventPointerButton {pos, button, pressed, modifiers}
EventPointerGone
EventZoom {factor}
EventRotate {angle}
EventIme {ime}
EventTouch {device-id, id, phase, pos, force, has-force?}
EventMouseWheel {unit, delta, phase, modifiers}
EventWindowFocused {focused?}

RawInput

Upstream-style per-frame input payload.

Variants

RawInput {screen-width, screen-height, pixels-per-point, time, predicted-dt, modifiers, events, hovered-files, dropped-files, focused?}

InputState

Per-frame pointer input.

Variants

InputState {pointer-x, pointer-y, pointer-delta-x, pointer-delta-y, pointer-button, modifiers, is-pointer-down?, was-pointer-pressed?, was-pointer-released?, active-id, scroll-x, scroll-y, text-input, is-backspace-pressed?, is-enter-pressed?, is-escape-pressed?}

Response

Widget interaction result.

Variants

Response {id, rect, is-hovered?, is-active?, was-pressed?, was-clicked?, was-pointer-clicked?, pointer-button, was-changed?, drag-delta-x, drag-delta-y}

shape-kind

Stable shape kind name for diagnostics and tests.

Shape -> String

shape-text

Text payload for text shapes, otherwise an empty string.

Shape -> String

WidgetType

Built-in widget categories reported through output/accessibility events.

Variants

WidgetTypeLabel
WidgetTypeLink
WidgetTypeTextEdit
WidgetTypeButton
WidgetTypeCheckbox
WidgetTypeRadioButton
WidgetTypeRadioGroup
WidgetTypeSelectableLabel
WidgetTypeComboBox
WidgetTypeSlider
WidgetTypeDragValue
WidgetTypeColorButton
WidgetTypeImage
WidgetTypeCollapsingHeader
WidgetTypePanel
WidgetTypeProgressIndicator
WidgetTypeWindow
WidgetTypeResizeHandle
WidgetTypeScrollBar
WidgetTypeOther

WidgetInfo

Widget metadata emitted for platform/accessibility output.

Variants

WidgetInfo {typ, enabled?, label, has-label?, current-text-value, has-current-text-value?, prev-text-value, has-prev-text-value?, selected?, has-selected?, value, has-value?, text-selection-start, text-selection-end, has-text-selection?, hint-text, has-hint-text?}

OutputEvent

Things that happened during this frame that integrations may surface.

Variants

OutputEventClicked {widget-info}
OutputEventDoubleClicked {widget-info}
OutputEventTripleClicked {widget-info}
OutputEventFocusGained {widget-info}
OutputEventTextSelectionChanged {widget-info}
OutputEventValueChanged {widget-info}

ImeOutput

Text-editing output useful for IME integrations.

Variants

ImeOutput {rect, cursor-rect, should-interrupt-composition?}

OpenUrl

URL-opening request emitted by the UI.

Variants

OpenUrl {url, new-tab?}

OutputCommand

Command that the EGUI integration should execute at the end of a frame.

Variants

OutputCommand {kind, text, image, has-image?, url, has-url?}

UserAttentionType

Types of attention to request from an unfocused native window.

Variants

UserAttentionCritical
UserAttentionInformational
UserAttentionReset

CustomCursorImage

Custom RGBA cursor image for integrations that support OS cursors.

Variants

CustomCursorImage {rgba, width, height, hotspot-x, hotspot-y}

CursorIcon

Mouse cursor icon requested by the UI for this frame.

Variants

CursorIconDefault
CursorIconNone
CursorIconContextMenu
CursorIconHelp
CursorIconPointingHand
CursorIconProgress
CursorIconWait
CursorIconCell
CursorIconCrosshair
CursorIconText
CursorIconVerticalText
CursorIconAlias
CursorIconCopy
CursorIconMove
CursorIconNoDrop
CursorIconNotAllowed
CursorIconGrab
CursorIconGrabbing
CursorIconAllScroll
CursorIconResizeHorizontal
CursorIconResizeNeSw
CursorIconResizeNwSe
CursorIconResizeVertical
CursorIconResizeEast
CursorIconResizeSouthEast
CursorIconResizeSouth
CursorIconResizeSouthWest
CursorIconResizeWest
CursorIconResizeNorthWest
CursorIconResizeNorth
CursorIconResizeNorthEast
CursorIconResizeColumn
CursorIconResizeRow
CursorIconZoomIn
CursorIconZoomOut

PlatformOutput

Non-rendering output emitted by a frame.

Variants

PlatformOutput {commands, cursor-icon, cursor-image, has-cursor-image?, events, mutable-text-under-cursor?, ime, has-ime?, accesskit-update, has-accesskit-update?, num-completed-passes, request-discard-reasons}

PlatformOutputTakeResult

Result for immutable PlatformOutput take-style operations.

Variants

PlatformOutputTakeResult {taken, remaining}

ViewportId

A unique identifier of a viewport.

Variants

ViewportId {id}

ViewportIdPair

Pair of the current viewport id and its parent viewport id.

Variants

ViewportIdPair {this, parent}

ViewportClass

The type of viewport requested by the UI.

Variants

ViewportClassRoot
ViewportClassDeferred
ViewportClassImmediate
ViewportClassEmbeddedWindow

IconData

Image data for a native window icon.

Variants

IconData {rgba, width, height}

WindowLevel

Native window z-order level.

Variants

WindowLevelNormal
WindowLevelAlwaysOnBottom
WindowLevelAlwaysOnTop

ImePurpose

Input method purpose requested from the integration.

Variants

ImePurposeNormal
ImePurposePassword
ImePurposeTerminal

SystemTheme

System theme requested from the integration.

Variants

SystemThemeSystemDefault
SystemThemeLight
SystemThemeDark

CursorGrab

Cursor grab mode requested from the integration.

Variants

CursorGrabNone
CursorGrabConfined
CursorGrabLocked

ResizeDirection

Native resize direction.

Variants

ResizeNorth
ResizeSouth
ResizeEast
ResizeWest
ResizeNorthEast
ResizeSouthEast
ResizeNorthWest
ResizeSouthWest

ViewportBuilder

Accumulative native viewport builder.

Variants

ViewportBuilder {title, has-title?, app-id, has-app-id?, position, has-position?, inner-size, has-inner-size?, min-inner-size, has-min-inner-size?, max-inner-size, has-max-inner-size?, clamp-size-to-monitor-size?, has-clamp-size-to-monitor-size?, fullscreen?, has-fullscreen?, maximized?, has-maximized?, resizable?, has-resizable?, transparent?, has-transparent?, decorations?, has-decorations?, icon, has-icon?, active?, has-active?, visible?, has-visible?, fullsize-content-view?, has-fullsize-content-view?, movable-by-window-background?, has-movable-by-window-background?, title-shown?, has-title-shown?, titlebar-buttons-shown?, has-titlebar-buttons-shown?, titlebar-shown?, has-titlebar-shown?, has-shadow?, has-has-shadow?, drag-and-drop?, has-drag-and-drop?, taskbar?, has-taskbar?, close-button?, has-close-button?, minimize-button?, has-minimize-button?, maximize-button?, has-maximize-button?, window-level, has-window-level?, mouse-passthrough?, has-mouse-passthrough?, monitor, has-monitor?}

ViewportCommand

Commands that change a native viewport.

Variants

ViewportCommandClose
ViewportCommandCancelClose
ViewportCommandTitle {title}
ViewportCommandTransparent {transparent?}
ViewportCommandVisible {visible?}
ViewportCommandStartDrag
ViewportCommandOuterPosition {position}
ViewportCommandInnerSize {size}
ViewportCommandMinInnerSize {size}
ViewportCommandMaxInnerSize {size}
ViewportCommandResizeIncrements {size, has-size?}
ViewportCommandBeginResize {direction}
ViewportCommandResizable {resizable?}
ViewportCommandEnableButtons {close?, minimized?, maximize?}
ViewportCommandMinimized {minimized?}
ViewportCommandMaximized {maximized?}
ViewportCommandFullscreen {fullscreen?}
ViewportCommandSetMonitor {monitor}
ViewportCommandDecorations {decorations?}
ViewportCommandWindowLevel {level}
ViewportCommandIcon {icon, has-icon?}
ViewportCommandImeRect {rect}
ViewportCommandImeAllowed {allowed?}
ViewportCommandImePurpose {purpose}
ViewportCommandFocus
ViewportCommandRequestUserAttention {attention}
ViewportCommandSetTheme {theme}
ViewportCommandContentProtected {protected?}
ViewportCommandCursorPosition {position}
ViewportCommandCursorGrab {grab}
ViewportCommandCursorVisible {visible?}
ViewportCommandMousePassthrough {passthrough?}
ViewportCommandScreenshot {user-data}
ViewportCommandRequestCut
ViewportCommandRequestCopy
ViewportCommandRequestPaste

ViewportOutput

Output for an active viewport.

Variants

ViewportOutput {id, parent, class, builder, commands, repaint-delay-seconds}

FullOutput

Rendering and platform output emitted at the end of a frame.

Variants

FullOutput {platform-output, textures-delta, shapes, pixels-per-point, viewport-output}

Context

Immediate-mode frame state.

Variants

Context {input, frame-width, frame-height, cursor-x, cursor-y, max-width, spacing, spacing-x, item-height, is-enabled?, is-horizontal?, row-start-x, row-start-y, row-height, last-rect, content-rect, has-hit-clip?, hit-clip, next-id, shapes, platform-output, viewport-output}

UiResult

Result returned by non-mutating widgets.

Variants

UiResult {ctx, response}

HyperlinkResult

Result returned by hyperlink widgets.

Variants

HyperlinkResult {ctx, response, url, is-open-requested?}

PanelResult

Result returned by panel containers.

Variants

PanelResult {outer, after, ctx, response}

ResizablePanelResult

Result returned by resizable side panel containers.

Variants

ResizablePanelResult {outer, after, ctx, response, splitter-response, width}

WindowOptions

Behavior flags and size constraints for a window container.

Variants

WindowOptions {is-draggable?, is-resizable?, min-width, min-height}

FrameStyle

Paint and spacing options for custom frame containers.

Variants

FrameStyle {inner-margin, outer-margin, radius, fill, stroke, stroke-width}

ResizeOptions

Behavior flags and size constraints for a resizable container.

Variants

ResizeOptions {is-resizable?, min-width, min-height, max-width, max-height}

WindowResult

Result returned by window containers.

Variants

WindowResult {outer, ctx, response, title-response, resize-response, rect}

CloseableWindowResult

Result returned by closeable window containers.

Variants

CloseableWindowResult {outer, ctx, response, title-response, resize-response, close-response, rect, is-open?}

ModalResult

Result returned by modal dialog containers.

Variants

ModalResult {outer, ctx, response, backdrop-response, rect, is-open?}

PopupResult

Result returned by popup containers.

Variants

PopupResult {outer, ctx, response, rect, is-open?}

AreaResult

Result returned by absolute-position area containers.

Variants

AreaResult {outer, ctx, response, rect}

HorizontalResult

Result returned by horizontal layout containers.

Variants

HorizontalResult {outer, ctx}

Result returned by menu bar containers.

Variants

MenuBarResult {outer, ctx, response, rect}

VerticalResult

Result returned by vertical layout containers.

Variants

VerticalResult {outer, ctx}

FrameResult

Result returned by custom frame containers.

Variants

FrameResult {outer, ctx, style}

ResizeResult

Result returned by resizable layout containers.

Variants

ResizeResult {outer, ctx, response, resize-response, rect, is-resizable?}

ScopeResult

Result returned by scoped child layout containers.

Variants

ScopeResult {outer, ctx}

VisibleUiResult

Result returned by visible/hidden child layout containers.

Variants

VisibleUiResult {outer, ctx, is-visible?}

EnabledUiResult

Result returned by enabled/disabled child layout containers.

Variants

EnabledUiResult {outer, ctx, uses-disabled-overlay?}

AllocateUiResult

Result returned by fixed-size child layout allocations.

Variants

AllocateUiResult {outer, ctx, response}

GroupResult

Result returned by unframed group layout containers.

Variants

GroupResult {outer, ctx}

IndentResult

Result returned by indented layout containers.

Variants

IndentResult {outer, ctx, width}

GridResult

Result returned by grid layout containers.

Variants

GridResult {outer, ctx, columns, column, row, row-start-x, row-start-y, cell-width, row-height, bottom-y, row-shape-count, striped?}

TableResult

Result returned by table layout containers.

Variants

TableResult {outer, ctx, columns, column, row, row-start-x, row-start-y, cell-width, row-height, bottom-y}

ColumnsResult

Result returned by independent column layout containers.

Variants

ColumnsResult {outer, ctx, columns, column, start-x, start-y, cell-width, bottom-y}

CollapsingHeaderResult

Result returned by collapsible header containers.

Variants

CollapsingHeaderResult {outer, content, header-response, is-open?}

TreeNodeResult

Result returned by tree-node containers.

Variants

TreeNodeResult {outer, content, header-response, is-open?, indent-width}

Result returned by menu button containers.

Variants

MenuButtonResult {outer, content, button-response, is-open?}

CheckboxResult

Result returned by checkbox-like widgets.

Variants

CheckboxResult {ctx, response, is-checked?}

ToggleResult

Result returned by toggle-like widgets.

Variants

ToggleResult {ctx, response, is-on?}

SelectionResult

Result returned by selection-like widgets.

Variants

SelectionResult {ctx, response, is-selected?}

StringSelectionResult

Result returned by string value selection helpers.

Variants

StringSelectionResult {ctx, response, value, is-selected?}

StringValueResult

Result returned by string value widgets.

Variants

StringValueResult {ctx, response, value}

FloatValueResult

Result returned by float value widgets.

Variants

FloatValueResult {ctx, response, value}

ColorValueResult

Result returned by color value widgets.

Variants

ColorValueResult {ctx, response, value}

SliderResult

Result returned by slider-like widgets.

Variants

SliderResult {ctx, response, value}

RangeSliderResult

Result returned by range-slider widgets.

Variants

RangeSliderResult {ctx, response, low-value, high-value}

SliderOrientation

Specifies the orientation of a builder-style slider.

Variants

SliderHorizontal
SliderVertical

SliderClamping

Specifies when a builder-style slider clamps values to its range.

Variants

SliderClampingNever
SliderClampingEdits
SliderClampingAlways

Slider

Builder-style scalar slider widget, mirroring EGUI's Slider options that map onto this lightweight port.

Variants

Slider {value, min-value, max-value, text, has-text?, show-value?, orientation, prefix, suffix, step, has-step?, clamping}

DragValue

Builder-style compact drag value widget, mirroring EGUI's DragValue options that map onto this lightweight port.

Variants

DragValue {value, speed, min-value, max-value, has-range?, clamp-existing-to-range?, prefix, suffix, min-decimals, max-decimals, has-max-decimals?, update-while-editing?}

Label

Builder-style static text widget, mirroring EGUI's Label options that map onto this lightweight port.

Variants

Label {text, wrap-mode, has-wrap-mode?, sense, has-sense?, selectable?, has-selectable?, halign, has-halign?, show-tooltip-when-elided?}

Checkbox

Builder-style boolean checkbox widget.

Variants

Checkbox {is-checked?, text, has-text?, indeterminate?}

RadioButton

Builder-style radio button widget.

Variants

RadioButton {is-selected?, text}

Button

Builder-style text button widget, mirroring EGUI's Button options that apply to text-only buttons in this lightweight port.

Variants

Button {text, fill, has-fill?, stroke, has-stroke?, small?, frame?, has-frame?, frame-when-inactive?, sense, min-size, has-min-size?, corner-radius, has-corner-radius?, selected}

ProgressBar

Builder-style progress bar widget, mirroring EGUI's ProgressBar options.

Variants

ProgressBar {progress, desired-width, has-desired-width?, desired-height, has-desired-height?, text, has-text?, show-percentage?, fill, has-fill?, animate?, corner-radius, has-corner-radius?}

SplitterResult

Result returned by splitter widgets.

Variants

SplitterResult {ctx, response, value}

TextFieldResult

Result returned by text-field-like widgets.

Variants

TextFieldResult {ctx, response, value, is-focused?, was-submitted?, was-cancelled?}

ComboBoxResult

Result returned by combo-box/select widgets.

Variants

ComboBoxResult {ctx, response, selected-index, is-open?}

ListBoxResult

Result returned by list-box selection widgets.

Variants

ListBoxResult {ctx, response, selected-index}

ScrollAreaResult

Result returned by scroll area containers.

Variants

ScrollAreaResult {outer, ctx, response, scroll-x, scroll-y, scrollbar-shapes}

InteractionResult

Variants

InteractionResult {input, response}

ComboOptionsResult

Variants

ComboOptionsResult {input, selected-index, is-open?, next-id, shapes}

ListBoxOptionsResult

Variants

ListBoxOptionsResult {input, selected-index, next-id, shapes}

pos

pos2

Upstream-style alias for building a 2D point.

Float -> Float -> Pos

vec2

Upstream-style alias for using Pos as a size/vector.

Float -> Float -> Pos

vec2-splat

Build a 2D vector with both components set to the same value.

Float -> Pos

pos2-zero

Upstream-style zero point constant.

Pos

vec2-zero

Upstream-style zero vector constant.

Pos

vec2-one

Upstream-style one vector constant.

Pos

vec2-x

Unit vector pointing right.

Pos

vec2-y

Unit vector pointing down.

Pos

vec2-right

Unit vector pointing right.

Pos

vec2-left

Unit vector pointing left.

Pos

vec2-up

Unit vector pointing up in EGUI coordinates.

Pos

vec2-down

Unit vector pointing down in EGUI coordinates.

Pos

pos-add

Add a vector to a point.

Pos -> Pos -> Pos

pos-sub

Subtract a point or vector from another point.

Pos -> Pos -> Pos

pos-scale

Scale a point or vector by a scalar.

Pos -> Float -> Pos

vec2-add

Add two vectors component-wise.

Pos -> Pos -> Pos

vec2-sub

Subtract two vectors component-wise.

Pos -> Pos -> Pos

vec2-scale

Scale a vector by a scalar.

Pos -> Float -> Pos

vec2-div

Divide a vector by a scalar.

Pos -> Float -> Pos

vec2-length-sq

Return the squared length of a vector.

Pos -> Float

vec2-length

Return the length of a vector.

Pos -> Float

vec2-distance

Return the distance between two points.

Pos -> Pos -> Float

vec2-dot

Return the dot product of two vectors.

Pos -> Pos -> Float

vec2-normalized

Return a safe normalized vector, or zero when the input has zero length.

Pos -> Pos

vec2-min

Return the component-wise minimum of two vectors or points.

Pos -> Pos -> Pos

vec2-max

Return the component-wise maximum of two vectors or points.

Pos -> Pos -> Pos

vec2-clamp

Clamp a vector or point component-wise.

Pos -> Pos -> Pos -> Pos

vec2-abs

Return the component-wise absolute value of a vector.

Pos -> Pos

vec2-yx

Swap vector axes.

Pos -> Pos

vec2-min-elem

Return the smallest vector component.

Pos -> Float

vec2-max-elem

Return the largest vector component.

Pos -> Float

pos-min

Component-wise point minimum.

Pos -> Pos -> Pos

pos-max

Component-wise point maximum.

Pos -> Pos -> Pos

pos-clamp

Clamp a point component-wise.

Pos -> Pos -> Pos -> Pos

vec2b

Build a two-axis boolean vector.

Bool -> Bool -> Vec2b

vec2b-false

Two-axis boolean vector with both axes false.

Vec2b

vec2b-true

Two-axis boolean vector with both axes true.

Vec2b

vec2b-any?

Return true if either axis is true.

Vec2b -> Bool

vec2b-all?

Return true if both axes are true.

Vec2b -> Bool

vec2b-and

Return the component-wise boolean and.

Vec2b -> Vec2b -> Vec2b

vec2b-or

Return the component-wise boolean or.

Vec2b -> Vec2b -> Vec2b

vec2b-to-vec2

Convert booleans to 1.0 for true and 0.0 for false.

Vec2b -> Pos

align-min

Convenience alias for upstream Align::Min.

Align

align-center

Convenience alias for upstream Align::Center.

Align

align-max

Convenience alias for upstream Align::Max.

Align

align-left

Horizontal convenience alias for AlignMin.

Align

align-right

Horizontal convenience alias for AlignMax.

Align

align-top

Vertical convenience alias for AlignMin.

Align

align-bottom

Vertical convenience alias for AlignMax.

Align

align-to-factor

Convert an alignment to 0.0, 0.5, or 1.0.

Align -> Float

align-to-sign

Convert an alignment to -1.0, 0.0, or 1.0.

Align -> Float

align-flip

Return the opposite edge alignment, leaving center unchanged.

Align -> Align

align-size-within-range

Return a range of the requested size aligned within another range.

Align -> Float -> Rangef -> Rangef

align2

Build a two-dimensional alignment.

Align -> Align -> Align2

align2-left-top

Upstream-style two-dimensional alignment constants.

Align2

align2-left-center

Left edge and vertical center alignment.

Align2

align2-left-bottom

Left edge and bottom alignment.

Align2

align2-center-top

Horizontal center and top alignment.

Align2

align2-center-center

Centered horizontal and vertical alignment.

Align2

align2-center-bottom

Horizontal center and bottom alignment.

Align2

align2-right-top

Right edge and top alignment.

Align2

align2-right-center

Right edge and vertical center alignment.

Align2

align2-right-bottom

Right edge and bottom alignment.

Align2

align2-x

Return the horizontal alignment.

Align2 -> Align

align2-y

Return the vertical alignment.

Align2 -> Align

align2-to-sign

Convert each alignment axis to -1.0, 0.0, or 1.0.

Align2 -> Pos

align2-flip-x

Flip the horizontal alignment axis.

Align2 -> Align2

align2-flip-y

Flip the vertical alignment axis.

Align2 -> Align2

align2-flip

Flip both alignment axes.

Align2 -> Align2

align2-pos-in-rect

Return the point inside a rectangle selected by the alignment.

Align2 -> Rect -> Pos

align2-anchor-size

Anchor a size around a point using this alignment.

Align2 -> Pos -> Pos -> Rect

align2-align-size-within-rect

Align a size within a frame rectangle.

Align2 -> Pos -> Rect -> Rect

sense-hover

Interaction sense for hover-only widgets.

Sense

sense-focusable-noninteractive

Interaction sense for focusable, non-interactive widgets.

Sense

sense-click

Interaction sense for click-sensitive widgets.

Sense

sense-drag

Interaction sense for drag-sensitive widgets.

Sense

sense-click-and-drag

Interaction sense for widgets sensitive to both clicks and drags.

Sense

sense-interactive?

Return true if the sense listens for clicks or drags.

Sense -> Bool

sense-senses-click?

Return true if the sense listens for clicks.

Sense -> Bool

sense-senses-drag?

Return true if the sense listens for drags.

Sense -> Bool

sense-focusable?

Return true if the sense can receive focus.

Sense -> Bool

text-wrap-mode-extend

Convenience alias for upstream TextWrapMode::Extend.

TextWrapMode

text-wrap-mode-wrap

Convenience alias for upstream TextWrapMode::Wrap.

TextWrapMode

text-wrap-mode-truncate

Convenience alias for upstream TextWrapMode::Truncate.

TextWrapMode

direction-left-to-right

Convenience alias for upstream Direction::LeftToRight.

Direction

direction-right-to-left

Convenience alias for upstream Direction::RightToLeft.

Direction

direction-top-down

Convenience alias for upstream Direction::TopDown.

Direction

direction-bottom-up

Convenience alias for upstream Direction::BottomUp.

Direction

direction-is-horizontal?

Return true when the layout direction runs along the x axis.

Direction -> Bool

direction-is-vertical?

Return true when the layout direction runs along the y axis.

Direction -> Bool

layout

Build a layout from explicit main/cross axis settings.

Direction -> Bool -> Align -> Bool -> Align -> Bool -> Layout

layout-left-to-right

Place elements horizontally, left to right.

Align -> Layout

layout-right-to-left

Place elements horizontally, right to left.

Align -> Layout

layout-top-down

Place elements vertically, top to bottom.

Align -> Layout

layout-bottom-up

Place elements vertically, bottom to top.

Align -> Layout

layout-from-main-dir-and-cross-align

Build a layout from a main direction and cross-axis alignment.

Direction -> Align -> Layout

layout-centered-and-justified

Build a layout where one child should take all available space.

Direction -> Layout

layout-with-main-wrap

Return a layout with updated wrapping behavior.

Layout -> Bool -> Layout

layout-with-main-align

Return a layout with updated main-axis alignment.

Layout -> Align -> Layout

layout-with-cross-align

Return a layout with updated cross-axis alignment.

Layout -> Align -> Layout

layout-with-main-justify

Return a layout with updated main-axis justification.

Layout -> Bool -> Layout

layout-with-cross-justify

Return a layout with updated cross-axis justification.

Layout -> Bool -> Layout

layout-top-down-justified

Top-down layout justified so widgets fill the available width.

Align -> Layout

layout-default

Default upstream-style layout.

Layout

layout-main-dir

Return the main axis direction.

Layout -> Direction

layout-main-wrap?

Return whether the layout wraps on the main axis.

Layout -> Bool

layout-main-align

Return the main-axis alignment.

Layout -> Align

layout-main-justify?

Return whether widgets are justified on the main axis.

Layout -> Bool

layout-cross-align

Return the cross-axis alignment.

Layout -> Align

layout-cross-justify?

Return whether widgets are justified on the cross axis.

Layout -> Bool

layout-is-horizontal?

Return true when this layout is horizontal.

Layout -> Bool

layout-is-vertical?

Return true when this layout is vertical.

Layout -> Bool

layout-prefer-right-to-left?

Return true when text and children should prefer right-to-left placement.

Layout -> Bool

layout-horizontal-placement

Return the horizontal placement implied by this layout.

Layout -> Align

layout-horizontal-align

Return the horizontal alignment for widgets inside this layout.

Layout -> Align

layout-vertical-align

Return the vertical alignment for widgets inside this layout.

Layout -> Align

layout-horizontal-justify?

Return whether widgets are horizontally justified.

Layout -> Bool

layout-vertical-justify?

Return whether widgets are vertically justified.

Layout -> Bool

layout-align-size-within-rect

Align a child size within a rectangle using this layout's resolved Align2.

Layout -> Pos -> Rect -> Rect

rangef

Build an inclusive float range.

Float -> Float -> Rangef

rangef-point

Build a zero-span inclusive float range.

Float -> Rangef

rangef-span

Return the range span, i.e. max - min.

Rangef -> Float

rangef-center

Return the range center.

Rangef -> Float

rangef-contains?

Return true when a value is inside the inclusive range.

Rangef -> Float -> Bool

rangef-clamp

Clamp a value to the inclusive range.

Rangef -> Float -> Float

rangef-as-positive

Return a range with min <= max.

Rangef -> Rangef

rangef-shrink

Shrink a range equally from both sides.

Rangef -> Float -> Rangef

rangef-expand

Expand a range equally on both sides.

Rangef -> Float -> Rangef

rangef-flip

Flip the min and max values.

Rangef -> Rangef

rangef-intersection

Return the overlapping part of two ranges.

Rangef -> Rangef -> Rangef

rangef-intersects?

Return true when two ranges overlap or touch.

Rangef -> Rangef -> Bool

lerp

Linearly interpolate over an inclusive range.

Rangef -> Float -> Float

fast-midpoint

Fast midpoint helper matching upstream emath::fast_midpoint.

Float -> Float -> Float

inverse-lerp

Return where a value sits in a range, or None for a zero-width range.

Rangef -> Float -> Option Float

remap

Linearly remap a value from one range to another.

Float -> Rangef -> Rangef -> Float

remap-clamp

Linearly remap a value and clamp the output to the target range.

Float -> Rangef -> Rangef -> Float

rect

rect-zero

Upstream-style zero rectangle constant.

Rect

rect-from-pos

Build a zero-sized rectangle at a point.

Pos -> Rect

rect-from-min-size

Build a rectangle from a minimum point and size.

Pos -> Pos -> Rect

rect-from-min-max

Build a rectangle from minimum and maximum points.

Pos -> Pos -> Rect

rect-from-two-pos

Build a rectangle from two corner points.

Pos -> Pos -> Rect

rect-from-center-size

Build a rectangle centered on a point with the provided size.

Pos -> Pos -> Rect

rect-left

Return the left edge of a rectangle.

Rect -> Float

rect-right

Return the right edge of a rectangle.

Rect -> Float

rect-top

Return the top edge of a rectangle.

Rect -> Float

rect-bottom

Return the bottom edge of a rectangle.

Rect -> Float

rect-min

Return the minimum point of a rectangle.

Rect -> Pos

rect-max

Return the maximum point of a rectangle.

Rect -> Pos

rect-size

Return the size of a rectangle.

Rect -> Pos

rect-center

Return the center point of a rectangle.

Rect -> Pos

rect-width

Return the width of a rectangle.

Rect -> Float

rect-height

Return the height of a rectangle.

Rect -> Float

rect-area

Return the non-negative area of a rectangle.

Rect -> Float

rect-left-top

Return the top-left corner of a rectangle.

Rect -> Pos

rect-right-top

Return the top-right corner of a rectangle.

Rect -> Pos

rect-left-bottom

Return the bottom-left corner of a rectangle.

Rect -> Pos

rect-right-bottom

Return the bottom-right corner of a rectangle.

Rect -> Pos

rect-left-center

Return the center point on the left edge.

Rect -> Pos

rect-right-center

Return the center point on the right edge.

Rect -> Pos

rect-center-top

Return the center point on the top edge.

Rect -> Pos

rect-center-bottom

Return the center point on the bottom edge.

Rect -> Pos

rect-translate

Translate a rectangle without changing its size.

Rect -> Pos -> Rect

rect-expand

Expand a rectangle equally in all directions.

Rect -> Float -> Rect

rect-expand2

Expand a rectangle by a vector in each direction.

Rect -> Pos -> Rect

rect-shrink

Shrink a rectangle equally in all directions.

Rect -> Float -> Rect

rect-shrink2

Shrink a rectangle by a vector in each direction.

Rect -> Pos -> Rect

rect-union

Return the bounding rectangle containing both rectangles.

Rect -> Rect -> Rect

rect-intersect

Return the area covered by both rectangles.

Rect -> Rect -> Rect

rect-contains-rect?

Return true when the rectangle fully contains another rectangle.

Rect -> Rect -> Bool

rect-clamp

Clamp a point to the rectangle.

Rect -> Pos -> Pos

rect-is-negative?

Return true when width or height is negative.

Rect -> Bool

rect-is-positive?

Return true when width and height are both strictly positive.

Rect -> Bool

rect-is-empty?

Return true when width or height is zero or negative.

Rect -> Bool

color

Build a normalized RGBA color.

Float -> Float -> Float -> Float -> Color

linear-f32-from-gamma-u8

Convert a 0-255 gamma-space channel to a normalized linear channel.

Int -> Float

linear-f32-from-linear-u8

Convert a 0-255 linear channel to a normalized linear channel.

Int -> Float

gamma-u8-from-linear-f32

Convert a normalized linear channel to a 0-255 gamma-space channel.

Float -> Int

linear-u8-from-linear-f32

Convert a normalized linear channel to a 0-255 linear channel.

Float -> Int

linear-from-gamma

Convert gamma [0, 1] to linear [0, 1].

Float -> Float

gamma-from-linear

Convert linear [0, 1] to gamma [0, 1].

Float -> Float

from-rgb

Build an opaque color from 0-255 sRGB channels.

Int -> Int -> Int -> Color

color-from-rgb

Descriptive alias for building an opaque color from 0-255 sRGB channels.

Int -> Int -> Int -> Color

from-rgb-additive

Build an additive color from 0-255 sRGB channels.

Int -> Int -> Int -> Color

from-rgba-premultiplied

Build a color from 0-255 premultiplied RGBA channels.

Int -> Int -> Int -> Int -> Color

from-rgba-unmultiplied

Build a color from 0-255 unmultiplied RGBA channels.

Int -> Int -> Int -> Int -> Color

from-gray

Build an opaque grayscale color from a 0-255 luminance channel.

Int -> Color

from-grey

Alias for from-gray.

Int -> Color

from-black-alpha

Build black with the given 0-255 alpha.

Int -> Color

from-white-alpha

Build white with the given 0-255 alpha.

Int -> Color

from-additive-luminance

Build additive white from a 0-255 luminance channel.

Int -> Color

from-rgba-premultiplied-float

Build a premultiplied linear color from normalized premultiplied RGBA.

Float -> Float -> Float -> Float -> Color

from-rgba-unmultiplied-float

Build a premultiplied linear color from normalized unmultiplied RGBA.

Float -> Float -> Float -> Float -> Color

from-rgb-float

Build an opaque normalized color from normalized RGB.

Float -> Float -> Float -> Color

from-gray-float

Build an opaque normalized grayscale color.

Float -> Color

from-luminance-alpha

Build a premultiplied linear luminance color with alpha.

Float -> Float -> Color

from-srgba-premultiplied

Build a premultiplied linear color from 0-255 premultiplied sRGBA.

Int -> Int -> Int -> Int -> Color

from-srgba-unmultiplied

Build a premultiplied linear color from 0-255 unmultiplied sRGBA.

Int -> Int -> Int -> Int -> Color

hsva

Build an HSVA color.

Float -> Float -> Float -> Float -> Hsva

hsva-new

Alias for hsva, matching upstream constructor naming.

Float -> Float -> Float -> Float -> Hsva

hsva-gamma

Build an HsvaGamma color.

Float -> Float -> Float -> Float -> HsvaGamma

hsva-gamma-new

Alias for hsva-gamma, matching upstream constructor naming.

Float -> Float -> Float -> Float -> HsvaGamma

hsv-from-rgb

Convert linear RGB channels to HSV channels.

List Float -> List Float

rgb-from-hsv

Convert HSV channels to linear RGB channels.

List Float -> List Float

hsva-from-rgba-premultiplied

Build HSVA from linear premultiplied RGBA.

Float -> Float -> Float -> Float -> Hsva

hsva-from-rgba-unmultiplied

Build HSVA from linear unmultiplied RGBA.

Float -> Float -> Float -> Float -> Hsva

hsva-from-additive-rgb

Build additive HSVA from linear RGB channels.

List Float -> Hsva

hsva-from-additive-srgb

Build additive HSVA from gamma-space sRGB channels.

List Int -> Hsva

hsva-from-rgb

Build opaque HSVA from linear RGB channels.

List Float -> Hsva

hsva-from-srgb

Build opaque HSVA from gamma-space sRGB channels.

List Int -> Hsva

hsva-from-srgba-premultiplied

Build HSVA from premultiplied sRGBA channels.

List Int -> Hsva

hsva-from-srgba-unmultiplied

Build HSVA from unmultiplied sRGBA channels.

List Int -> Hsva

hsva-from-color

Build HSVA from a premultiplied Color.

Color -> Hsva

hsva-to-opaque

Convert HSVA to opaque HSVA.

Hsva -> Hsva

hsva-to-rgb

Convert HSVA to linear RGB channels.

Hsva -> List Float

hsva-to-srgb

Convert HSVA to gamma-space sRGB channels.

Hsva -> List Int

hsva-to-rgba-unmultiplied

Convert HSVA to linear unmultiplied RGBA channels.

Hsva -> List Float

hsva-to-rgba-premultiplied

Convert HSVA to linear premultiplied RGBA channels.

Hsva -> List Float

hsva-to-srgba-premultiplied

Convert HSVA to premultiplied sRGBA channels.

Hsva -> List Int

hsva-to-srgba-unmultiplied

Convert HSVA to unmultiplied sRGBA channels.

Hsva -> List Int

color-from-hsva

Convert HSVA to a premultiplied Color.

Hsva -> Color

hsva-from-hsva-gamma

Convert HsvaGamma to HSVA.

HsvaGamma -> Hsva

hsva-gamma-from-hsva

Convert HSVA to HsvaGamma.

Hsva -> HsvaGamma

hsva-gamma-from-color

Convert a premultiplied Color to HsvaGamma.

Color -> HsvaGamma

color-from-hsva-gamma

Convert HsvaGamma to a premultiplied Color.

HsvaGamma -> Color

margin

Build per-side layout margins.

Float -> Float -> Float -> Float -> Margin

window-options

Build behavior and size constraints for a window container.

Bool -> Bool -> Float -> Float -> WindowOptions

modifiers

Build a modifier-key state.

Bool -> Bool -> Bool -> Bool -> Bool -> Modifiers

no-modifiers

No modifier keys pressed.

alt-modifier

Alt/Option modifier.

ctrl-modifier

Control modifier.

shift-modifier

Shift modifier.

mac-cmd-modifier

macOS Command modifier.

command-modifier

Cross-platform command modifier.

modifiers-plus

Union two modifier-key states.

Modifiers -> Modifiers -> Modifiers

modifiers-none?

Return true when no modifiers are pressed.

Modifiers -> Bool

modifiers-any?

Return true when any modifier is pressed.

Modifiers -> Bool

modifiers-all?

Return true when alt, ctrl, shift, and command are all pressed.

Modifiers -> Bool

modifiers-shift-only?

Return true when shift is the only logical modifier pressed.

Modifiers -> Bool

modifiers-command-only?

Return true when command is the only logical modifier pressed.

Modifiers -> Bool

modifiers-match-logically?

Match modifiers using upstream EGUI's logical shortcut semantics.

Modifiers -> Modifiers -> Bool

modifiers-match-exactly?

Match modifiers exactly while keeping upstream EGUI's command/ctrl handling.

Modifiers -> Modifiers -> Bool

modifiers-match-any?

Return true when at least one requested modifier is pressed.

Modifiers -> Modifiers -> Bool

hovered-file

Build a file-hover input record.

String -> String -> HoveredFile

dropped-file

Build a dropped-file input record without byte contents.

String -> String -> String -> DroppedFile

touch-device-id

Build a touch device identifier.

Int -> TouchDeviceId

touch-id

Build a touch occurrence identifier.

Int -> TouchId

raw-input

Build an upstream-style raw input payload.

Float -> Float -> List Event -> RawInput

raw-input-with-modifiers

Update a raw input payload with modifier state.

RawInput -> Modifiers -> RawInput

raw-input-with-files

Update a raw input payload with file-hover and file-drop metadata.

RawInput -> List HoveredFile -> List DroppedFile -> RawInput

input

Build pointer input using the default primary button and no text input.

Float -> Float -> Bool -> Bool -> InputState

input-with-text

Build pointer input with accumulated text and backspace state.

Float -> Float -> Bool -> Bool -> String -> Bool -> InputState

input-with-pointer-text

Build pointer input with explicit press/release edges and text input.

Float -> Float -> Bool -> Bool -> Bool -> String -> Bool -> InputState

input-with-active-id

Build pointer input with explicit active widget capture.

Float -> Float -> Bool -> Bool -> Bool -> String -> String -> Bool -> InputState

input-with-scroll

Build pointer input with scroll deltas.

Float -> Float -> Bool -> Bool -> Bool -> String -> Float -> Float -> String -> Bool -> InputState

input-with-keys

Build pointer input with keyboard edge state.

Float -> Float -> Bool -> Bool -> Bool -> String -> Float -> Float -> String -> Bool -> Bool -> Bool -> InputState

input-with-pointer-delta

Build pointer input with pointer movement deltas.

Float -> Float -> Float -> Float -> Bool -> Bool -> Bool -> String -> Float -> Float -> String -> Bool -> Bool -> Bool -> InputState

input-with-pointer-button

Build pointer input with an explicit pointer button.

Float -> Float -> Float -> Float -> PointerButton -> Bool -> Bool -> Bool -> String -> Float -> Float -> String -> Bool -> Bool -> Bool -> InputState

input-with-pointer-button-modifiers

Build pointer input with an explicit pointer button and modifiers.

Float -> Float -> Float -> Float -> PointerButton -> Bool -> Bool -> Bool -> String -> Float -> Float -> String -> Bool -> Bool -> Bool -> Modifiers -> InputState

raw-input-to-input-state

Convert upstream-style raw input to the compact frame input used by this port.

RawInput -> InputState

no-input

Default empty input state for frames without pointer or keyboard input.

stroke

Build an outline stroke.

Float -> Color -> Stroke

stroke-new

Upstream-style alias for building an outline stroke.

Float -> Color -> Stroke

transparent

Fully transparent color.

white

Opaque white color.

black

Opaque black color.

red

Opaque red color.

green

Opaque green color.

blue

Opaque blue color.

gray

Opaque middle gray color.

dark-gray

Opaque dark gray color.

light-gray

Opaque light gray color.

grey

Alias for gray.

dark-grey

Alias for dark gray.

light-grey

Alias for light gray.

brown

Opaque brown color.

dark-red

Opaque dark red color.

light-red

Opaque light red color.

cyan

Opaque cyan color.

magenta

Opaque magenta color.

yellow

Opaque yellow color.

orange

Opaque orange color.

light-yellow

Opaque light yellow color.

khaki

Opaque khaki color.

dark-green

Opaque dark green color.

light-green

Opaque light green color.

dark-blue

Opaque dark blue color.

light-blue

Opaque light blue color.

purple

Opaque purple color.

gold

Opaque gold color.

debug-color

Debug overlay color.

placeholder

Placeholder color used as a visible sentinel.

stroke-none

A stroke that paints no outline.

Stroke

stroke-kind-middle

Default stroke placement.

StrokeKind

stroke-kind-inside

Stroke placed inside the shape edge.

StrokeKind

stroke-kind-center

Stroke centered on the shape edge.

StrokeKind

stroke-kind-outside

Stroke placed outside the shape edge.

StrokeKind

stroke-width

Return the stroke width.

Stroke -> Float

stroke-color

Return the stroke color.

Stroke -> Color

stroke-is-empty?

Return true when a stroke has no visible width or alpha.

Stroke -> Bool

corner-radius

Build per-corner rounded rectangle radii.

Float -> Float -> Float -> Float -> CornerRadius

corner-radius-same

Build rounded rectangle radii where every corner is the same.

Float -> CornerRadius

corner-radius-zero

No corner rounding.

CornerRadius

corner-radius-nw

Return the northwest corner radius.

CornerRadius -> Float

corner-radius-ne

Return the northeast corner radius.

CornerRadius -> Float

corner-radius-sw

Return the southwest corner radius.

CornerRadius -> Float

corner-radius-se

Return the southeast corner radius.

CornerRadius -> Float

corner-radius-max

Return the largest corner radius.

CornerRadius -> Float

corner-radius-same?

Return true when all corners have the same radius.

CornerRadius -> Bool

texture-id-managed

Texture allocated by EGUI.

Int -> TextureId

texture-id-user

User-provided backend texture.

Int -> TextureId

texture-id-default

Default EGUI font texture identifier.

TextureId

white-uv

The UV coordinate of the default white texel.

Pos

texture-id-value

Return the numeric texture id.

TextureId -> Int

texture-id-managed?

Return true for managed EGUI textures.

TextureId -> Bool

texture-id-user?

Return true for user-provided backend textures.

TextureId -> Bool

texture-filter-nearest

Nearest-neighbor texture filtering.

TextureFilter

texture-filter-linear

Linear texture filtering.

TextureFilter

texture-wrap-clamp-to-edge

Clamp sampling outside the texture to the edge texels.

TextureWrapMode

texture-wrap-repeat

Repeat texture coordinates outside the 0-1 range.

TextureWrapMode

texture-wrap-mirrored-repeat

Mirror and repeat texture coordinates outside the 0-1 range.

TextureWrapMode

texture-options

Build texture sampling options.

TextureFilter -> TextureFilter -> TextureWrapMode -> TextureOptions

texture-options-with-mipmap-mode

Return texture options with an explicit mipmap filter.

TextureOptions -> TextureFilter -> TextureOptions

texture-options-without-mipmap-mode

Return texture options without mipmap filtering.

TextureOptions -> TextureOptions

texture-options-linear

Linear magnification and minification.

TextureOptions

texture-options-nearest

Nearest magnification and minification.

TextureOptions

texture-options-linear-repeat

Linear filtering with repeated wrapping.

TextureOptions

texture-options-linear-mirrored-repeat

Linear filtering with mirrored repeated wrapping.

TextureOptions

texture-options-nearest-repeat

Nearest filtering with repeated wrapping.

TextureOptions

texture-options-nearest-mirrored-repeat

Nearest filtering with mirrored repeated wrapping.

TextureOptions

texture-options-default

Default texture sampling options.

TextureOptions

color-image

Build a color image from explicit premultiplied Color pixels.

Int -> Int -> List Color -> ColorImage

color-image-filled

Build a color image filled with a single color.

Int -> Int -> Color -> ColorImage

color-image-from-rgba-unmultiplied

Build a color image from unmultiplied 0-255 RGBA bytes.

Int -> Int -> List Int -> ColorImage

color-image-from-rgba-premultiplied

Build a color image from premultiplied 0-255 RGBA bytes.

Int -> Int -> List Int -> ColorImage

color-image-from-rgb

Build an opaque color image from 0-255 RGB bytes.

Int -> Int -> List Int -> ColorImage

color-image-from-gray

Build an opaque grayscale image from 0-255 luminance bytes.

Int -> Int -> List Int -> ColorImage

color-image-from-grey

Alias for color-image-from-gray.

Int -> Int -> List Int -> ColorImage

color-image-with-source-size

Return a color image with an explicit source size.

ColorImage -> Pos -> ColorImage

color-image-size

Return the image size as [width, height].

ColorImage -> List Int

color-image-width

Return the image width.

ColorImage -> Int

color-image-height

Return the image height.

ColorImage -> Int

color-image-source-size

Return image source size as a vector.

ColorImage -> Pos

color-image-pixels

Return image pixels.

ColorImage -> List Color

image-data-color

Wrap a color image as image data.

ColorImage -> ImageData

image-data-size

Return image data size as [width, height].

ImageData -> List Int

image-data-width

Return image data width.

ImageData -> Int

image-data-height

Return image data height.

ImageData -> Int

image-data-bytes-per-pixel

Return bytes per pixel for image data.

ImageData -> Int

image-delta-full

Build a whole-texture image update.

ImageData -> TextureOptions -> ImageDelta

image-delta-partial

Build a partial texture image update.

Pos -> ImageData -> TextureOptions -> ImageDelta

image-delta-is-whole?

Return true when the image delta replaces the whole texture.

ImageDelta -> Bool

image-delta-is-partial?

Return true when the image delta updates only a sub-region.

ImageDelta -> Bool

texture-set-delta

Build a texture set/update entry.

TextureId -> ImageDelta -> TextureSetDelta

textures-delta

Build texture changes.

List TextureSetDelta -> List TextureId -> TexturesDelta

textures-delta-empty

Empty texture changes.

TexturesDelta

textures-delta-is-empty?

Return true when no textures changed.

TexturesDelta -> Bool

textures-delta-append

Append newer texture changes after older changes.

TexturesDelta -> TexturesDelta -> TexturesDelta

textures-delta-clear

Clear texture changes.

TexturesDelta -> TexturesDelta

widget-info

Build widget metadata with no optional details.

WidgetType -> WidgetInfo

widget-info-labeled

Build labeled widget metadata.

WidgetType -> Bool -> String -> WidgetInfo

widget-info-selected

Build selected widget metadata for checkboxes, radios, and selections.

WidgetType -> Bool -> Bool -> String -> WidgetInfo

widget-info-slider

Build slider widget metadata.

Bool -> Float -> String -> WidgetInfo

widget-info-drag-value

Build drag-value widget metadata.

Bool -> Float -> WidgetInfo

widget-info-text-edit

Build text edit widget metadata.

Bool -> String -> String -> String -> WidgetInfo

widget-info-text-selection-changed

Build text selection metadata for a text edit.

Bool -> Int -> Int -> String -> WidgetInfo

widget-type-name

Human-readable widget category name.

WidgetType -> String

widget-info-description

Text description of widget metadata for accessibility integrations.

WidgetInfo -> String

output-event-widget-info

Return the widget metadata carried by an output event.

OutputEvent -> WidgetInfo

ime-output

Build IME output for a text edit.

Rect -> Rect -> Bool -> ImeOutput

ime-output-empty

Empty IME output placeholder.

ImeOutput

open-url

Build a URL-open request.

String -> Bool -> OpenUrl

open-url-same-tab

Open a URL in the current tab on web integrations.

String -> OpenUrl

open-url-new-tab

Open a URL in a new tab on web integrations.

String -> OpenUrl

output-command-copy-text

Request copying text to the system clipboard.

String -> OutputCommand

output-command-copy-image

Request copying an image to the system clipboard.

ColorImage -> OutputCommand

output-command-open-url

Request opening a URL in the platform browser.

OpenUrl -> OutputCommand

output-command-description

Compact command description for diagnostics and tests.

OutputCommand -> String

custom-cursor-image

Build a custom cursor image.

Int -> Int -> List Int -> Int -> Int -> CustomCursorImage

custom-cursor-image-empty

Empty custom cursor image placeholder.

CustomCursorImage

cursor-icon-default

Default cursor icon.

CursorIcon

cursor-icon-all

All cursor icons exposed by upstream EGUI.

List CursorIcon

cursor-icon-name

Human-readable cursor icon name.

CursorIcon -> String

platform-output

Build platform output.

List OutputCommand -> CursorIcon -> List OutputEvent -> PlatformOutput

platform-output-empty

Empty platform output.

PlatformOutput

platform-output-with-command

Return platform output with an appended command.

PlatformOutput -> OutputCommand -> PlatformOutput

platform-output-with-cursor-icon

Return platform output with a requested cursor icon.

PlatformOutput -> CursorIcon -> PlatformOutput

platform-output-with-cursor-image

Return platform output with a requested custom cursor image.

PlatformOutput -> CustomCursorImage -> PlatformOutput

platform-output-with-event

Return platform output with an appended output event.

PlatformOutput -> OutputEvent -> PlatformOutput

platform-output-with-ime

Return platform output with IME metadata.

PlatformOutput -> ImeOutput -> PlatformOutput

platform-output-with-mutable-text-under-cursor

Return platform output with mutable text-under-cursor state.

PlatformOutput -> Bool -> PlatformOutput

platform-output-with-request-discard-reason

Return platform output with an appended discard/repaint reason.

PlatformOutput -> String -> PlatformOutput

platform-output-requested-discard?

Return true if discard/repaint was requested.

PlatformOutput -> Bool

platform-output-events-description

Describe the last platform output event, if any.

PlatformOutput -> String

platform-output-append

Append newer platform output after older output.

PlatformOutput -> PlatformOutput -> PlatformOutput

platform-output-take

Immutable equivalent of upstream PlatformOutput::take.

PlatformOutput -> PlatformOutputTakeResult

icon-data

Build icon data for a native viewport.

Int -> Int -> List Int -> IconData

icon-data-empty

Empty icon data.

IconData

viewport-id

Build a viewport id.

String -> ViewportId

viewport-id-value

Return the stable string carried by a viewport id.

ViewportId -> String

viewport-id-equal?

Return true when two viewport ids carry the same stable string.

ViewportId -> ViewportId -> Bool

viewport-id-root

Root viewport id.

ViewportId

viewport-id-pair

Build a viewport id pair.

ViewportId -> ViewportId -> ViewportIdPair

viewport-id-pair-root

Root viewport id pair.

ViewportIdPair

viewport-builder-empty

Empty viewport builder.

ViewportBuilder

viewport-builder-with-title

Return a viewport builder with an initial title.

ViewportBuilder -> String -> ViewportBuilder

viewport-builder-with-inner-size

Return a viewport builder with an initial inner size.

ViewportBuilder -> Pos -> ViewportBuilder

viewport-builder-with-position

Return a viewport builder with an initial outer position.

ViewportBuilder -> Pos -> ViewportBuilder

viewport-builder-with-min-inner-size

Return a viewport builder with an initial minimum inner size.

ViewportBuilder -> Pos -> ViewportBuilder

viewport-builder-with-max-inner-size

Return a viewport builder with an initial maximum inner size.

ViewportBuilder -> Pos -> ViewportBuilder

viewport-builder-with-fullscreen

Return a viewport builder with initial fullscreen state.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-maximized

Return a viewport builder with initial maximized state.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-resizable

Return a viewport builder with initial resizable state.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-decorations

Return a viewport builder with initial decoration state.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-icon

Return a viewport builder with a native icon.

ViewportBuilder -> IconData -> ViewportBuilder

viewport-builder-with-active

Return a viewport builder with initial active/focus state.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-visible

Return a viewport builder with initial visibility.

ViewportBuilder -> Bool -> ViewportBuilder

viewport-builder-with-window-level

Return a viewport builder with initial window level.

ViewportBuilder -> WindowLevel -> ViewportBuilder

viewport-builder-with-always-on-top

Return a viewport builder marked as always on top.

ViewportBuilder -> ViewportBuilder

viewport-builder-with-monitor

Return a viewport builder with initial target monitor.

ViewportBuilder -> Int -> ViewportBuilder

viewport-output

Build viewport output.

ViewportId -> ViewportId -> ViewportClass -> ViewportBuilder -> List ViewportCommand -> Float -> ViewportOutput

viewport-output-root

Root viewport output with no pending commands.

ViewportOutput

viewport-output-append

Append newer viewport output after older output.

ViewportOutput -> ViewportOutput -> ViewportOutput

viewport-output-list-append

Append newer viewport outputs, merging entries with the same viewport id.

List ViewportOutput -> List ViewportOutput -> List ViewportOutput

viewport-command-requires-parent-repaint?

Return true if a viewport command requires the parent viewport to repaint.

ViewportCommand -> Bool

full-output

Build full frame output.

PlatformOutput -> TexturesDelta -> List Shape -> Float -> List ViewportOutput -> FullOutput

full-output-empty

Empty full frame output.

FullOutput

full-output-append

Append newer full frame output after older output.

FullOutput -> FullOutput -> FullOutput

full-output-from-context

Package the current context paint output as a FullOutput.

Context -> FullOutput

full-output-from-context-with-textures

Package the current context paint output with explicit texture changes.

Context -> TexturesDelta -> FullOutput

full-output-from-context-with-textures-at-scale

Package the current context paint output with explicit texture changes and pixels-per-point.

Context -> TexturesDelta -> Float -> FullOutput

texture-handle

Build lightweight texture handle metadata.

TextureId -> String -> Int -> Int -> TextureOptions -> TextureHandle

texture-handle-id

Return the texture id from a handle.

TextureHandle -> TextureId

texture-handle-size

Return handle size as [width, height].

TextureHandle -> List Int

texture-handle-size-vec2

Return handle size as a vector.

TextureHandle -> Pos

texture-handle-byte-size

Return texture byte size.

TextureHandle -> Int

texture-handle-aspect-ratio

Return width / height.

TextureHandle -> Float

texture-handle-name

Return handle debug name.

TextureHandle -> String

vertex

Build a mesh vertex.

Pos -> Pos -> Color -> Vertex

vertex-untextured

Build an untextured mesh vertex using the default white UV.

Pos -> Color -> Vertex

mesh

Build a mesh from explicit indices, vertices, and texture.

List Int -> List Vertex -> TextureId -> Mesh

mesh-with-texture

Build an empty mesh for a texture.

TextureId -> Mesh

mesh-default

Default empty mesh using the EGUI font texture.

Mesh

mesh-clear

Return a mesh with its indices and vertices removed.

Mesh -> Mesh

mesh-is-empty?

Return true when the mesh contains no indices or vertices.

Mesh -> Bool

mesh-is-valid?

Return true when all mesh indices reference existing vertices.

Mesh -> Bool

mesh-vertex-count

Return the number of vertices in a mesh.

Mesh -> Int

mesh-index-count

Return the number of indices in a mesh.

Mesh -> Int

mesh-bytes-used

Return an approximate byte size for the mesh payload.

Mesh -> Int

mesh-append

Append another mesh, offsetting its indices.

Mesh -> Mesh -> Mesh

mesh-colored-vertex

Append an untextured colored vertex.

Mesh -> Pos -> Color -> Mesh

mesh-add-triangle

Append a triangle index triplet.

Mesh -> Int -> Int -> Int -> Mesh

mesh-add-rect-with-uv

Append a rectangle with explicit UVs and color.

Mesh -> Rect -> Rect -> Color -> Mesh

mesh-add-colored-rect

Append a uniformly colored rectangle.

Mesh -> Rect -> Color -> Mesh

mesh-calc-bounds

Calculate a bounding rectangle for mesh vertex positions.

Mesh -> Rect

primitive-mesh

Wrap a mesh as a rendering primitive.

Mesh -> Primitive

paint-callback

Build a custom paint callback marker.

Rect -> String -> PaintCallback

primitive-callback

Wrap a custom callback as a rendering primitive.

PaintCallback -> Primitive

paint-callback-info

Build paint callback viewport information.

Rect -> Rect -> Float -> Int -> Int -> PaintCallbackInfo

clipped-primitive

Build a clipped primitive.

Rect -> Primitive -> ClippedPrimitive

clipped-primitive-mesh

Build a clipped mesh primitive.

Rect -> Mesh -> ClippedPrimitive

clipped-primitive-callback

Build a clipped callback primitive.

Rect -> PaintCallback -> ClippedPrimitive

shadow

Build a shadow style.

Pos -> Float -> Float -> Color -> Shadow

shadow-none

No shadow.

Shadow

window-shadow

Dark theme floating window shadow, matching egui Visuals::dark().

Shadow

Dark theme popup/menu shadow, matching egui Visuals::dark().

Shadow

shadow-margin

Return the extra margin needed to contain a shadow.

Shadow -> Margin

shadow-as-shape

Convert a shadow caster rectangle into a simplified paint shape.

Shadow -> Rect -> CornerRadius -> Shape

shadow-as-shapes

Convert a shadow into a layered approximation suitable for the current renderer.

Shadow -> Rect -> CornerRadius -> List Shape

is-opaque?

Return true when a color is fully opaque.

Color -> Bool

to-opaque

Return a color with alpha forced to full opacity.

Color -> Color

color-r

Return the normalized red channel.

Color -> Float

color-g

Return the normalized green channel.

Color -> Float

color-b

Return the normalized blue channel.

Color -> Float

color-a

Return the normalized alpha channel.

Color -> Float

additive

Return an additive version of a color.

Color -> Color

color-additive

Descriptive alias for additive.

Color -> Color

is-additive?

Return true when a color is additive.

Color -> Bool

multiply

Multiply all color channels by a scalar.

Color -> Float -> Color

gamma-multiply

Gamma-space multiply alias for the normalized color representation.

Color -> Float -> Color

gamma-multiply-u8

Gamma-space multiply using a 0-255 factor.

Color -> Int -> Color

linear-multiply

Linear multiply alias for the normalized color representation.

Color -> Float -> Color

to-array

Return normalized RGBA channels as a list.

Color -> List Float

to-tuple

Return normalized RGBA channels as a list.

Color -> List Float

to-normalized-gamma-f32

Return normalized gamma RGBA channels.

Color -> List Float

to-rgba-unmultiplied

Return normalized unmultiplied RGBA channels.

Color -> List Float

to-srgba-unmultiplied

Return unmultiplied sRGBA channels in the range 0-255.

Color -> List Int

lerp-to-gamma

Lerp this color toward another color.

Color -> Color -> Float -> Color

blend

Blend on-top over value.

Color -> Color -> Color

intensity

Return the perceived intensity of a color.

Color -> Float

tint-color-towards

Tint a color towards a target color.

Color -> Color -> Color

The dark theme hyperlink color (egui hyperlink_color).

body-text-color

The dark theme body text color (egui noninteractive fg).

weak-text-color

The dark theme weak text color.

weak-text-alpha

The dark theme weak text alpha (Visuals::dark().weak_text_alpha).

panel-fill-color

The dark theme panel/window fill (egui panel_fill).

window-fill-color

The dark theme window fill (egui window_fill).

window-stroke

The dark theme window stroke (egui window_stroke).

window-corner-radius

The dark theme window corner radius (egui window_corner_radius).

selection-bg-fill

The dark theme selection background (egui selection.bg_fill).

selection-stroke

The dark theme selection stroke (egui selection.stroke).

faint-bg-color

The dark theme faint background color (egui faint_bg_color).

extreme-bg-color

The dark theme extreme background color (egui extreme_bg_color).

text-edit-bg-color

The dark theme text edit background color.

code-bg-color

The dark theme code background color.

warn-fg-color

The dark theme warning foreground color.

error-fg-color

The dark theme error foreground color.

disabled-alpha

The dark theme disabled alpha (Visuals::dark().disabled_alpha).

frame-style

Build a reusable custom frame style with symmetric margins.

Float -> Float -> Float -> Color -> Color -> Float -> FrameStyle

frame-style-with-margins

Build a reusable custom frame style with per-side margins.

Margin -> Margin -> Float -> Color -> Color -> Float -> FrameStyle

default-frame-style

Default custom frame style, matching the lightweight group frame.

resize-options

Build size and interaction options for a resizable container.

Bool -> Float -> Float -> Float -> Float -> ResizeOptions

measure-text

Width of proportional (Ubuntu-Light) text at the given font size.

String -> Float -> Float

measure-mono-text

Width of monospace (Hack) text at the given font size.

String -> Float -> Float

char-advance-at

Advance width in pixels for a character code at a font size.

Int -> Float -> Bool -> Float

text-line-height

Line height of proportional text at the given font size.

Float -> Float

default-window-options

Default draggable and resizable window behavior.

default-resize-options

Default interactive resize constraints.

available-width

Return the remaining horizontal space in the current layout context.

Context -> Float

available-height

Return the remaining vertical frame space below the current cursor.

Context -> Float

available-size

Return the remaining available size in the current layout context.

Context -> Pos

available-rect

Return the remaining available rectangle in the current layout context.

Context -> Rect

available-rect-before-wrap

Upstream-style alias for the remaining available rectangle.

Context -> Rect

available-size-before-wrap

Upstream-style alias for the remaining available size before wrapping.

Context -> Pos

cursor

Return the rectangle currently available from the next widget position.

Context -> Rect

next-widget-position

Return the next widget position in the current layout context.

Context -> Pos

max-rect

Return the full frame rectangle for the current context.

Context -> Rect

is-enabled?

Return true when the current UI context accepts interaction.

Context -> Bool

with-max-width

Return a copy of ctx constrained to a new maximum content width.

Context -> Float -> Context

set-max-width

Upstream-style alias for constraining the maximum content width.

Context -> Float -> Context

set-width

Upstream-style alias for setting the current content width.

Context -> Float -> Context

with-spacing-xy

Return a copy of ctx with different horizontal and vertical widget spacing.

Context -> Float -> Float -> Context

with-spacing

Return a copy of ctx with a different spacing between widgets.

Context -> Float -> Context

with-item-height

Return a copy of ctx with a different default interactive widget height.

Context -> Float -> Context

with-layout-metrics

Return a copy of ctx with local width, spacing, and item height controls.

Context -> Float -> Float -> Float -> Context

context-platform-output

Return the platform output accumulated by the current frame context.

Context -> PlatformOutput

context-viewport-output

Return the viewport output accumulated by the current frame context.

Context -> List ViewportOutput

context-with-frame-output

Return a context with explicit platform and viewport output.

Context -> PlatformOutput -> List ViewportOutput -> Context

context-with-platform-output

Return a context with explicit platform output.

Context -> PlatformOutput -> Context

context-with-cursor-icon

Return a context with a requested cursor icon for this frame.

Context -> CursorIcon -> Context

context-with-cursor-image

Return a context with a custom cursor image for this frame.

Context -> CustomCursorImage -> Context

context-with-viewport-output

Return a context with explicit viewport output.

Context -> List ViewportOutput -> Context

request-output-command

Append a platform output command to the current frame context.

Context -> OutputCommand -> Context

request-copy-text

Append a copy-text request to the current frame context.

Context -> String -> Context

request-copy-image

Append a copy-image request to the current frame context.

Context -> ColorImage -> Context

request-open-url

Append an open-url request to the current frame context.

Context -> OpenUrl -> Context

viewport-command-close

Root viewport close command.

ViewportCommand

viewport-command-cancel-close

Root viewport cancel-close command.

ViewportCommand

viewport-command-fullscreen

Build a root viewport fullscreen command.

Bool -> ViewportCommand

viewport-command-transparent

Build a root viewport transparent command.

Bool -> ViewportCommand

viewport-command-title

Build a root viewport title command.

String -> ViewportCommand

viewport-command-visible

Build a root viewport visibility command.

Bool -> ViewportCommand

viewport-command-start-drag

Build a root viewport start-drag command.

ViewportCommand

viewport-command-outer-position

Build a root viewport outer-position command.

Pos -> ViewportCommand

viewport-command-inner-size

Build a root viewport inner-size command.

Pos -> ViewportCommand

viewport-command-min-inner-size

Build a root viewport minimum inner-size command.

Pos -> ViewportCommand

viewport-command-max-inner-size

Build a root viewport maximum inner-size command.

Pos -> ViewportCommand

viewport-command-resize-increments

Build a root viewport resize-increments command.

Pos -> ViewportCommand

viewport-command-clear-resize-increments

Build a root viewport clear resize-increments command.

ViewportCommand

viewport-command-begin-resize

Build a root viewport begin-resize command.

ResizeDirection -> ViewportCommand

viewport-command-resizable

Build a root viewport resizable command.

Bool -> ViewportCommand

viewport-command-enable-buttons

Build a root viewport enable-buttons command.

Bool -> Bool -> Bool -> ViewportCommand

viewport-command-minimized

Build a root viewport minimized command.

Bool -> ViewportCommand

viewport-command-maximized

Build a root viewport maximized command.

Bool -> ViewportCommand

viewport-command-set-monitor

Build a root viewport monitor command.

Int -> ViewportCommand

viewport-command-decorations

Build a root viewport decorations command.

Bool -> ViewportCommand

viewport-command-window-level

Build a root viewport window-level command.

WindowLevel -> ViewportCommand

viewport-command-icon

Build a root viewport icon command.

IconData -> ViewportCommand

viewport-command-clear-icon

Build a root viewport clear-icon command.

ViewportCommand

viewport-command-ime-rect

Build a root viewport IME rectangle command.

Rect -> ViewportCommand

viewport-command-ime-allowed

Build a root viewport IME allowed command.

Bool -> ViewportCommand

viewport-command-ime-purpose

Build a root viewport IME purpose command.

ImePurpose -> ViewportCommand

viewport-command-focus

Build a root viewport focus command.

ViewportCommand

viewport-command-request-user-attention

Build a root viewport user-attention command.

UserAttentionType -> ViewportCommand

viewport-command-set-theme

Build a root viewport system-theme command.

SystemTheme -> ViewportCommand

viewport-command-content-protected

Build a root viewport content-protected command.

Bool -> ViewportCommand

viewport-command-cursor-position

Build a root viewport cursor-position command.

Pos -> ViewportCommand

viewport-command-cursor-grab

Build a root viewport cursor-grab command.

CursorGrab -> ViewportCommand

viewport-command-cursor-visible

Build a root viewport cursor-visible command.

Bool -> ViewportCommand

viewport-command-mouse-passthrough

Build a root viewport mouse-passthrough command.

Bool -> ViewportCommand

viewport-command-screenshot

Build a root viewport screenshot command.

String -> ViewportCommand

viewport-command-request-cut

Build a root viewport request-cut command.

ViewportCommand

viewport-command-request-copy

Build a root viewport request-copy command.

ViewportCommand

viewport-command-request-paste

Build a root viewport request-paste command.

ViewportCommand

send-viewport-command

Append a root viewport command to the current frame context.

Context -> ViewportCommand -> Context

send-viewport-cmd

Upstream-style alias for appending a root viewport command.

Context -> ViewportCommand -> Context

begin-frame

Begin a new immediate-mode frame.

Float -> Float -> InputState -> Context

begin-raw-frame

Begin a new immediate-mode frame from an upstream-style RawInput payload.

RawInput -> Context

shapes

Return the primitive paint output collected so far. Overlay shapes (open popups) are hoisted after everything else so they draw above content that was added later in the frame.

Context -> List Shape

paint-shape

Append a raw paint shape without advancing layout or allocating a widget id.

Context -> Shape -> Context

paint-rect

Paint a rectangle without advancing layout or allocating a widget id.

Context -> Rect -> Color -> Color -> Float -> Context

paint-rect-with-stroke

Paint a rectangle using a Stroke value.

Context -> Rect -> Color -> Stroke -> Context

paint-rect-with-stroke-kind

Paint a rectangle using a Stroke value and placement hint.

Context -> Rect -> Color -> Stroke -> StrokeKind -> Context

paint-rounded-rect

Paint a rounded rectangle without advancing layout or allocating a widget id.

Context -> Rect -> Float -> Color -> Color -> Float -> Context

paint-rounded-rect-with-stroke

Paint a rounded rectangle using CornerRadius and Stroke values.

Context -> Rect -> CornerRadius -> Color -> Stroke -> Context

paint-rounded-rect-with-stroke-kind

Paint a rounded rectangle using CornerRadius, Stroke, and placement hint values.

Context -> Rect -> CornerRadius -> Color -> Stroke -> StrokeKind -> Context

paint-circle

Paint a circle without advancing layout or allocating a widget id.

Context -> Pos -> Float -> Color -> Color -> Float -> Context

paint-circle-with-stroke

Paint a circle using a Stroke value.

Context -> Pos -> Float -> Color -> Stroke -> Context

paint-text

Paint text without advancing layout or allocating a widget id.

Context -> Pos -> String -> Color -> Context

paint-image

Paint a texture without advancing layout or allocating a widget id.

Context -> Rect -> Int -> Rect -> Color -> Context

paint-image-texture-id

Paint a texture identifier without advancing layout or allocating a widget id.

Context -> Rect -> TextureId -> Rect -> Color -> Context

begin-panel

Begin drawing widgets inside a framed panel rectangle.

Context -> Rect -> PanelResult

begin-panel-with-inner-margin

Begin drawing widgets inside a framed panel rectangle with a custom inner margin.

Context -> Rect -> Margin -> PanelResult

begin-panel-with-inner-margin-no-stroke

Begin drawing widgets inside a filled panel rectangle with no stroke.

Context -> Rect -> Margin -> PanelResult

end-panel

End a panel and return to the outer layout context.

PanelResult -> Context -> Context

begin-top-panel

Begin a framed panel docked to the top of the remaining frame.

Context -> Float -> PanelResult

begin-top-panel-with-inner-margin

Begin a framed top panel with a custom inner margin.

Context -> Float -> Margin -> PanelResult

begin-bottom-panel

Begin a framed panel docked to the bottom of the frame.

Context -> Float -> PanelResult

begin-left-panel

Begin a framed panel docked to the left of the remaining frame.

Context -> Float -> PanelResult

begin-left-panel-with-inner-margin

Begin a framed left panel with a custom inner margin.

Context -> Float -> Margin -> PanelResult

begin-resizable-left-panel

Begin a resizable framed panel docked to the left of the remaining frame.

Context -> Float -> Float -> Float -> ResizablePanelResult

begin-right-panel

Begin a framed panel docked to the right of the frame.

Context -> Float -> PanelResult

begin-resizable-right-panel

Begin a resizable framed panel docked to the right of the frame.

Context -> Float -> Float -> Float -> ResizablePanelResult

begin-central-panel

Begin a framed panel filling the remaining frame area.

Context -> PanelResult

end-resizable-panel

End a resizable side panel and return to the outer layout context.

ResizablePanelResult -> Context -> Context

begin-window

Begin drawing widgets inside a titled absolute-position window.

Context -> String -> Rect -> WindowResult

begin-window-with-options

Begin a titled absolute-position window with explicit behavior options.

Context -> String -> Rect -> WindowOptions -> WindowResult

begin-closeable-window

Begin a titled absolute-position window with an integrated close button.

Context -> String -> Rect -> Bool -> CloseableWindowResult

begin-closeable-window-with-options

Begin a closeable titled window with explicit behavior options.

Context -> String -> Rect -> Bool -> WindowOptions -> CloseableWindowResult

end-window

End a window and merge its shapes without advancing the outer layout cursor.

WindowResult -> Context -> Context

end-closeable-window

End a closeable window. A closed result preserves input and ids but drops window shapes for this frame.

CloseableWindowResult -> Context -> Context

begin-centered-modal

Begin a centered modal dialog with a dimmed backdrop.

Context -> Float -> Float -> Bool -> ModalResult

begin-modal

Begin a modal dialog at an explicit rectangle. Outside pointer release or Escape requests closure for the next frame and suppresses modal paint.

Context -> Rect -> Bool -> ModalResult

end-modal

End a modal dialog and merge its shapes without advancing the outer layout.

ModalResult -> Context -> Context

begin-popup-below

Begin a popup below an anchor response.

Context -> Response -> Float -> Float -> Bool -> PopupResult

begin-popup-above

Begin a popup above an anchor response.

Context -> Response -> Float -> Float -> Bool -> PopupResult

begin-popup-left

Begin a popup to the left of an anchor response.

Context -> Response -> Float -> Float -> Bool -> PopupResult

begin-popup-right

Begin a popup to the right of an anchor response.

Context -> Response -> Float -> Float -> Bool -> PopupResult

begin-popup

Begin a floating popup at an explicit rectangle. Outside pointer release or Escape requests closure for the next frame and suppresses popup paint.

Context -> Rect -> Bool -> PopupResult

end-popup

End a popup and merge its shapes without advancing the outer layout.

PopupResult -> Context -> Context

begin-area

Begin drawing widgets inside an absolute-position, unframed area.

Context -> Rect -> AreaResult

begin-movable-area

Begin drawing widgets inside an absolute-position area that moves while dragged.

Context -> Rect -> AreaResult

end-area

End an absolute-position area and merge its shapes without advancing layout.

AreaResult -> Context -> Context

begin-horizontal

Begin a horizontal row. Widgets added to result.ctx advance left-to-right until end-horizontal returns to the outer layout.

Context -> HorizontalResult

horizontal

Upstream-style alias for beginning a horizontal layout.

Context -> HorizontalResult

horizontal-centered

Upstream-style alias for beginning a centered horizontal layout.

Context -> HorizontalResult

horizontal-top

Upstream-style alias for beginning a top-aligned horizontal layout.

Context -> HorizontalResult

end-horizontal

End a horizontal row and return to the outer layout context.

HorizontalResult -> Context -> Context

begin-menu-bar

Begin a framed horizontal menu bar. Menu buttons can be placed in result.ctx, then merged with end-menu-bar.

Context -> MenuBarResult

end-menu-bar

End a menu bar and return to the outer layout. Open menu popups are painted but do not expand the menu bar's reserved layout height.

MenuBarResult -> Context -> Context

begin-horizontal-wrapped

Begin a horizontal row that can wrap onto additional rows.

Context -> HorizontalResult

horizontal-wrapped

Upstream-style alias for beginning a wrapping horizontal layout.

Context -> HorizontalResult

begin-tab-bar

Begin a horizontal tab bar.

Context -> HorizontalResult

end-tab-bar

End a horizontal tab bar.

HorizontalResult -> Context -> Context

wrapped-next-row

Move a wrapped horizontal layout to the next row.

Context -> Context

end-row

Upstream-style alias for moving to the next row in wrapping layouts.

Context -> Context

wrap-if-needed

Move a wrapped horizontal layout to the next row if the next item would overflow.

Context -> Float -> Context

end-horizontal-wrapped

End a wrapped horizontal layout and advance by all populated rows.

HorizontalResult -> Context -> Context

begin-scope

Begin a scoped child layout. The child inherits the parent layout direction and end-scope advances the outer layout by the child's combined bounds.

Context -> ScopeResult

scope

Upstream-style alias for beginning a scoped child layout.

Context -> ScopeResult

end-scope

End a scoped child layout and return to the outer layout context.

ScopeResult -> Context -> Context

begin-visible-ui

Begin a child layout that can be hidden while still reserving layout space.

Context -> Bool -> VisibleUiResult

end-visible-ui

End a visible UI scope and return to the outer layout context.

VisibleUiResult -> Context -> Context

begin-enabled-ui

Begin a scoped child layout that can disable interaction for its contents.

Context -> Bool -> EnabledUiResult

end-enabled-ui

End an enabled UI scope and return to the outer layout context.

EnabledUiResult -> Context -> Context

begin-vertical

Begin a vertical child layout. Widgets added to result.ctx advance top-to-bottom until end-vertical returns to the outer layout.

Context -> VerticalResult

vertical

Upstream-style alias for beginning a vertical layout.

Context -> VerticalResult

vertical-centered

Upstream-style alias for beginning a centered vertical layout.

Context -> VerticalResult

vertical-centered-justified

Upstream-style alias for beginning a centered, justified vertical layout.

Context -> VerticalResult

end-vertical

End a vertical child layout and return to the outer layout context.

VerticalResult -> Context -> Context

begin-frame-container

Begin a custom framed vertical container.

Context -> FrameStyle -> FrameResult

end-frame-container

End a custom frame and return to the outer layout context.

FrameResult -> Context -> Context

begin-resize

Begin a resizable framed child UI region.

Context -> Float -> Float -> ResizeResult

begin-resize-with-options

Begin a resizable framed child UI region with explicit behavior options.

Context -> Float -> Float -> ResizeOptions -> ResizeResult

end-resize

End a resizable child UI region and advance the outer layout by its size.

ResizeResult -> Context -> Context

begin-group

Begin a framed vertical group. Widgets added to result.ctx are inset together and end-group advances the outer layout by the frame bounds.

Context -> GroupResult

group

Upstream-style alias for beginning a grouped child layout.

Context -> GroupResult

end-group

End a group and return to the outer layout context.

GroupResult -> Context -> Context

begin-indent

Begin an indented vertical child layout.

Context -> Float -> IndentResult

indent

Upstream-style alias for beginning an indented child layout.

Context -> Float -> IndentResult

end-indent

End an indented layout and return to the outer layout context.

IndentResult -> Context -> Context

begin-grid

Begin a fixed-column grid layout.

Context -> Int -> GridResult

begin-striped-grid

Begin a fixed-column grid layout with alternating row backgrounds.

Context -> Int -> GridResult

grid-next-column

Move a grid to the next column, wrapping to a new row after the last column.

GridResult -> Context -> GridResult

grid-next-row

Move a grid to the first column of the next row.

GridResult -> Context -> GridResult

end-grid

End a grid and return to the outer layout context.

GridResult -> Context -> Context

begin-table

Begin a fixed-column table layout with row and column separators.

Context -> Int -> TableResult

table-next-column

Move a table to the next column, wrapping to a new row after the last column.

TableResult -> Context -> TableResult

table-next-row

Move a table to the first column of the next row.

TableResult -> Context -> TableResult

end-table

End a table and return to the outer layout context.

TableResult -> Context -> Context

begin-columns

Begin independent vertical columns. Each column keeps its own vertical flow; call columns-next to move to the next column and end-columns to return to the outer layout.

Context -> Int -> ColumnsResult

columns

Upstream-style alias for beginning independent vertical columns.

Context -> Int -> ColumnsResult

columns-next

Move independent columns to the next column, clamping at the final column.

ColumnsResult -> Context -> ColumnsResult

end-columns

End independent columns and advance by the tallest populated column.

ColumnsResult -> Context -> Context

contains-point?

Return true when a point is inside a rectangle.

Rect -> Pos -> Bool

contains?

Upstream-style alias for rectangle containment.

Rect -> Pos -> Bool

intersects?

Return true when two rectangles overlap.

Rect -> Rect -> Bool

same-line

Place the next widget on the same row as the previous widget.

Context -> Context

add-space

Reserve layout space without emitting paint shapes.

Context -> Float -> Float -> Context

allocate-space

Reserve layout space using the upstream Ui::allocate_space naming.

Context -> Float -> Float -> UiResult

begin-allocate-ui

Begin a fixed-size child UI region.

Context -> Float -> Float -> AllocateUiResult

begin-horizontal-allocate-ui

Begin a fixed-size child UI region with horizontal child layout.

Context -> Float -> Float -> AllocateUiResult

end-allocate-ui

End a fixed-size child UI region, expanding the reserved space if children overflow.

AllocateUiResult -> Context -> Context

allocate-response

Reserve interactive layout space without emitting paint shapes.

Context -> Float -> Float -> UiResult

allocate-exact-size

Allocate an exact interactive rectangle using upstream Ui::allocate_exact_size naming.

Context -> Float -> Float -> UiResult

allocate-at-least

Allocate at least the requested interactive size.

The current Kit layout engine has no separate intrinsic widget size negotiation, so this is equivalent to allocate-exact-size.

Context -> Float -> Float -> UiResult

allocate-rect

Reserve an interactive rectangle without emitting paint shapes.

Context -> Rect -> UiResult

begin-scroll-area

Begin a scroll area. Draw child widgets into result.ctx, then pass it to end-scroll-area.

Context -> Rect -> Float -> Float -> ScrollAreaResult

begin-horizontal-scroll-area

Begin a horizontal scroll area. Draw child widgets into result.ctx, then pass it to end-scroll-area.

Context -> Rect -> Float -> Float -> ScrollAreaResult

begin-both-scroll-area

Begin a bidirectional scroll area. Draw child widgets into result.ctx, then pass it to end-scroll-area.

Context -> Rect -> Float -> Float -> Float -> Float -> ScrollAreaResult

end-scroll-area

End a scroll area and return to the outer layout context.

ScrollAreaResult -> Context -> Context

hovered?

Return true when a response is hovered by the pointer.

Response -> Bool

active?

Return true when a response owns active pointer capture.

Response -> Bool

pressed?

Return true when a response was pressed this frame.

Response -> Bool

clicked?

Return true when a response was clicked this frame.

Response -> Bool

is-pointer-clicked?

Return true when this response was clicked by any pointer button.

Response -> Bool

pointer-button

Return the pointer button associated with this response.

Response -> PointerButton

is-clicked-by?

Return true when this response was clicked by the requested pointer button.

Response -> PointerButton -> Bool

clicked-by?

Upstream-style alias for testing the pointer button used for a click.

Response -> PointerButton -> Bool

is-primary-clicked?

Return true when this response was clicked by the primary pointer button.

Response -> Bool

primary-clicked?

Upstream-style alias for primary pointer clicks.

Response -> Bool

is-secondary-clicked?

Return true when this response was clicked by the secondary pointer button.

Response -> Bool

secondary-clicked?

Upstream-style alias for secondary pointer clicks.

Response -> Bool

is-middle-clicked?

Return true when this response was clicked by the middle pointer button.

Response -> Bool

middle-clicked?

Upstream-style alias for middle pointer clicks.

Response -> Bool

changed?

Return true when a widget response changed its value.

Response -> Bool

drag-delta

Return the pointer drag delta carried by a response.

Response -> Pos

drag-delta-x

Return the horizontal pointer drag delta carried by a response.

Response -> Float

drag-delta-y

Return the vertical pointer drag delta carried by a response.

Response -> Float

has-drag-delta?

Return true when a response carries a non-zero drag delta.

Response -> Bool

is-dragged?

Return true when a response is active and has a drag delta.

Response -> Bool

dragged?

Upstream-style alias for active responses with drag movement this frame.

Response -> Bool

contains-pointer?

Upstream-style alias for testing whether the pointer is within a response.

Response -> Bool

is-pointer-button-down-on?

Upstream-style alias for testing whether the pointer is currently down on a response.

Response -> Bool

mark-changed

Return a response marked as changed.

Response -> Response

with-new-rect

Return a response with a replacement rectangle.

Response -> Rect -> Response

response-union

Return a response covering both input responses.

Response -> Response -> Response

union

Upstream-style alias for combining two responses.

Response -> Response -> Response

union-response

Descriptive alias for combining two responses.

Response -> Response -> Response

on-hover-text

Append hover text for a response without advancing layout or allocating a widget id.

Context -> Response -> String -> Context

begin-hover-ui

Begin a tooltip-style floating UI when a response is hovered. Draw widgets into result.ctx, then pass that context to end-hover-ui.

Context -> Response -> Float -> Float -> PopupResult

end-hover-ui

End a hover UI and merge its shapes without advancing the outer layout.

PopupResult -> Context -> Context

label-new

Build a builder-style static text widget.

String -> Label

label-text

Return the label text.

Label -> String

label-wrap-mode

Return a label with an explicit wrap mode.

Label -> TextWrapMode -> Label

label-wrap

Return a label that wraps across multiple rows when needed.

Label -> Label

label-truncate

Return a label that truncates to one row.

Label -> Label

label-extend

Return a label that can extend beyond the current available width.

Label -> Label

label-halign

Return a label with explicit horizontal alignment inside its reserved width.

Label -> Align -> Label

label-selectable

Return a label with explicit text selectability.

Label -> Bool -> Label

label-sense

Return a label with explicit interaction sense.

Label -> Sense -> Label

label-show-tooltip-when-elided

Return a label with tooltip-elision policy recorded for API parity.

Label -> Bool -> Label

label-widget

Add a builder-style static text widget.

Context -> Label -> UiResult

add-label

Alias for adding a builder-style static text widget.

Context -> Label -> UiResult

label

Add static text to the current frame.

Context -> String -> UiResult

label-visible

Add static text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

label-sized

Add static text inside a fixed-size layout rectangle.

Context -> String -> Float -> Float -> UiResult

label-sized-visible

Add static fixed-size text that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Bool -> UiResult

colored-label

Add static text with an explicit color.

Context -> Color -> String -> UiResult

colored-label-visible

Add colored static text that can reserve layout space without being painted.

Context -> Color -> String -> Bool -> UiResult

heading

Add heading text with a taller layout row.

Context -> String -> UiResult

heading-visible

Add heading text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

strong

Add emphasized text.

Context -> String -> UiResult

strong-visible

Add emphasized text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

small

Add smaller body text.

Context -> String -> UiResult

small-visible

Add smaller body text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

monospace

Add fixed-width-style text.

Context -> String -> UiResult

monospace-visible

Add fixed-width-style text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

code

Add code text on a rounded background.

Context -> String -> UiResult

code-visible

Add code text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

weak

Add de-emphasized text.

Context -> String -> UiResult

weak-visible

Add de-emphasized text that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

separator

Add a visual separator that adapts to vertical or horizontal layout.

Context -> UiResult

separator-visible

Add a visual separator that can reserve layout space without being painted.

Context -> Bool -> UiResult

horizontal-splitter

Add a vertical splitter handle that updates value while dragged horizontally.

Context -> Float -> Float -> Float -> Float -> SplitterResult

vertical-splitter

Add a horizontal splitter handle that updates value while dragged vertically.

Context -> Float -> Float -> Float -> Float -> SplitterResult

spinner

Add a passive loading spinner.

Context -> UiResult

spinner-visible

Add a passive loading spinner that can reserve layout space without being painted.

Context -> Bool -> UiResult

button-new

Build a builder-style text button.

String -> Button

button-selectable

Build a selectable text button.

Bool -> String -> Button

button-fill

Return a button with a custom background fill.

Button -> Color -> Button

button-stroke

Return a button with a custom stroke.

Button -> Stroke -> Button

button-small

Return a button using compact sizing.

Button -> Button

button-frame

Return a button with its frame explicitly enabled or disabled.

Button -> Bool -> Button

button-frame-when-inactive

Return a button that can hide its frame while inactive.

Button -> Bool -> Button

button-sense

Return a button with a custom interaction sense.

Button -> Sense -> Button

button-min-size

Return a button with a minimum size.

Button -> Pos -> Button

button-corner-radius

Return a button with explicit corner rounding.

Button -> CornerRadius -> Button

button-selected

Return a button marked as selected.

Button -> Bool -> Button

button-widget

Add a builder-style text button.

Context -> Button -> UiResult

add-button

Alias for adding a builder-style text button.

Context -> Button -> UiResult

button

Add a clickable text button to the current frame.

Context -> String -> UiResult

button-sized

Add a clickable text button inside a fixed-size layout rectangle.

Context -> String -> Float -> Float -> UiResult

button-enabled

Add a button that can be locally disabled without changing the outer context.

Context -> String -> Bool -> UiResult

button-visible

Add a button that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

theme-preference-switch

Show a small frameless light/dark theme switch, matching egui's global theme toggle. When dark mode is active the button shows a sun and clicking switches to light.

Context -> Bool -> ToggleResult

small-button

Add a compact clickable text button.

Context -> String -> UiResult

small-button-enabled

Add a compact button that can be locally disabled without changing the outer context.

Context -> String -> Bool -> UiResult

small-button-visible

Add a compact button that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

Add a full-width menu item row.

Context -> String -> UiResult

Add a menu item that can be locally disabled without changing the outer context.

Context -> String -> Bool -> UiResult

Add a menu item that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

Add a full-width checkbox row for menu content.

Context -> String -> Bool -> CheckboxResult

Add a menu checkbox that can be locally disabled without changing the outer context.

Context -> String -> Bool -> Bool -> CheckboxResult

Add a menu checkbox that can reserve layout space without being painted.

Context -> String -> Bool -> Bool -> CheckboxResult

reset-button-string

Add a reset button for string state.

Context -> String -> String -> String -> StringValueResult

reset-button-float

Add a reset button for float state.

Context -> String -> Float -> Float -> FloatValueResult

Add a clickable underlined text link. Opening URLs is left to app code.

Context -> String -> UiResult

Add a clickable text link that can be locally disabled without changing the outer context.

Context -> String -> Bool -> UiResult

Add a clickable text link that can reserve layout space without being painted.

Context -> String -> Bool -> UiResult

Add a hyperlink using the URL as its visible label.

Context -> String -> HyperlinkResult

Add a hyperlink that can be locally disabled without changing the outer context.

Context -> String -> Bool -> HyperlinkResult

Add a hyperlink that can reserve layout space without being painted.

Context -> String -> Bool -> HyperlinkResult

Add a hyperlink with separate visible label and URL.

Context -> String -> String -> HyperlinkResult

Add a hyperlink with separate visible label and URL that can be locally disabled.

Context -> String -> String -> Bool -> HyperlinkResult

Add a hyperlink with separate visible label and URL that can reserve layout space without being painted.

Context -> String -> String -> Bool -> HyperlinkResult

image

Add an image using the full texture as the source rectangle.

Context -> Int -> Float -> Float -> UiResult

image-texture-id

Add an image from a TextureId.

Context -> TextureId -> Float -> Float -> UiResult

image-visible

Add an image that can reserve layout space without being painted.

Context -> Int -> Float -> Float -> Bool -> UiResult

image-region

Add an image using a source rectangle from the texture.

Context -> Int -> Rect -> Float -> Float -> UiResult

image-region-texture-id

Add an image region from a TextureId.

Context -> TextureId -> Rect -> Float -> Float -> UiResult

image-region-visible

Add an image region that can reserve layout space without being painted.

Context -> Int -> Rect -> Float -> Float -> Bool -> UiResult

image-region-tinted

Add an image using a source rectangle and tint.

Context -> Int -> Rect -> Float -> Float -> Color -> UiResult

image-region-tinted-texture-id

Add a tinted image region from a TextureId.

Context -> TextureId -> Rect -> Float -> Float -> Color -> UiResult

image-region-tinted-visible

Add an image using a source rectangle and tint that can reserve layout space without being painted.

Context -> Int -> Rect -> Float -> Float -> Color -> Bool -> UiResult

image-button

Add a clickable image button using the full texture as the source rectangle.

Context -> Int -> Float -> Float -> UiResult

image-button-texture-id

Add a clickable image button from a TextureId.

Context -> TextureId -> Float -> Float -> UiResult

image-button-enabled

Add a clickable image button that can be locally disabled without changing the outer context.

Context -> Int -> Float -> Float -> Bool -> UiResult

image-button-visible

Add a clickable image button that can reserve layout space without being painted.

Context -> Int -> Float -> Float -> Bool -> UiResult

image-button-region

Add a clickable image button using a source rectangle from the texture.

Context -> Int -> Rect -> Float -> Float -> UiResult

image-button-region-texture-id

Add a clickable image button region from a TextureId.

Context -> TextureId -> Rect -> Float -> Float -> UiResult

image-button-region-enabled

Add a clickable image button region that can be locally disabled without changing the outer context.

Context -> Int -> Rect -> Float -> Float -> Bool -> UiResult

image-button-region-visible

Add a clickable image button region that can reserve layout space without being painted.

Context -> Int -> Rect -> Float -> Float -> Bool -> UiResult

image-button-region-tinted

Add a clickable image button using a source rectangle and tint.

Context -> Int -> Rect -> Float -> Float -> Color -> UiResult

image-button-region-tinted-texture-id

Add a clickable tinted image button region from a TextureId.

Context -> TextureId -> Rect -> Float -> Float -> Color -> UiResult

image-button-region-tinted-enabled

Add a clickable tinted image button region that can be locally disabled without changing the outer context.

Context -> Int -> Rect -> Float -> Float -> Color -> Bool -> UiResult

image-button-region-tinted-visible

Add a clickable tinted image button region that can reserve layout space without being painted.

Context -> Int -> Rect -> Float -> Float -> Color -> Bool -> UiResult

checkbox-new

Build a builder-style checkbox.

Bool -> String -> Checkbox

checkbox-without-text

Build a builder-style checkbox without label text.

Bool -> Checkbox

checkbox-indeterminate

Return a checkbox that displays the indeterminate visual state.

Checkbox -> Bool -> Checkbox

checkbox-widget

Add a builder-style checkbox and return its next checked state.

Context -> Checkbox -> CheckboxResult

add-checkbox

Alias for adding a builder-style checkbox.

Context -> Checkbox -> CheckboxResult

checkbox

Add a checkbox and return its next checked state.

Context -> String -> Bool -> CheckboxResult

checkbox-visible

Add a checkbox that can reserve layout space without being painted.

Context -> String -> Bool -> Bool -> CheckboxResult

checkbox-enabled

Add a checkbox that can be locally disabled without changing the outer context.

Context -> String -> Bool -> Bool -> CheckboxResult

toggle-value

Add a selectable-button-style boolean toggle and return its next state.

Context -> String -> Bool -> ToggleResult

toggle-value-with-computer-icon

Add a selectable-button-style boolean toggle with a leading computer icon. This mirrors upstream labels such as "💻 Backend" without depending on emoji glyph rendering.

Context -> String -> Bool -> ToggleResult

toggle-value-visible

Add a selectable-button-style boolean toggle that can reserve layout space without being painted.

Context -> String -> Bool -> Bool -> ToggleResult

toggle-value-enabled

Add a selectable-button-style boolean toggle that can be locally disabled without changing the outer context.

Context -> String -> Bool -> Bool -> ToggleResult

color-button

Add an interactive color swatch button.

Context -> Color -> Float -> Float -> UiResult

color-button-enabled

Add an interactive color swatch button that can be locally disabled without changing the outer context.

Context -> Color -> Float -> Float -> Bool -> UiResult

color-button-visible

Add an interactive color swatch button that can reserve layout space without being painted.

Context -> Color -> Float -> Float -> Bool -> UiResult

color-edit-rgba

Add an rgba color editor with one draggable track per channel.

Context -> String -> Color -> ColorValueResult

color-edit-rgba-enabled

Add an rgba color editor that can be locally disabled without changing the outer context.

Context -> String -> Color -> Bool -> ColorValueResult

color-edit-rgba-visible

Add an rgba color editor that can reserve layout space without being painted.

Context -> String -> Color -> Bool -> ColorValueResult

tab

Add a tab selector and return value when clicked.

Context -> String -> String -> String -> StringSelectionResult

tab-visible

Add a tab selector that can reserve layout space without being painted.

Context -> String -> String -> String -> Bool -> StringSelectionResult

tab-enabled

Add a tab selector that can be locally disabled without changing the outer context.

Context -> String -> String -> String -> Bool -> StringSelectionResult

selectable-label

Add a selectable text label and return its next selected state.

Context -> String -> Bool -> SelectionResult

selectable-label-visible

Add a selectable label that can reserve layout space without being painted.

Context -> String -> Bool -> Bool -> SelectionResult

selectable-label-enabled

Add a selectable label that can be locally disabled without changing the outer context.

Context -> String -> Bool -> Bool -> SelectionResult

selectable-value

Add a selectable text label and return value when clicked.

Context -> String -> String -> String -> StringSelectionResult

selectable-value-visible

Add a selectable value that can reserve layout space without being painted.

Context -> String -> String -> String -> Bool -> StringSelectionResult

selectable-value-enabled

Add a selectable value that can be locally disabled without changing the outer context.

Context -> String -> String -> String -> Bool -> StringSelectionResult

radio

Add a radio-style selector and return its next selected state.

Context -> String -> Bool -> SelectionResult

radio-visible

Add a radio selector that can reserve layout space without being painted.

Context -> String -> Bool -> Bool -> SelectionResult

radio-enabled

Add a radio selector that can be locally disabled without changing the outer context.

Context -> String -> Bool -> Bool -> SelectionResult

radio-button-new

Build a builder-style radio button.

Bool -> String -> RadioButton

radio-button-widget

Add a builder-style radio button and return its next selected state.

Context -> RadioButton -> SelectionResult

add-radio-button

Alias for adding a builder-style radio button.

Context -> RadioButton -> SelectionResult

radio-value

Add a radio-style selector and return value when clicked.

Context -> String -> String -> String -> StringSelectionResult

radio-value-visible

Add a radio value that can reserve layout space without being painted.

Context -> String -> String -> String -> Bool -> StringSelectionResult

radio-value-enabled

Add a radio value that can be locally disabled without changing the outer context.

Context -> String -> String -> String -> Bool -> StringSelectionResult

slider-new

Build a builder-style scalar slider.

Float -> Float -> Float -> Slider

slider-show-value

Control whether the slider displays the current value.

Slider -> Bool -> Slider

slider-prefix

Add a prefix before the displayed value.

Slider -> String -> Slider

slider-suffix

Add a suffix after the displayed value.

Slider -> String -> Slider

slider-text

Add descriptive text next to the slider.

Slider -> String -> Slider

slider-orientation

Set the slider orientation.

Slider -> SliderOrientation -> Slider

slider-vertical

Make this a vertical slider.

Slider -> Slider

slider-step-by

Set the minimal change of the slider value.

Slider -> Float -> Slider

slider-integer

Configure the slider for integer steps.

Slider -> Slider

slider-clamping

Control when values are clamped to the slider range.

Slider -> SliderClamping -> Slider

slider-widget

Add a builder-style scalar slider.

Context -> Slider -> SliderResult

add-slider

Alias for adding a builder-style scalar slider.

Context -> Slider -> SliderResult

slider

Add a horizontal slider and return its next value.

Context -> String -> Float -> Float -> Float -> SliderResult

slider-enabled

Add a horizontal slider that can be locally disabled without changing the outer context.

Context -> String -> Float -> Float -> Float -> Bool -> SliderResult

slider-visible

Add a horizontal slider that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Float -> Bool -> SliderResult

vertical-slider

Add a vertical slider and return its next value.

Context -> String -> Float -> Float -> Float -> Float -> SliderResult

vertical-slider-enabled

Add a vertical slider that can be locally disabled without changing the outer context.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

vertical-slider-visible

Add a vertical slider that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

range-slider

Add a horizontal range slider and return its next low/high values.

Context -> String -> Float -> Float -> Float -> Float -> RangeSliderResult

range-slider-enabled

Add a horizontal range slider that can be locally disabled without changing the outer context.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> RangeSliderResult

range-slider-visible

Add a horizontal range slider that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> RangeSliderResult

drag-value-new

Build a builder-style compact numeric value control.

Float -> DragValue

drag-value-speed

Return a drag value with custom per-point drag speed.

DragValue -> Float -> DragValue

drag-value-range

Return a drag value with a finite editable range.

DragValue -> Float -> Float -> DragValue

drag-value-clamp-existing-to-range

Return a drag value that controls whether idle existing values are clamped.

DragValue -> Bool -> DragValue

drag-value-prefix

Return a drag value with text before the number.

DragValue -> String -> DragValue

drag-value-suffix

Return a drag value with text after the number.

DragValue -> String -> DragValue

drag-value-min-decimals

Return a drag value with a minimum displayed decimal count.

DragValue -> Int -> DragValue

drag-value-max-decimals

Return a drag value with a maximum displayed decimal count.

DragValue -> Int -> DragValue

drag-value-max-decimals-opt

Return a drag value with optional maximum displayed decimal count.

DragValue -> Int -> Bool -> DragValue

drag-value-fixed-decimals

Return a drag value with an exact displayed decimal count.

DragValue -> Int -> DragValue

drag-value-update-while-editing

Return a drag value with edit-update policy recorded for API parity.

DragValue -> Bool -> DragValue

drag-value-widget

Add a builder-style compact numeric value control.

Context -> DragValue -> SliderResult

add-drag-value

Alias for adding a builder-style compact numeric value control.

Context -> DragValue -> SliderResult

drag-value

Add a compact numeric value control that changes while dragged horizontally.

Context -> String -> Float -> Float -> Float -> Float -> SliderResult

drag-value-enabled

Add a compact numeric value control that can be locally disabled without changing the outer context.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

drag-value-visible

Add a compact numeric value control that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

stepper

Add a compact numeric value control with decrement and increment buttons.

Context -> String -> Float -> Float -> Float -> Float -> SliderResult

stepper-enabled

Add a stepper that can be locally disabled without changing the outer context.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

stepper-visible

Add a stepper that can reserve layout space without being painted.

Context -> String -> Float -> Float -> Float -> Float -> Bool -> SliderResult

progress-bar-new

Build a progress bar widget with progress clamped to the 0..1 range.

Float -> ProgressBar

progress-bar-desired-width

Return a progress bar with an explicit desired width.

ProgressBar -> Float -> ProgressBar

progress-bar-desired-height

Return a progress bar with an explicit desired height.

ProgressBar -> Float -> ProgressBar

progress-bar-fill

Return a progress bar with a custom fill color.

ProgressBar -> Color -> ProgressBar

progress-bar-text

Return a progress bar with custom text.

ProgressBar -> String -> ProgressBar

progress-bar-show-percentage

Return a progress bar that displays its progress percentage.

ProgressBar -> ProgressBar

progress-bar-animate

Return a progress bar with animation enabled or disabled.

ProgressBar -> Bool -> ProgressBar

progress-bar-corner-radius

Return a progress bar with explicit corner rounding.

ProgressBar -> CornerRadius -> ProgressBar

progress-bar-widget

Add a builder-style progress bar widget.

Context -> ProgressBar -> UiResult

add-progress-bar

Alias for adding a builder-style progress bar widget.

Context -> ProgressBar -> UiResult

progress-bar

Add a read-only progress bar with a clamped fraction in the 0..1 range.

Context -> Float -> String -> UiResult

progress-bar-visible

Add a read-only progress bar that can reserve layout space without being painted.

Context -> Float -> String -> Bool -> UiResult

bar-chart

Add a passive bar chart with a clamped value range.

Context -> List Float -> Float -> Float -> Float -> Float -> UiResult

bar-chart-colored

Add a passive bar chart with a custom bar fill color.

Context -> List Float -> Float -> Float -> Float -> Float -> Color -> UiResult

scatter-plot

Add a passive scatter plot with clamped x/y ranges.

Context -> List Pos -> Float -> Float -> Float -> Float -> Float -> Float -> UiResult

scatter-plot-colored

Add a passive scatter plot with a custom point fill color.

Context -> List Pos -> Float -> Float -> Float -> Float -> Float -> Float -> Color -> UiResult

text-field

Add a single-line text field and return its next value and focus state.

Context -> String -> String -> Bool -> TextFieldResult

text-field-with-hint

Add a single-line text field with hint text shown when the value is empty.

Context -> String -> String -> String -> Bool -> TextFieldResult

text-edit-singleline

Add an unlabelled single-line text edit using upstream Ui::text_edit_singleline naming.

Context -> String -> Bool -> TextFieldResult

text-edit-singleline-with-hint

Add an unlabelled single-line text edit with hint text.

Context -> String -> String -> Bool -> TextFieldResult

text-field-enabled

Add a single-line text field that can be locally disabled without changing the outer context.

Context -> String -> String -> Bool -> Bool -> TextFieldResult

text-field-visible

Add a single-line text field that can reserve layout space without being painted.

Context -> String -> String -> Bool -> Bool -> TextFieldResult

password-field

Add a single-line password field that edits the real value while masking paint output.

Context -> String -> String -> Bool -> TextFieldResult

password-field-with-hint

Add a password field with hint text shown before a value is entered.

Context -> String -> String -> String -> Bool -> TextFieldResult

password-field-enabled

Add a password field that can be locally disabled without changing the outer context.

Context -> String -> String -> Bool -> Bool -> TextFieldResult

password-field-visible

Add a password field that can reserve layout space without being painted.

Context -> String -> String -> Bool -> Bool -> TextFieldResult

text-area

Add a multiline text edit and return its next value and focus state.

Context -> String -> String -> Int -> Bool -> TextFieldResult

text-area-with-hint

Add a multiline text edit with hint text shown when the value is empty.

Context -> String -> String -> String -> Int -> Bool -> TextFieldResult

text-edit-multiline

Add an unlabelled multiline text edit using upstream Ui::text_edit_multiline naming.

Context -> String -> Int -> Bool -> TextFieldResult

text-edit-multiline-with-hint

Add an unlabelled multiline text edit with hint text.

Context -> String -> String -> Int -> Bool -> TextFieldResult

text-area-enabled

Add a multiline text edit that can be locally disabled without changing the outer context.

Context -> String -> String -> Int -> Bool -> Bool -> TextFieldResult

text-area-visible

Add a multiline text edit that can reserve layout space without being painted.

Context -> String -> String -> Int -> Bool -> Bool -> TextFieldResult

code-editor

Add a multiline code editor with fixed-width-style text.

Context -> String -> Int -> Bool -> TextFieldResult

code-editor-with-hint

Add a multiline code editor with hint text shown when the value is empty.

Context -> String -> String -> Int -> Bool -> TextFieldResult

code-editor-enabled

Add a multiline code editor that can be locally disabled without changing the outer context.

Context -> String -> Int -> Bool -> Bool -> TextFieldResult

code-editor-visible

Add a multiline code editor that can reserve layout space without being painted.

Context -> String -> Int -> Bool -> Bool -> TextFieldResult

list-box

Add an always-open list box and return its next selected index.

Context -> List String -> Int -> Float -> Int -> ListBoxResult

list-box-enabled

Add an always-open list box that can be locally disabled without changing the outer context.

Context -> List String -> Int -> Float -> Int -> Bool -> ListBoxResult

list-box-visible

Add an always-open list box that can reserve layout space without being painted.

Context -> List String -> Int -> Float -> Int -> Bool -> ListBoxResult

combo-box

Add a combo-box/select control and return its next selected index/open state.

Context -> String -> List String -> Int -> Bool -> ComboBoxResult

combo-box-with-selected-text

Add a combo-box/select control with explicit header text.

Context -> String -> String -> List String -> Int -> Bool -> ComboBoxResult

combo-box-enabled

Add a combo-box/select control that can be locally disabled without changing the outer context.

Context -> String -> List String -> Int -> Bool -> Bool -> ComboBoxResult

combo-box-visible

Add a combo-box/select control that can reserve layout space without being painted.

Context -> String -> List String -> Int -> Bool -> Bool -> ComboBoxResult

begin-menu-button

Begin a menu button. Use result.is-open? to decide whether to draw menu items into result.content, then pass that context to end-menu-button.

Context -> String -> Bool -> MenuButtonResult

Upstream-style alias for beginning a menu button.

Context -> String -> Bool -> MenuButtonResult

is-menu-button-open?

Return the next open state for a menu button after its content has been rendered. Menus close on Escape or a pointer release outside their bounds.

MenuButtonResult -> Context -> Bool

close-menu-button

Return a menu button result that is closed for the next end-menu-button.

MenuButtonResult -> MenuButtonResult

end-menu-button

End a menu button and return to the outer layout context.

MenuButtonResult -> Context -> Context

begin-collapsing-header

Begin a collapsible section. Use result.is-open? to decide whether to draw child widgets into result.content, then pass that context to end-collapsing-header.

Context -> String -> Bool -> CollapsingHeaderResult

collapsing

Upstream-style alias for beginning a collapsible section.

Context -> String -> Bool -> CollapsingHeaderResult

end-collapsing-header

End a collapsible section and return to the outer layout context.

CollapsingHeaderResult -> Context -> Context

end-collapsing

Upstream-style alias for ending a collapsible section.

CollapsingHeaderResult -> Context -> Context

begin-tree-node

Begin a tree node. Open nodes indent child content and draw a guide line when child widgets are present.

Context -> String -> Bool -> TreeNodeResult

end-tree-node

End a tree node and return to the outer layout context.

TreeNodeResult -> Context -> Context

FrameState

Per-frame SDL input state reduced into EGUI's pointer model.

Variants

FrameState {input, width, height, is-close-requested?, is-surface-dirty?}

frame-state

Build an SDL frame state from accumulated EGUI input.

Int -> Int -> InputState -> Bool -> Bool -> FrameState

start-frame

Start a new frame, preserving pointer position/down state and clearing release edges.

Int -> Int -> InputState -> FrameState

apply-event

Apply one typed SDL event to a frame input accumulator.

FrameState -> a -> FrameState

apply-raw-event

Apply one raw SDL event to a frame input accumulator.

FrameState -> a -> FrameState

poll-frame-state

Drain pending SDL events into a frame input accumulator.

FrameState -> FrameState

current-frame-state

Start a frame from the previous input and drain pending SDL events.

Int -> Int -> InputState -> FrameState

CursorState

Variants

CursorState {cursor-ptr, cursor-type, cursor-image-key, is-owned?, is-hidden?}

ViewportCommandApplication

Variants

ViewportCommandApplication {width, height, is-close-requested?, is-surface-dirty?}

run-window

Run a simple SDL + WGPU EGUI window with the default renderer options.

build-ui receives a fresh Context each frame and there is no app state: widgets render exactly the values passed to them, so a checkbox given a literal false stays unchecked forever. For interactive apps whose widgets should remember their state, use run-app-window and thread a model.

String -> Int -> Int -> a -> ()

run-app-window

Run a simple SDL + WGPU EGUI app with caller-owned model state.

The render-ui callback receives (model, ctx) and must return a record with ctx and model fields for the next frame.

String -> Int -> Int -> a -> a -> ()

run-closeable-app-window

Run a stateful SDL + WGPU EGUI app whose frame may request window close.

The render-ui callback returns a record with ctx, model, and is-close-requested? fields.

String -> Int -> Int -> a -> a -> ()

run-window-with-viewport-builder

Run a simple SDL + WGPU EGUI window from a native viewport builder.

ViewportBuilder -> a -> ()

run-app-window-with-viewport-builder

Run a simple SDL + WGPU EGUI app from a native viewport builder.

ViewportBuilder -> a -> a -> ()

run-closeable-app-window-with-viewport-builder

Run a stateful SDL + WGPU EGUI app from a native viewport builder.

ViewportBuilder -> a -> a -> ()

run-window-with-render-options

Run a simple SDL + WGPU EGUI window with explicit renderer options.

String -> Int -> Int -> a -> a -> ()

run-window-with-viewport-builder-and-render-options

Run a simple SDL + WGPU EGUI window from a native viewport builder with explicit renderer options.

ViewportBuilder -> a -> a -> ()

run-closeable-app-window-with-render-options

Run a stateful SDL + WGPU EGUI app whose frame may request window close.

String -> Int -> Int -> a -> a -> a -> ()

run-closeable-app-window-with-viewport-builder-and-render-options

Run a stateful SDL + WGPU EGUI app from a native viewport builder with explicit renderer options.

ViewportBuilder -> a -> a -> a -> ()

run-app-window-with-render-options

Run a simple SDL + WGPU EGUI app with explicit renderer options.

String -> Int -> Int -> a -> a -> a -> ()

run-app-window-with-viewport-builder-and-render-options

Run a simple SDL + WGPU EGUI app from a native viewport builder with explicit renderer options.

ViewportBuilder -> a -> a -> a -> ()

Pos

Logical 2D point in UI coordinates.

Variants

Pos {x, y}

Rect

Logical rectangle in UI coordinates.

Variants

Rect {x, y, width, height}

Color

Normalized RGBA color.

Variants

Color {r, g, b, a}

TextureId

Texture identifier used by paint output.

Variants

TextureManaged {id}
TextureUser {id}

TextureFilter

Texture texel filtering mode.

Variants

TextureFilterNearest
TextureFilterLinear

TextureWrapMode

Texture coordinate wrapping mode.

Variants

TextureWrapClampToEdge
TextureWrapRepeat
TextureWrapMirroredRepeat

TextureOptions

Texture sampling options.

Variants

TextureOptions {magnification, minification, wrap-mode, has-mipmap-mode?, mipmap-mode}

ColorImage

A 2D RGBA color image stored in memory.

Variants

ColorImage {width, height, source-size, pixels}

ImageData

In-memory image data.

Variants

ImageDataColor {image}

ImageDelta

Whole-image or partial texture update.

Variants

ImageDelta {image, options, is-whole?, pos}

TextureSetDelta

Texture update entry.

Variants

TextureSetDelta {id, delta}

TexturesDelta

Texture updates produced since the last paint pass.

Variants

TexturesDelta {set, free}

Shape

Primitive paint output collected during a frame.

Variants

RectShape {rect, fill, stroke, stroke-width}
CircleShape {center, radius, fill, stroke, stroke-width}
RoundedRectShape {rect, radius, fill, stroke, stroke-width}
TextShape {pos, text, color, size, mono?}
LineShape {points, color, width}
OverlayShape {shapes}
ImageShape {rect, texture, source-rect, tint-color}
ClipStart {rect}
ClipEnd

RenderCommand

Backend-neutral command stream used by the WGPU adapter.

Variants

FillCircle {center, radius, color}
StrokeCircle {center, radius, color, width}
FillRect {rect, color}
FillRoundedRect {rect, radius, color}
StrokeRect {rect, color, width}
StrokeRoundedRect {rect, radius, color, width}
DrawTextureRegionTinted {texture, rect, source-rect, tint-color}
TextGlyph {rect, source-rect, text, color}
SetClip {rect}
ClearClip

RendererTexture

Texture uploaded and owned by the retained WGPU renderer.

Variants

RendererTexture {id, texture, width, height}

Renderer

Retained WGPU renderer resources.

Variants

Renderer {text-atlas, demo-image, textures}

RenderOptions

WGPU renderer options.

Variants

RenderOptions {draw-text?, text-scale}

ClipState

Variants

ClipState {rect, is-empty?}

default-render-options

demo-image-texture-id

demo-image-width

demo-image-height

egui-icon-texture-id

egui-icon-image-width

egui-icon-image-height

egui-icon-asset-path

date-picker-icon-texture-id

date-picker-icon-image-width

date-picker-icon-image-height

date-picker-icon-asset-path

github-icon-texture-id

github-icon-image-width

github-icon-image-height

github-icon-asset-path

renderer-texture

renderer-texture-count

renderer-find-texture

renderer-with-texture

renderer-without-texture

apply-textures-delta

build-render-commands

Convert immediate-mode shapes into explicit WGPU render commands.

List Shape -> RenderOptions -> List RenderCommand

build-default-render-commands

Convert shapes using the default WGPU adapter options.

List Shape -> List RenderCommand

create-renderer

release-renderer

resolve-renderer-texture

draw-commands

draw-commands-with-renderer

draw-commands-with-renderer-at-scale

draw-texture-target-with-renderer-at-scale

draw-texture-target-full-output-with-renderer-at-scale

draw-surface

draw-surface-with-renderer

draw-full-output-with-renderer-at-scale

draw-full-output-with-renderer

draw-surface-with-renderer-at-scale