Back to Projects
TUIX v0.6Beta

Last Updated: 2026-08-14

Builders API

The content_builder package provides the names used by objects.create_object(), canonical builder constants, layout constants, standard builder registration, namespaced unregistration, and per-widget helpers.

Methods

MethodHow to use itWhy it exists
content_builder.tuix_builder_register_standard() -> intCall once after core.init() and before creating objects.Registers every built-in native builder under the 'tuix' namespace with the current engine registry. Returns TUIX_RC_OK (0).
content_builder.tuix_builder_unregister(namespace: bytes, name: bytes) -> intCall to unregister a custom or dynamically loaded builder by namespace and name.Safely removes builder descriptors when unloading extensions without corrupting live instances.

Widget Builder Constants

ConstantNative Builder NameWhy / Use
content_builder.CANVASCanvasBuilderFree-draw surface for pixels, primitives, text, buffers, and sprites.
content_builder.CHOICEChoiceBuilderSelectable option list.
content_builder.INPUTInputBuilderSingle-line text input with UTF-8 support.
content_builder.PROGRESSBARProgressBarBuilderProgress bar widget.
content_builder.PROGRESS_BARProgressBarBuilderAlias for PROGRESSBAR.
content_builder.TEXTTextBuilderInline text label/content.
content_builder.CLICKABLE_TEXTClickableTextBuilderClickable inline text label with pressed state.
content_builder.BOXBoxBuilderFramed box container.
content_builder.DIVIDERDividerBuilderHorizontal or vertical divider.
content_builder.BADGEBadgeBuilderCompact badge label.
content_builder.BUTTONButtonBuilderClickable and keyboard-activatable button.
content_builder.TAGTagBuilderChip-style tag label.
content_builder.STATUSStatusBuilderStatus label with semantic levels.
content_builder.MENUMenuBuilderInteractive menu.
content_builder.SCROLL_CONTAINERScrollContainerBuilderViewport-backed scroll container.
content_builder.ROWRowBuilderHorizontal stack layout parent.
content_builder.COLUMNColumnBuilderVertical stack layout parent.
content_builder.SPLITPANESplitPaneBuilderTwo-pane split layout.
content_builder.SPLIT_PANESplitPaneBuilderAlias for SPLITPANE.
content_builder.GRIDGridBuilderFixed/weighted grid layout.
content_builder.CHECKBOXCheckboxBuilderToggle checkbox.
content_builder.LISTVIEWListViewBuilderViewport-backed selectable list.
content_builder.LIST_VIEWListViewBuilderAlias for LISTVIEW.
content_builder.TEXTAREATextAreaBuilderMultiline text area.
content_builder.TEXT_AREATextAreaBuilderAlias for TEXTAREA.
content_builder.DIALOGDialogBuilderModal dialog container.

Layout And Grid Constants

ConstantValueWhy / Use
content_builder.AXIS_NONE0No axis / unset orientation.
content_builder.AXIS_HORIZONTAL1Horizontal orientation.
content_builder.AXIS_VERTICAL2Vertical orientation.
content_builder.JUSTIFY_START0Pack children at main-axis start.
content_builder.JUSTIFY_CENTER1Center children on the main axis.
content_builder.JUSTIFY_END2Pack children at main-axis end.
content_builder.JUSTIFY_SPACE_BETWEEN3Distribute extra space between children.
content_builder.ALIGN_START0Align children at cross-axis start.
content_builder.ALIGN_CENTER1Center children on the cross axis.
content_builder.ALIGN_END2Align children at cross-axis end.
content_builder.ALIGN_STRETCH3Stretch children across the cross axis.
content_builder.ALIGN_AUTO-1Inherit/default child alignment.
content_builder.GRID_TRACK_FIXED0Fixed-size grid track.
content_builder.GRID_TRACK_WEIGHT1Weighted/flexible grid track.

Usage

core.init()
content_builder.register_standard()
scene.init_scene(b'Main')
scene.select_scene(b'Main')

uid = objects.create_object(content_builder.GRID, b'Main', 0.9, 0.6, 0.1, 0.05)
grid = objects.get_object_by_uid(uid)
objects.tuix_grid_set_columns(grid, [(content_builder.GRID_TRACK_WEIGHT, 1)])