| .. | |
|---|
| UIAccordion | A collapsible section header: chevron, all-caps title, underline and an optional
right-aligned hint. The owner toggles its section's content visibility from
onToggle(expanded) and re-flows the layout. |
| UIButton | A clickable button. Variants: default (panel surface), accent (primary action) and
danger (destructive). Hover lightens, press dips; the click fires on press-started
release (see UIComponent). |
| UICheckbox | A labelled checkbox row: label on the left, accent check square on the right (or standalone
square when the label is empty). Clicking anywhere on the row toggles; onChange(checked)
fires after the flip. |
| UIChip | A compact pill chip. With hasDot = true it's a stateful toggle showing a status dot
(on flips on click, then onToggle(on) fires); without a dot it's a value chip whose
text the owner updates and whose onClick typically cycles the value. Auto-sizes to its
label. |
| UIContextMenu | A popup menu shown on UIRoot.popupLayer behind a click-blocking backdrop. Used by
UIMenuBar dropdowns and directly for right-click context menus. Escape or an outside
click closes it; selecting an item closes then runs its callback. |
| UIDropdown | A labelled dropdown row: label left, value box right. Clicking the box opens a scrollable
popup list on UIRoot.popupLayer behind a click-blocking backdrop, so nothing underneath can
be interacted with while it is open (Escape or an outside click closes it). display entries
override row labels while items holds the raw values delivered to onSelect. |
| UIIcon | A themed icon that can be dropped into any widget or layout. Sources: |
| UIIconRail | A vertical icon rail (Blender/VSCode-style activity bar): fixed-width column of tabs,
one active at a time with an accent indicator. onSelect(index) fires on change. |
| UIKeybind | A key-binding row: label left, binding box right showing the current key. Clicking the box
enters listening mode (UIFocus.typing gates the host's keybinds automatically); the next
key pressed becomes the binding and fires onChange(keyCode). Escape cancels; with
allowClear on, Backspace/Delete clears the binding (fires onChange(-1)) — disable
allowClear to make those keys bindable. Works on mobile only with a hardware keyboard
attached; desktop-oriented. |
| UILabel | A themed, non-interactive text label. tone picks the theme text ramp (PRIMARY/SECONDARY/
TERTIARY) so theme swaps restyle it; colorOverride pins an explicit ARGB color instead. Set
key (+ fallback) for localized text, or assign text directly. |
| UIList | A virtualized, selectable list. Only the visible rows (+2) exist as display objects; they
are recycled by modulo slot mapping, so scrolling by one row rebinds exactly one row and a
100k-entry list costs the same as a 20-entry one. Rows are fixed-height (the constraint
that keeps the window math O(1)). |
| UIListRow | One recyclable list row. The default implementation renders a single label via
UIList.labelOf; subclass and override bind()/render() for custom content, supplying
instances through UIList.rowFactory. Never construct rows yourself outside a factory —
the list owns the pool. |
| UILoadingBar | A progress bar for any long-running operation (downloads, uploads, decompression, loading). |
| UIMenuBar | A desktop menu bar. Clicking a title opens its dropdown (UIContextMenu); while one is open,
hovering another title switches to it. An optional brand label renders before the menus and
arbitrary widgets can be laid over the right side by the owner. |
| UIMenuDef | One top-level menu: a title plus an item factory (evaluated on open, so checkmarks and
shortcut labels are always current). |
| UIMenuItem | One menu entry (UIContextMenu/UIMenuBar). separator renders a divider (other fields ignored). |
| UIModal | A modal dialog panel centered over a dimmed, click-blocking backdrop on UIRoot.popupLayer.
Add content to body (coordinates relative to the panel, below the title). Escape or the
backdrop click closes it (unless dismissable = false). Opens/closes with a short fade+scale. |
| UIPanel | A filled surface: chrome bands, cards, placeholders. Non-interactive but blocking by default
(children stay interactive, pointer hits never fall through). corner rounds the fill;
the four border* flags draw 1px themed edges and outline draws a full 1px frame. |
| UIRailTab | One UIIconRail tab definition: a short caption (<=4 chars reads best) + optional tooltip. |
| UIScrollPane | A fixed-size, vertically scrollable container. Add children to content; call
refreshContent() after (re)filling it. Scrolls by mouse wheel and by dragging the slim
scrollbar thumb. Clipping uses scrollRect (GPU clip — scrolling never repaints children). |
| UISegmented | An exclusive-choice segmented control (radio group): label left, equal-width segments in a
box on the right. Exactly one segment is selected; picking another slides the accent pill
over and fires onChange(index). Taller by default on mobile for touch. |
| UISeparator | A 1px themed divider line (horizontal by default). |
| UISlider | A labelled horizontal slider: label left, track + knob right, current value drawn beside the
knob. Dragging anywhere on the track seeks; onChange(value) fires while dragging. |
| UIStepper | A labelled numeric - value + row: label left, stepper box right. Clicking -/+ changes by
step, clamped to [min, max]; holding repeats after a delay with acceleration. Clicking
the value itself types a number directly (Enter/blur commits, Escape cancels).
onChange(value) fires on every change; decimals controls display rounding. |
| UISwitch | A labelled toggle switch row: label left, animated track + knob right. Clicking anywhere on
the row flips the state and fires onChange(on). The track colour and knob position tween
between states. Larger track and row height on mobile for touch. |
| UITabDef | One UITabs tab definition. |
| UITabs | A horizontal tab strip (the horizontal counterpart to UIIconRail): content-width cells,
one active at a time with an accent underline that slides between tabs. The owner switches
panel content from onSelect(index). Taller by default on mobile for touch. |
| UITextInput | A labelled single-line text field: label left, input box right. Click to focus; while
focused it captures the keyboard (UIFocus.typing) — caret, Shift+arrow selection,
Home/End, Ctrl+A/C/X/V, Backspace/Delete word-aware basics, Enter commits (onEnter),
Escape blurs. onChange(text) fires on every edit. |
| UIToast | Transient status messages: slide up near the bottom of the viewport, hold, then fade out.
One shared instance; a new message replaces the current one immediately. |
| UITooltip | The shared hover tooltip. install() hooks it into UIRoot's hover-delay driver; any widget
with a tooltip (and optional tooltipShortcut, rendered right-aligned) gets one for free.
One instance, idle-free, fades via UITween. |