LavaUI
2261 declarations · 882 documented
LavaUI
-
AgentHoststructCallbacks the host app provides so the server stays UI-framework-agnostic.
-
AgentIdentifiedViewstructAttaches a stable agent id to the content's root layout box.
-
AgentServerclass -
AlignmentstructA point in a box: one horizontal choice and one vertical one.
-
AmbientLight3Dstruct -
Angle3Dstruct -
AnimatableprotocolA value that can be interpolated between two endpoints.
-
AnimatedstructA property that moves toward a target over time.
-
AnimationCurveenum -
AnimationDriverenumSteps every node with animation in flight, once per frame.
-
AnyViewstructA view whose type is decided at run time.
-
AnyViewNodeprotocol -
AppSettingsenumCross-platform, file-backed key/value settings for LavaUI apps.
-
ArenaFrameSinkclassPublishes frames into a
DrawArenafor a renderer in another process. -
BackdropBridgeenumCompositor frost behind a popup. LavaUI cannot see the desktop, so a client fills this in; a windowed app leaves it nil and
.backdropBlursamples this window's own framebuffer instead. -
BindablestructProjects bindings out of a reference-type model:
$model.property. -
BindingstructA two-way reference to a value owned somewhere else.
-
BodyRecomputableprotocolA retained node that can re-evaluate its own
bodyin place, using whateverviewvalue it already holds — no new value from a parent is needed, because nothing about that value changed; only some@State/@Observableproperty it reads did, and that storage is a reference type living outside the struct, so it is already current.CompositeNodeis the only conformer; the protocol exists soViewInvalidationcan hold a dirty node without depending on its generic view type. -
BookshelfLayout3DstructTwo stacks of books around a face-on cover: neighbours stand on the shelf at a steep yaw so a sliver of their front is still readable, and the focused item turns to face the camera.
-
BorderStylestructA stroke on a view's own edge, lying inside its layout rect.
-
Box3Dstruct -
BoxRegistrationViewstructAttaches something to the content's root layout box — the shape
.onDropand.onFileDragshare, factored out once there were more of them. -
ButtonstructA clickable control whose hover and press feedback is owned by the renderer.
-
ButtonStylestructColours and metrics for a
Button. -
Camera3Dstruct -
CameraControls3Dstruct -
CanvasstructCustom-drawn control: Yoga sizes the box; the app emits draw commands.
-
CanvasFramestructAbsolute layout box handed to a custom paint callback (window pixels).
-
CanvasGesturestruct -
CanvasGesturePhaseenumA phase in a
Canvaspointer gesture — a press, its drag, and its release. -
CaretAffinityenumWhich side of a wrap boundary a caret belongs to.
-
CaretBlinkenumCaret blink, expressed as a phase rather than a timer.
-
CatalogLayout3DstructA reusable album/poster shelf that adds depth and fans neighboring items around a focused cover while keeping the unfocused catalog in one row.
-
CatalogPose3Dstruct -
ClickCounterenumMulti-click detection. Kept here rather than in the field so any control can share one notion of what counts as a double click.
-
ClipboardBridgeenumIndirection so
LavaUIviews can reach the clipboard without every view carrying anEditorreference. The app installs this once at startup. -
CodeStylestructStyle palette for
EditorView. Rules carry style indices; this maps them to colours, so a theme change restyles code without touching any rule. -
ColorstructsRGB colour with alpha. Components are what a colour picker shows —
Color(r: 0.5, g: 0, b: 0)is#800000, and that is what reaches the screen. Nothing between here and the attachment applies a transfer function: the whole 2D pipeline works on these encoded values. Seedocs/colour-and-blending.md. -
ColorPickerstructSaturation–value square, hue strip, hex, and an optional alpha slider.
-
ComboBoxstructA closed field showing the current choice, and a dropdown of the rest.
-
ComboBoxItemstructOne row of a
ComboBox. -
ComposedOverlayViewstructA base view with content drawn over it, taking no layout space.
-
ContentScalestructDiscrete UI text scale — bitmap fonts re-raster at fixed pixel sizes so Yoga measure and FreeType glyphs stay pixel-aligned (no GPU scale of atlas coverage).
-
ContentScaleShortcutsenumDefault chord: Ctrl+Shift +
=/-/0(and numpad). -
CursorBridgeenumWhere the pointer image is actually set.
-
CursorShapeenumThe pointer image over a view.
-
DecorationUnderlineenumUnderline drawn beneath a decorated range.
wavyis built from short zigzag segments — there is no dedicated curve primitive, and a handful ofline()calls per decorated span is cheap enough not to need one. -
DiagnosticSeverityenumHow urgently an
EditorDecorationshould read — supplies a default color and gutter glyph so a caller can skip both and just say what kind of thing this is. -
DiagramHoststruct -
DimensionenumMaps onto Yoga's width/height states (not a single
-1sentinel). -
DirectionalLight3Dstruct -
DividerstructA hairline rule separating content.
-
DividerAxisenum -
DividerStylestructColour and metrics for a
Divider. -
DragBridgeenumHow a view starts an OS drag.
-
DragChipImagestructA drag chip: views laid out and emitted into a draw list of their own.
-
DragGesturePhaseenum -
DragGestureValuestruct -
DrawKindenum -
DrawListclassReused arena: draw commands plus the shaped glyphs they reference. Shaping itself is cached per line on
UIFont, so re-emission is cheap. -
DrawStatestructView-local state whose changes only require re-emitting pixels.
-
DropBridgeenumWhere the paths for a
.fileDropcome from. -
DropRouterenumRoutes an OS drag-and-drop to whichever node it landed on. The node under the drop point is resolved the same way hover is (
hitTestHover); unlike hover, this is a one-shot lookup at the moment the drop event arrives, not a continuously tracked position. -
DropTargetViewstructRegisters
performas the drop handler for the content's root layout box. -
EdgestructWhich sides of a box a layout inset applies to.
-
EdgeInsetsstructPer-edge inset around a view's content.
-
EditorclassThis used to wrap a flat
canvas::swiftEditor*free-function API (aSwiftEditor*opaque handle passed to every call) because Swift's C++ interop wouldn't importEngineas a class at the time. That's no longer true:Enginehas a proper move constructor (pimpl'd, non-copyable) and imports cleanly, so this now just holds one and calls its methods directly — noOpaquePointer, nostrdup/free, no manually buildingchar**arrays for tree/property lists. -
EditorControllerclassA code editor: line-number gutter, current-line highlight, rule-based syntax colouring, and find-match highlighting.
-
EditorDecorationstructA diagnostic attached to a range of
EditorView's bound text. -
EditorPositionstructWhere an editor was left: what it was scrolled to, and what was selected.
-
EditorProbeenumWhere an editor's time goes on a large buffer, opt-in via
LAVA_EDITOR_PROBE=1. -
EditorViewstruct -
EitherViewstructif/else— fragment (no flex wrapper). Identity is on the branch node. -
EmptyViewstruct -
EngineFrameSinkclassThe engine's own per-window buffers: what every windowed app uses, and the default for any
DrawListbuilt against anEditor. -
EnvironmentenumScope stack for
EnvironmentValues. -
EnvironmentModifiedViewstructWraps
contentwith an environment override active for its own mount/reconcile call — i.e. for its whole subtree, not just its own node. Delegates entirely tocontent's node; this adds no Yoga node. -
EnvironmentValuesstructValues that flow down the view tree, defaulting to
Theme.current/FontStore.defaultat the root and overridable for a subtree via.theme(_:)/.font(_:)— those globals are the environment's defaults now, not the only way to set a value. -
ExpandstructDisclosure control: chevron + title in a rounded outline, content below when open.
-
ExpandStylestructColours and metrics for an
Expanddisclosure. -
FileDialogenumNative "open"/"save" file picker.
-
FileDragenumWhen a press on a
.onFileDragview becomes a drag. -
FileDragSourceViewstructRegisters the content's root layout box as something files can be dragged out of.
-
FlexDirectionenum -
FocusManagerenumWhich node currently receives keyboard input.
-
FocusRingStyleenumHow a focused text field draws its attention ring.
-
FontFallbackstructA fallback face named rather than loaded.
-
FontHintingenumHow a face is fitted to the pixel grid on its way to the atlas.
-
FontRasterFlagsstructHinting selection plus flags, packed the way
canvas::RasterFlagsreads it. Bits outside the ones defined here are refused by the renderer rather than ignored, so this type is the only supported way to build the word. -
FontStoreenumDefault UI font when
Textdoes not specify one. -
ForEachstructVariable-length children with explicit key identity. Fragment: children splice into the parent (inherits row/column). No
buildArray— plainforin builders is intentionally unsupported. -
ForEach3Dstruct -
FrameBuffersstructWhere the frame being built actually lives.
-
FrameCapacitystructElement counts for one frame — used both for "how much fits" and for "how much was written", because those two are compared constantly and one type makes the comparison a line rather than four.
-
FrameSchedulerenumWhen the frame loop should next wake up.
-
FrameSinkprotocolWhere a
DrawListwrites its frame, and who it hands the frame to. -
FrameTasksenumWork deferred until the current frame is on screen.
-
GPUResourceHostprotocolWho names the things that live on a GPU.
-
GradientstructA two-stop linear ramp, for
.background(_:). -
HighlightRulestructA pattern-to-style mapping, applied per line.
-
HighlightSpanstructA styled character range within one line.
-
HorizontalAlignmentenumHorizontal placement of content inside a box larger than it.
-
HoverStateenumWhich node the pointer is over.
-
HSplitViewstructTwo side-by-side panes with a draggable divider between them.
-
HStackstruct -
ImagestructRaster image laid out as a Yoga leaf and drawn as a textured quad.
-
ImageContentModeenumHow the source bitmap maps into the layout box.
-
ImageStoreenumPath →
UIImagecache with a VRAM budget, async decode, and LRU eviction. -
ImageTurnenumA quarter turn applied to an image as it is decoded.
-
ImportedMenuenumTurning a flattened DBusMenu import into a
MenuModel. -
ImportedMenuItemstructOne row of a menu imported from another application.
-
InputEventstructOne polled event from
Editor.pollInputEvent. -
InputEventKindenumMirrors
canvas::InputEventKind. -
InvalidationLevelenumHow much of the pipeline a change actually invalidates.
-
KeyActionenumKey action (GLFW). Packaged as
FloatinInputEvent.xfor Key events. -
KeyCodeenumPhysical key codes (GLFW numbering).
-
KeyEventstructA key transition, decoded from the raw engine event.
-
KeyModsenum -
KeyShortcutstructKeyboard shortcut attached to a menu item.
-
KeyShortcutModifierstructModifier flags for
KeyShortcut, resolved to GLFW-styleKeyModsbits. -
LavaAppenumReusable window/input/invalidation/render loop, so a second LavaUI executable is a
main.swiftof a dozen lines instead of a copy ofHelloWorldApp's ~350. -
LavaResourcesenumSwiftPM resource bundle for LavaUI defaults (fonts).
-
LavaWindowclassOne window's worth of the frame loop: its layout tree, its draw arena, its slice of framework state, and the input → invalidate → body → layout → emit → present pipeline that connects them.
-
LayeredViewstructA base view with a layer drawn behind it (
.underlay { }) or over it (.overlayLayer { }), covering its box and taking no layout space and no input. -
LayoutFramestruct -
LayoutHostclassOwns the retained root and runs Yoga layout.
-
LazyVGridstructA vertically scrolling grid that mounts only the cells the viewport shows.
-
LazyVStackstructA vertically scrolling list that mounts only the rows the viewport shows.
-
LineIndexstructWhere each logical line sits, in characters and (optionally) in bytes.
-
MainQueueenumWork handed to the main thread from another one.
-
MarkdownDocumentstructDisplay text with Markdown delimiters removed and styles mapped to character offsets in that display text.
-
MarkdownParserenumA deliberately compact Markdown parser for model responses.
-
MarkdownSpanstruct -
MarkdownSpanStyleenumSemantic styles emitted by the small Markdown parser.
-
MarkdownStylestruct -
MarkdownViewstructRead-only Markdown rendered as one wrapping, character-styled text leaf.
-
Material3Dstruct -
MenustructOne top-level menu ("File", "Edit") or a nested submenu.
-
MenuActionTablestructClosures keyed by
MenuID. NotEquatable— compared only by key set in tests. -
MenuBackendKindenumWhich code path owns the menubar.
-
MenuBarstructRoot menubar description.
-
MenuBarBuilderenum -
MenuBarStripstructTop-level titles in a fixed-height strip; each opens a dropdown overlay.
-
MenuBarStylestructHow a menubar strip and its dropdowns look.
-
MenuBuilderenum -
MenuChromeRootstructWraps app content with an in-window menu strip when
modelis non-empty. -
MenuContentenum -
MenuControllerclassOwns the last resolved menubar and dispatches activations.
-
MenuDropdownPanelstructPopup body for one top-level menu (items, separators, nested submenus).
-
MenuEntryenum -
MenuHostclassApp-level menubar owner: retains
MenuControllerand the active backend. -
MenuIconstructPicture for a top-level menu title.
-
MenuIDstructStable identity for a menu or menu item across rebuilds.
-
MenuItemstruct -
MenuItemModelstruct -
MenuKeyModsenumModifier bitfield used by
KeyShortcut. Same values as GLFW / LavaUIKeyMods. -
MenuModelstruct -
MenuNodestruct -
MenuSeparatorstruct -
ModifiedViewstructA view wearing a style.
-
NodeIDstructStable identity for a retained node (lifetime of the node object).
-
NotificationInfostructOne live desktop notification, as the server holds it.
-
NotificationsclassDesktop notifications, from the panel's side: what is on screen right now, and what a click on it does.
-
OptionalViewstructNon-exhaustive
if— fragment (no flex wrapper). -
OverlayAlignmentenumContent drawn above everything, anchored to the view that presents it.
-
OverlayAnchortypealiasWhere composed overlay content sits inside its base view's box.
-
OverlayFramestructA detached overlay's resolved frame in window coordinates.
-
OverlayPlacementstructPlacement policy for a detached overlay.
-
OverlayPlacementContextstructGeometry available when placing a detached overlay.
-
OverlayStylestructStyling for the floating surface an overlay draws on.
-
OverlayViewstructcontent.overlay(isPresented:) { ... } -
PanelMenuclassThe global menu, from a panel's side: the focused window's menu, imported over DBusMenu and turned into the same
MenuModelan app's own menubar is. -
PerfCountersenumProcess-wide counters for work the frame pipeline did.
-
Plane3Dstruct -
PointerButtonenumModifier bitfield (GLFW
mods). Which mouse button an event came from. -
PointerCaptureenumRoutes pointer motion to whichever node started a drag.
-
PointerStateenumLast known window-space pointer position, updated on every
.mouseMove. -
PrimitiveMountprotocolRequired retained-tree construction for primitives. No default.
-
PrimitiveViewprotocolMarker for views that own content directly (
Body == Never). -
Reflection3DStylestruct -
Scene3Dstruct -
SceneAnimationFlagsstructWhich properties a
animateNodecall is stating. Mirrorscanvas::SceneAnimationFlags. -
SceneNodeFlagsstructBits in a
beginNodecommand'scolorfield. Mirrorscanvas::SceneNodeFlags. -
SceneNodeIdentityenumHands each view node the compact id the scene graph addresses it by.
-
SceneScrollFlagsstructBits in a
scrollNodecommand'scolorfield. Mirrorscanvas::SceneScrollFlags. -
ScreenCaptureenumA picture of the whole screen, for the one app that needs one.
-
ScreenshotBridgeenumWhere a screenshot comes from.
-
ScrollAxisenum -
ScrollBridgeenumWhere a wheel notch goes when nothing in the view tree wanted it.
-
ScrollRouterenumWheel routing. The node under the pointer receives the wheel, focused or not — that is what every desktop app does, and it means scrolling a panel does not steal focus from a field.
-
ScrollViewstructA clipped, scrollable container.
-
Shadow3DStylestruct -
ShapedGlyphstructA shaped glyph, plus which face has to draw it.
-
ShapedRunstructA shaped line plus the two mappings text editing needs.
-
SliderstructA draggable value in a range.
-
SliderStylestructColours and metrics for a
Slider. -
SoftWrapenumGreedy line breaking.
-
Spacerstruct -
SpatialAnimationstruct -
SpatialElementstruct -
SpatialGroup3Dstruct -
SplitStylestructColours and metrics for a split divider.
-
StackAlignmentenum -
StackStylestruct -
StatestructA source of truth owned by a view, surviving that view being rebuilt.
-
StatefulLexerprotocolA lexer whose highlighting for line N depends on what came before it — the gap a per-line
HighlightRulelist cannot close: a block comment or a string that opens on one line and closes on another. -
StateStorageclassThe value that actually persists across view rebuilds.
-
StatusNotifierItemInfostructOne StatusNotifierItem as the panel sees it after a poll.
-
StatusNotifierTrayclassSystem tray host: owns
org.kde.StatusNotifierWatcherand surfaces items for a panel strip. -
SyntaxHighlighterstructApplies rules to a line and resolves overlaps by priority — or, if built from a
StatefulLexerinstead, threads that lexer's state line to line. -
TextstructText label primitive — Phase 4: Yoga measure via
canvas::Font+ layout cache. -
TextEditstructOne reversible edit: replace a range of the buffer with new text.
-
TextEditingStatestructSelection and caret for a single editable string.
-
TextFieldstructSingle-line editable text.
-
TextLayoutCacheclassKeyed on (text, font, quantized width, mode). Yoga measure is chatty; this is the main Phase 4 perf lever.
-
TextSearchstructFind-in-buffer: match locations plus which one is current.
-
ThemestructSemantic styling tokens.
-
TogglestructA boolean switch with an animated knob.
-
ToggleStylestructColours and metrics for a
Toggle. -
Transform3Dstruct -
TransitionstructHow a view animates as it appears and disappears.
-
TransitionViewstructcontent.transition(...) -
TupleViewstructHeterogeneous children from a multi-statement
@ViewBuilderblock. Fragment: expands into the parent flex container (not a Yoga box). -
UIFontclassSwift-facing typeface handle. Wraps
canvas::Font(FreeType + HarfBuzz). -
UIImageclassGPU texture handle for LavaUI
Imageviews. -
UndoStackstructUndo/redo history for a single buffer.
-
Vector3struct -
VerticalAlignmentenumVertical placement of content inside a box larger than it.
-
ViewprotocolA declarative UI description.
-
View3Dprotocol -
View3DBuilderenum -
ViewBuilderenum -
ViewInvalidationenum"Something changed; do at least this much work again."
-
ViewStylestructStyle a modifier pushes onto a node.
-
VisualLayoutstructWhere each visual row begins and ends, in character offsets over the whole buffer.
-
VSplitViewstructTwo stacked panes with a draggable divider between them.
-
VStackstruct -
WidgetProfilerenumPer-widget paint cost, opt-in via
LAVAUI_PROFILE=1. -
WindowBackdropenumWhat a window paints behind its content, before anything in the tree.
-
WindowBridgeenumWhere a window's chrome sends the verbs it cannot perform itself.
-
WindowControlButtonstructOne window control, for chrome that places them apart — a close button in one corner of an overlay and nothing else at all.
-
WindowControlKindenumWhich control. Three, because these are the three a window manager offers, and an app inventing a fourth would be inventing a window state nothing else in the desktop understands.
-
WindowControlsstructThe three controls as one cluster, in the order this desktop puts them.
-
WindowControlsStylestructColours and metrics for a control cluster.
-
WindowDragAreastructMakes a view's empty space a place the window can be dragged by.
-
WindowIDstructIdentifies one window of an
Editor. -
WindowScopeclassThe per-window half of LavaUI's framework state.