Visual controls render content but do not accept keyboard focus or fire interaction events. Use them to display information, decorate sections of your layout, and provide feedback on ongoing operations. Each control described here is a direct subclass ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Rikitav/Terminality/llms.txt
Use this file to discover all available pages before exploring further.
ControlBase and participates fully in the layout system — you can set Margin, HorizontalAlignment, VerticalAlignment, and MaxSize on any of them.
Label
Label renders a std::wstring inside its arranged rectangle. It supports three text-wrapping modes and three alignment modes, making it suitable for everything from a single-line prompt prefix to a multi-line message body.
Constructors
Properties
The string to render. Assigning a new value invalidates the measure pass so the control resizes automatically.
Controls how text that is wider than the available width is handled.
| Value | Behaviour |
|---|---|
TextWrap::NoWrap | Text is clipped at the right edge. No line breaks are inserted. |
TextWrap::Wrap | Line breaks are inserted at any character boundary when the line would overflow. |
TextWrap::WrapWholeWords | Line breaks are inserted only at word boundaries, preserving whole words. |
Horizontal alignment of each line of text within the label’s width.
| Value | Behaviour |
|---|---|
TextAlign::Left | Text starts at the left edge (default). |
TextAlign::Center | Each line is centred. |
TextAlign::Right | Each line is right-aligned. |
TextAlign::Justify | Spaces between words are stretched to fill the full width. |
Events
Fired by
OnPropertyChanged whenever the Text property is assigned a new value. Subscribe with +=.Example
Border
Border wraps exactly one child control in a box drawn with box-drawing characters. It supports an optional header caption rendered inside the top edge of the box, making it easy to create labelled panels.
Constructors
Properties
The single child displayed inside the border. The border reserves one cell of padding on each side so the child has a clean inner area.
Text drawn into the top edge of the border box. When non-empty it appears inset into the top horizontal line of the rectangle.
Color of the border lines when the control does not have focus.
Color of the border lines when the control or one of its descendants has focus.
Inset applied to the content area. The default
Thickness::Single reserves one cell on every side for the border lines.Optional custom glyph function. The signature is
wchar_t (*)(RectanglePos). When nullptr, the default box-drawing style is used. Use RectanglePos values (LeftTopCorner, RightBottomCorner, TopHorizontalLine, etc.) to return different glyphs per position.Example — labelled chat panel
This is drawn directly from theMessangerTest in the test app:
Border forwards focus to its Content child. The FocusedBorderColor activates as soon as any descendant receives focus, giving the user a clear visual indicator of the active panel.ProgressBar
ProgressBar renders a horizontal bar that fills proportionally based on Value relative to [Minimum, Maximum]. It is stateless with respect to animation — you drive the value from a DispatchTimer tick or any other source.
Properties
The current progress value. Must be between
Minimum and Maximum. Assigning a value outside this range clamps the visual fill but does not throw.The value that corresponds to an empty bar.
The value that corresponds to a completely full bar.
Color of the filled portion of the bar.
Color of the unfilled background portion of the bar.
Example — animated progress from a dispatch timer
This pattern is taken from theMessangerTest test app:
Spinner
Spinner is a single-cell animated indicator that cycles through a sequence of frames driven by the DispatchTimer. It is self-animating — you do not need to write any update code. Drop it anywhere you want to signal that a background operation is in progress.
Properties
The sequence of strings cycled through during animation. Each element is rendered in turn. Replace this vector to use custom glyphs, Unicode spinners, or multi-character frames.
Example
Spinner connects to DispatchTimer in its constructor and disconnects when destroyed. You do not need to start or stop it manually — the animation runs for as long as the control exists in the visual tree.Visual control summary
Visual control summary
| Control | Focusable | Animated | Child content |
|---|---|---|---|
Label | No | No | Text string |
Border | Via child | No | One ControlBase |
ProgressBar | No | No (value-driven) | None |
Spinner | No | Yes (self-driven) | None |