Back to Projects
TUIX v0.5Beta

Last Updated: 2026-05-20

TUIX Core v0.5 Overview

TUIX is a modular terminal UI engine inspired by web technologies. It provides a DOM-like component model, a nested layout system, a viewport-aware input and rendering pipeline, and a buffer-based renderer for structured terminal interfaces.

Version 0.5 keeps the low-level C + Cython core but focuses on composition and stability: safer pixel ownership, resize and teardown hardening, lower render-path lock contention, row/column/split/grid layout builders, viewport widgets, modal dialogs, scene transactions, richer snapshots, and mouse capture.

Core vs FrameworkTUIX Core intentionally exposes low-level primitives. For a higher-level application framework, use the tuixpy project on top of the core.

Architecture

The runtime is split into three layers: a native C engine for buffers, layout, hitmaps, compositing, diffing, and terminal output; a Cython bridge for fast binding calls; and Python modules for scene lifecycle, object creation, widget configuration, snapshots, and application control.

Each frame routes input, resolves geometry, lets builders update state and content, composites visible buffers, and writes only terminal-visible differences where possible.

Built-in Widget Types

WidgetBuilder NameDescription
ProgressbarProgressBarBuilderHorizontal fill bar with configurable value, fill/empty characters, colors, and optional percentage text.
ChoiceChoiceBuilderKeyboard-navigable option list with confirmation state.
InputInputBuilderSingle-line text input with placeholder, cursor movement, and submit state.
CanvasCanvasBuilderFree-draw surface for pixels, primitives, text, raw buffers, and cached sprites.
TextTextBuilderInline text content with runtime foreground/background control.
BoxBoxBuilderFramed container with title, border, and background colors.
DividerDividerBuilderHorizontal or vertical divider with custom symbol and color.
BadgeBadgeBuilderCompact label with foreground/background palette.
ButtonButtonBuilderClickable and keyboard-activatable button with consumable press state.
TagTagBuilderChip-style label with configurable brackets and colors.
StatusStatusBuilderIDLE/OK/WARN/ERROR status label with configurable palette.
MenuMenuBuilderInteractive menu with title, item selection, and activation state.
ScrollContainerScrollContainerBuilderViewport-backed container with virtual content size, offsets, and child attachment helpers.
RowRowBuilderHorizontal stack layout parent with gap, padding, justify, align, and child slot support.
ColumnColumnBuilderVertical stack layout parent using the same stack API as Row.
SplitPaneSplitPaneBuilderTwo-pane layout with orientation, ratio/pixel split, divider size, and minimum pane sizes.
GridGridBuilderGrid layout with fixed and weighted row/column tracks, gaps, padding, and placement overrides.
CheckboxCheckboxBuilderToggle with label, checked/disabled state, and consumable changed flag.
ListViewListViewBuilderViewport-backed virtual list with selection and activation.
TextAreaTextAreaBuilderMultiline viewport-backed editor with title, placeholder, text, and read-only mode.
DialogDialogBuilderModal dialog with backdrop, focus trapping, body sizing, padding, colors, and close handling.

Module Map

ModulePurpose
tuix.core.engineEngine lifecycle, one-frame main loop, loop stats, and mouse capture.
tuix.core.scenesScene creation, selection, focus, modal state, transactions, stats, and compaction.
tuix.core.registryActive scene pointer and mirrored low-level registry state.
tuix.core.buildersBuilder constants, layout/grid constants, and standard registration.
tuix.core.objectsObject creation plus widget, layout, viewport, and modal runtime APIs.
tuix.core.buffersBuffer hierarchy, z-index, layout slots, grid placement, snapshots, and free operations.
tuix.core.inputInput listener and consuming/non-consuming snapshots.

What Is New In 0.5

  • Nested layout contract with TuixLayoutSlot, TuixLayoutRect, parent-first subtree rebuilds, and per-child slot/grid overrides.
  • New Row, Column, SplitPane, and Grid builders for native layout composition.
  • New Checkbox, ListView, TextArea, and Dialog widgets.
  • Scrollable containers now participate in viewport-aware geometry, hitmap, compositor, and input routing.
  • Buffer ownership hardening with pixels_owned, safer temporary builder buffers, resize fixes, and teardown fixes.
  • Lower render-path lock contention by running builder callbacks outside the global registry lock where snapshots and copies make it safe.
  • Python bindings now cover scene selection, transactions, modal activation, mouse capture, layout/grid overrides, richer snapshots, and viewport/widget APIs.

Known Limitations

  • TUIX Core remains a low-level engine rather than a high-level application framework.
  • No built-in theme/style system beyond per-widget styling.
  • The main loop is synchronous; async loop integration is not built in.