|
ZenitUI
Retained-mode C++20 UI framework
|
This page is generated automatically from the executable tag registry in ZenitUI.
| Construct | Syntax | Description |
|---|---|---|
| ID | Tag#my_id | Assigns a unique #id searchable via UINode::find("my_id") and #my_id in ZStyle. |
| Class | Tag.cls1.cls2 | Attaches one or more style classes matched by .cls1 in ZStyle. |
| Ref | Tag@my_ref | Binds a local @ref handle accessible via UINode::ref<T>("my_ref"). |
| Quoted text | Tag "Hello" | Provides the element's text content (e.g. Button label, Text string, initial input value). |
| Attributes | key="value" | flag | Sets widget attributes or inline ZStyle properties. Bare flags default to "true". |
| Children block | Tag { Child1 Child2 } | Nests child elements inside the container's content target. |
| Prefabs & Slots | MyCard { Text slot="header" "Title" } | Reusable markup templates registered with registerPrefab / registerPrefabFile. |
Any ZStyle property can be written as an inline attribute (e.g. width="100%"); see ZStyle Reference. In addition, every tag accepts:
| Attribute | Type | Default | Description |
|---|---|---|---|
| passthrough | boolean | false | The node does not capture pointer input (events fall through). |
| draggable | boolean | false | The node can start a drag & drop operation. |
| droppable | boolean | false | The node can receive drops. |
| slot | string | "" | Routes this child into the named Slot of the enclosing prefab. |
Placeholder inside a prefab replaced by the caller's children. Content between braces is the fallback.
| Attribute | Type | Default | Description |
|---|---|---|---|
| name | string | "" | Slot name; omit for the anonymous default slot. |
Conditional block toggled from C++ with setCondition / bindCondition. Requires an @ref.
| Attribute | Type | Default | Description |
|---|---|---|---|
| initial | boolean | false | Initial visibility state. |
Repeater driven from C++ with syncEach / bindEach / bindEachKeyed. Requires an @ref.
| Attribute | Type | Default | Description |
|---|---|---|---|
| prefab | string | "" | Registered prefab instantiated for each item. |
Generic container (Stack layout type).
C++ class: ZenitUI::Layout
Empty node used to absorb free space (give it grow).
C++ class: ZenitUI::Layout
Vertical flex container.
C++ class: ZenitUI::UI::VStack
Horizontal flex container.
C++ class: ZenitUI::UI::HStack
Plain container with the default layout.
C++ class: ZenitUI::UI::Box
2D CSS-style grid container (LayoutType::Grid).
C++ class: ZenitUI::Layout
Static text.
C++ class: ZenitUI::UI::Text
Text content: the text to display
| Attribute | Type | Default | Description |
|---|---|---|---|
| wrap | boolean | false | Wrap text onto multiple lines. |
Alias of Text.
C++ class: ZenitUI::UI::Text
Text content: the text to display
| Attribute | Type | Default | Description |
|---|---|---|---|
| wrap | boolean | false | Wrap text onto multiple lines. |
Single-line text field (selection, clipboard, IME, undo/redo).
C++ class: ZenitUI::UI::TextInput
Text content: initial value (used when value is absent)
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | string | "" | Initial text. |
| placeholder | string | "" | Hint shown while empty. |
| placeholder-wrap | boolean | false | Wrap the placeholder text. |
Style parts: TextInput::selection TextInput::placeholder TextInput::cursor
Multi-line text editor.
C++ class: ZenitUI::UI::TextArea
Text content: initial value (used when value is absent)
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | string | "" | Initial text. |
| rows | integer | 3 | Visible rows (minimum 1). |
| placeholder | string | "" | Hint shown while empty. |
| placeholder-wrap | boolean | true | Wrap the placeholder text. |
Style parts: TextArea::selection TextArea::placeholder TextArea::cursor
Checkbox.
C++ class: ZenitUI::UI::Checkbox
| Attribute | Type | Default | Description |
|---|---|---|---|
| checked | boolean | false | Initial checked state. |
Style parts: Checkbox::box Checkbox::mark
Progress indicator.
C++ class: ZenitUI::UI::ProgressBar
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | number | 0 | Progress in [0, 1]. |
Style parts: ProgressBar::track ProgressBar::fill
Drop-down selector.
C++ class: ZenitUI::UI::Dropdown
| Attribute | Type | Default | Description |
|---|---|---|---|
| options | list | Default | Comma-separated options (no escaping: an option cannot contain a comma). |
| selected | integer | 0 | Initially selected index (clamped). |
Push button.
C++ class: ZenitUI::UI::Button
Text content: button label
Styled container.
C++ class: ZenitUI::UI::Panel
Normalized slider.
C++ class: ZenitUI::UI::Slider
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | number | 0.5 | Initial value in [0, 1]. |
Style parts: Slider::track Slider::fill Slider::knob
On/off switch.
C++ class: ZenitUI::UI::Toggle
| Attribute | Type | Default | Description |
|---|---|---|---|
| checked | boolean | false | Initial checked state. |
Scrollable container.
C++ class: ZenitUI::UI::ScrollView
Two-pane resizable split container with a draggable divider.
C++ class: ZenitUI::UI::SplitPane
| Attribute | Type | Default | Description |
|---|---|---|---|
| orientation | string | horizontal | Split direction: horizontal (left/right) or vertical (top/bottom). |
| ratio | number | 0.5 | Initial split ratio in [0, 1] for the first pane. |
| splitter-size | number | 6 | Divider thickness in pixels. |
| min-pane-size | number | 40 | Minimum size in pixels for each pane. |
Style parts: SplitPane::splitter
Tabbed container displaying a strip of tab buttons and one active Tab page at a time.
C++ class: ZenitUI::UI::TabView
| Attribute | Type | Default | Description |
|---|---|---|---|
| selected | integer | 0 | Initial 0-based active tab index. |
| position | string | top | Tab bar placement: top or bottom. |
Single page inside a TabView.
C++ class: ZenitUI::UI::Tab
| Attribute | Type | Default | Description |
|---|---|---|---|
| title | string | "" | Label shown on the corresponding tab button. |
| disabled | boolean | false | When true, the tab cannot be selected. |
Scrollable hierarchical tree view with expandable items and keyboard navigation.
C++ class: ZenitUI::UI::TreeView
| Attribute | Type | Default | Description |
|---|---|---|---|
| indent | number | 18 | Horizontal indentation per nesting level in pixels. |
Single hierarchical node inside a TreeView or another TreeItem.
C++ class: ZenitUI::UI::TreeItem
Text content: item label (used when label is absent)
| Attribute | Type | Default | Description |
|---|---|---|---|
| label | string | "" | Text label displayed on the row. |
| value | string | "" | Optional identifier or data payload string. |
| expanded | boolean | false | Initial expanded state when the item has children. |
| selected | boolean | false | When true, selects this item initially inside the TreeView. |
| expandable | boolean | false | Show expand arrow even when no child items are mounted yet (for lazy loading). |
Virtualized list that recycles prefab instances.
C++ class: ZenitUI::UI::VirtualList
| Attribute | Type | Default | Description |
|---|---|---|---|
| prefab | string | "" | Name of the prefab used for each row. |
| items | integer | 0 | Number of rows. |
| row-height | number | 32 | Fixed row height in pixels. |
Container for custom rendering.
C++ class: ZenitUI::UI::CanvasLayout
Modal overlay.
C++ class: ZenitUI::UI::Modal
Anchored popup overlay.
C++ class: ZenitUI::UI::Popup
Single-texture image node (bind texture from C++ via setTexture).
C++ class: ZenitUI::UI::ImageContainer
| Attribute | Type | Default | Description |
|---|---|---|---|
| fit | string | fill | Fit mode: fill, contain, cover, none, or scale-down. |
Portal-based hover label.
C++ class: ZenitUI::UI::Tooltip
Text content: tooltip text
| Attribute | Type | Default | Description |
|---|---|---|---|
| delay | number | 0.4 | Hover delay in seconds before showing. |
Virtualized scrolling list (bind item factory from C++ via setItemFactory).
C++ class: ZenitUI::UI::VirtualView
| Attribute | Type | Default | Description |
|---|---|---|---|
| items | integer | 0 | Initial number of items. |
| uniform-height | number | 0 | Fixed item height in pixels (0 measures each item). |
Horizontal application menu bar hosting top-level Menu dropdowns.
C++ class: ZenitUI::UI::MenuBar
Structured dropdown or context menu supporting shortcuts, checkable items, separators, and submenus.
C++ class: ZenitUI::UI::Menu
| Attribute | Type | Default | Description |
|---|---|---|---|
| title | string | "" | Top-level label shown when placed inside a MenuBar. |
Action, checkable item, or nested submenu entry inside a Menu.
C++ class: ZenitUI::UI::MenuItem
Text content: item label (used when label is absent)
| Attribute | Type | Default | Description |
|---|---|---|---|
| label | string | "" | Text label displayed on the menu row. |
| shortcut | string | "" | Optional right-aligned shortcut hint. |
| value | string | "" | Optional command identifier string. |
| checkable | boolean | false | When true, triggering toggles the checked state. |
| checked | boolean | false | Initial checked state (enables checkable mode when true). |
| disabled | boolean | false | When true, the item cannot be triggered. |
Horizontal divider line between entries inside a Menu.
C++ class: ZenitUI::UI::MenuSeparator
Virtualized data table with sticky header, resizable columns, sorting, and row selection.
C++ class: ZenitUI::UI::Table
| Attribute | Type | Default | Description |
|---|---|---|---|
| row-height | number | 32 | Uniform height of each virtualized body row in pixels. |
| header-height | number | 34 | Height of the sticky header bar in pixels. |
Column descriptor placed inside a Table container.
C++ class: ZenitUI::UI::TableColumn
Text content: column title (used when title is absent)
| Attribute | Type | Default | Description |
|---|---|---|---|
| title | string | "" | Column header label. |
| id | string | "" | Optional column identifier string. |
| width | number | 140 | Initial column width in pixels. |
| min-width | number | 48 | Minimum column width allowed during drag resize. |
| align | string | start | Horizontal cell alignment: start, center, or end. |
| sortable | boolean | false | When true, clicking the header cycles sort order. |
| resizable | boolean | true | When true, adds a draggable resize handle to the column header. |