Skip to content

widgets

NameDescription
ButtonA clickable button widget.
ContainerA widget that arranges child widgets using a layout engine.
DropdownA focusable widget that shows a popup list of options when opened.
DropdownPopupThe floating list that appears when a Dropdown is opened. Managed by OverlayManager, not added to the widget tree directly.
InputA text input widget for user text entry.
LabelA read-only text display widget.
ModalA full-screen dimmed overlay with a centered content box.
NavigatorA screen navigation widget that manages a stack of screens.
ScrollViewA clipping container that lets a child widget be scrolled inside a fixed viewport.
TextAreaA multiline text input widget.
TextViewA read-only multiline text widget.
DialogButtonDescribes a button in a dialog.
NameDescription
TextFlowModeDetermines how text is displayed when it exceeds the available width.

enum TextFlowMode

Determines how text is displayed when it exceeds the available width.

ValueDescription
Scroll
Wrap
ReturnNameDescription
voidshowDialogShows a modal dialog with a title, message, and buttons.
voidshowModalHelper to push a modal onto the overlay stack.
voidcloseModalHelper to close the topmost overlay (modal or otherwise).

void showDialog(const std::string & title, const std::string & message, std::vector< DialogButton > buttons)

Shows a modal dialog with a title, message, and buttons.

The dialog closes automatically when any button is clicked. Pressing Escape closes it if a cancel/close button exists.

Example Usage:

showDialog("Confirm", "Are you sure?", {
{"Yes", [&](/api/widgets) { doThing(); }, true},
{"No", [](/api/widgets) {} }
});

void showModal(std::shared_ptr< core::Widget > content, std::function< void()> onClose, bool dismissable)

Helper to push a modal onto the overlay stack.


void closeModal()

Helper to close the topmost overlay (modal or otherwise).