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 Method How to use it Why it exists content_builder.tuix_builder_register_standard() -> int Call 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) -> int Call to unregister a custom or dynamically loaded builder by namespace and name. Safely removes builder descriptors when unloading extensions without corrupting live instances.
Constant Native Builder Name Why / Use content_builder.CANVAS CanvasBuilder Free-draw surface for pixels, primitives, text, buffers, and sprites. content_builder.CHOICE ChoiceBuilder Selectable option list. content_builder.INPUT InputBuilder Single-line text input with UTF-8 support. content_builder.PROGRESSBAR ProgressBarBuilder Progress bar widget. content_builder.PROGRESS_BAR ProgressBarBuilder Alias for PROGRESSBAR. content_builder.TEXT TextBuilder Inline text label/content. content_builder.CLICKABLE_TEXT ClickableTextBuilder Clickable inline text label with pressed state. content_builder.BOX BoxBuilder Framed box container. content_builder.DIVIDER DividerBuilder Horizontal or vertical divider. content_builder.BADGE BadgeBuilder Compact badge label. content_builder.BUTTON ButtonBuilder Clickable and keyboard-activatable button. content_builder.TAG TagBuilder Chip-style tag label. content_builder.STATUS StatusBuilder Status label with semantic levels. content_builder.MENU MenuBuilder Interactive menu. content_builder.SCROLL_CONTAINER ScrollContainerBuilder Viewport-backed scroll container. content_builder.ROW RowBuilder Horizontal stack layout parent. content_builder.COLUMN ColumnBuilder Vertical stack layout parent. content_builder.SPLITPANE SplitPaneBuilder Two-pane split layout. content_builder.SPLIT_PANE SplitPaneBuilder Alias for SPLITPANE. content_builder.GRID GridBuilder Fixed/weighted grid layout. content_builder.CHECKBOX CheckboxBuilder Toggle checkbox. content_builder.LISTVIEW ListViewBuilder Viewport-backed selectable list. content_builder.LIST_VIEW ListViewBuilder Alias for LISTVIEW. content_builder.TEXTAREA TextAreaBuilder Multiline text area. content_builder.TEXT_AREA TextAreaBuilder Alias for TEXTAREA. content_builder.DIALOG DialogBuilder Modal dialog container.
Layout And Grid Constants Constant Value Why / Use content_builder.AXIS_NONE 0 No axis / unset orientation. content_builder.AXIS_HORIZONTAL 1 Horizontal orientation. content_builder.AXIS_VERTICAL 2 Vertical orientation. content_builder.JUSTIFY_START 0 Pack children at main-axis start. content_builder.JUSTIFY_CENTER 1 Center children on the main axis. content_builder.JUSTIFY_END 2 Pack children at main-axis end. content_builder.JUSTIFY_SPACE_BETWEEN 3 Distribute extra space between children. content_builder.ALIGN_START 0 Align children at cross-axis start. content_builder.ALIGN_CENTER 1 Center children on the cross axis. content_builder.ALIGN_END 2 Align children at cross-axis end. content_builder.ALIGN_STRETCH 3 Stretch children across the cross axis. content_builder.ALIGN_AUTO -1 Inherit/default child alignment. content_builder.GRID_TRACK_FIXED 0 Fixed-size grid track. content_builder.GRID_TRACK_WEIGHT 1 Weighted/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)])