Back to Projects
TUIX v0.6Beta

Last Updated: 2026-08-14

Interactive Control Widgets

Interactive control widgets receive pointer and keyboard input during the native frame loop and expose one-shot consumable state accessors.

Button (`content_builder.BUTTON`)

MethodDescription
objects.tuix_button_set_label(obj_ptr, label: str | bytes) -> intSets visible button label text.
objects.tuix_button_set_border(obj_ptr, visible: bool, r: int, g: int, b: int) -> intConfigures button outline border visibility and RGB color.
objects.tuix_button_set_colors(obj_ptr, label_r, label_g, label_b, bg_r, bg_g, bg_b) -> intSets label and background RGB colors.
objects.tuix_button_set_transparent_background(obj_ptr, transparent: bool) -> intToggles transparent background blending into parent container.
objects.tuix_button_take_pressed(obj_ptr) -> intReads and consumes press state (returns 1 if pressed, 0 otherwise).
objects.tuix_button_reset(obj_ptr) -> NoneManually resets pressed state flag.

Checkbox (`content_builder.CHECKBOX`)

MethodDescription
objects.tuix_checkbox_set_label(obj_ptr, label) -> intSets checkbox label.
objects.tuix_checkbox_set_checked(obj_ptr, checked: bool) -> intSets toggle state explicitly.
objects.tuix_checkbox_get_checked(obj_ptr) -> intReturns current checked state (1 for True, 0 for False).
objects.tuix_checkbox_toggle(obj_ptr) -> intInverts current checked state.
objects.tuix_checkbox_take_changed(obj_ptr) -> intReads and consumes state change event flag.
objects.tuix_checkbox_set_colors(obj_ptr, fg_r, fg_g, fg_b, bg_r, bg_g, bg_b) -> intSets foreground and background RGB colors.

Choice (`content_builder.CHOICE`)

MethodDescription
objects.tuix_choice_set_options(obj_ptr, labels: list) -> intSets option labels for choice list.
objects.tuix_choice_set_selected(obj_ptr, index: int) -> intSelects active option index programmatically.
objects.tuix_choice_is_confirmed(obj_ptr) -> intReturns 1 when user confirms selection with Enter, 0 otherwise.
objects.tuix_choice_get_result(obj_ptr) -> intReturns index of confirmed selection.
objects.tuix_choice_get_selected(obj_ptr) -> intReturns currently highlighted option index.
objects.tuix_choice_reset(obj_ptr) -> NoneClears confirmed state flag.

Input (`content_builder.INPUT`) & Menu (`content_builder.MENU`)

Widget & MethodDescription
objects.tuix_input_set_placeholder(obj, text: str) -> intSets placeholder text shown when input field is empty.
objects.tuix_input_set_text(obj, text: str | bytes) -> intSets live editable text string.
objects.tuix_input_set_colors(obj, tr, tg, tb, bgr, bgg, bgb, pr, pg, pb) -> intSets text, background, and placeholder RGB colors.
objects.tuix_input_is_submitted(obj) -> intReturns 1 when user submits field with Enter key, 0 otherwise.
objects.tuix_input_get_result(obj) -> bytesReturns submitted text as UTF-8 bytes, or None.
objects.tuix_input_clear_submitted(obj) -> NoneClears submission event flag.
objects.tuix_menu_set_title(obj, title: str) -> intSets header title of the menu container.
objects.tuix_menu_set_items(obj, items: list[str]) -> intSets array of menu item labels.
objects.tuix_menu_take_activated(obj) -> intReads and consumes activated item index (returns item index, or -1 if none).