Back to Projects
TUIX v0.5Beta

Last Updated: 2026-05-20

v0.5 Changes From v0.4

This page lists the v0.4 documentation assumptions that changed in v0.5 and the new APIs that should be used in fresh code.

Outdated v0.4 Assumptions

v0.4 Assumptionv0.5 UpdateReason
The expanded v0.4 builder set was mostly individual widgets.v0.5 adds layout parents and viewport/modal widgets: Row, Column, SplitPane, Grid, Checkbox, ListView, TextArea, and Dialog.The library now supports native nested composition instead of forcing applications to place every rectangle manually.
Scrollable containers were documented mostly as a normal widget.Scrollable containers are first-class viewport owners with content size, offset, insets, clipping, hitmap, and input-routing integration.Scrolled children need input and hit testing to match visible content, not raw buffer coordinates.
Dialog/modal behavior had to be assembled from focus and custom widgets.Use DialogBuilder plus objects.tuix_dialog_* and scenes.activate_modal()/deactivate_modal().Modal UI needs backdrop, focus trapping, child ownership, close flags, and input isolation as one coherent contract.
Layout examples often depended on manual proportional geometry and parent_uid.Use stack, splitpane, grid, layout-slot, layout-rect, and grid-placement APIs.The engine can now compute child geometry parent-first and keep buffer hierarchy consistent with rendering.
Mouse routing was primarily described as focus plus hitmap picking.v0.5 adds heavier hover/drag fixes, viewport ownership, generic mouse capture, and capture APIs in engine.Drag and scroll interactions must continue receiving mouse events even when pointer movement crosses child boundaries.
Pixel ownership details were not visible to application docs.v0.5 documents pixels_owned and safer core-owned copies for temporary builder buffers.Resize, teardown, compaction, and cached-pixel cleanup need explicit ownership rules to avoid memory hazards.
Compatibility names were mixed with canonical names.Docs now call out compatibility aliases such as menu_set_options, status_set_status, button_is_pressed, scroll_container_get_scroll_pos, and box_set_color.Old code keeps working, while new code has a clearer preferred API.

New v0.5 Surface Area

  • Layout builders: builders.ROW, builders.COLUMN, builders.SPLITPANE, builders.SPLIT_PANE, and builders.GRID.
  • Viewport and modal widgets: builders.CHECKBOX, builders.LISTVIEW, builders.LIST_VIEW, builders.TEXTAREA, builders.TEXT_AREA, and builders.DIALOG.
  • Layout constants: AXIS_*, JUSTIFY_*, ALIGN_*, GRID_TRACK_FIXED, and GRID_TRACK_WEIGHT.
  • Scene APIs: select_scene, modal activation, transactions, stats, and compaction.
  • Buffer APIs: layout slots, layout rect overrides, grid placement, richer snapshots, pixels_owned, and by-UID snapshots.
  • Object APIs: stack, splitpane, grid, checkbox, listview, textarea, dialog, and scroll-container viewport helpers.
  • Engine APIs: get_core_loop_stats and mouse capture helpers.

Recommended Migration Pattern

from tuix.core import engine, builders, scenes, objects, buffers, input

engine.init()
builders.register_standard()
scenes.init_scene('Main')
scenes.select_scene('Main')
input.listen()

# Prefer a layout parent over manual child positioning.
row_uid = objects.create_object(builders.ROW, 'Main', 0.9, 0.2, 0.05, 0.05)
row = objects.get_object_by_uid(row_uid)
objects.tuix_stack_set_gap(row, 2)

child_uid = objects.tuix_stack_add_object(row, 'Main', builders.TEXT, 1.0, 1.0)
buffers.set_buffer_layout_slot_by_uid(child_uid, grow=1.0, min_w=12)

engine.main_loop()
input.stop()
engine.shutdown()