17 std::vector<std::string> entries = {
22 int menu_1_selected = 0;
23 int menu_2_selected = 0;
25 bool menu_1_show =
false;
26 bool menu_2_show =
false;
29 Checkbox(
"Show menu_1", &menu_1_show),
30 Radiobox(&entries, &menu_1_selected) | border |
Maybe(&menu_1_show),
31 Checkbox(
"Show menu_2", &menu_2_show),
32 Radiobox(&entries, &menu_2_selected) | border |
Maybe(&menu_2_show),
36 }) |
Maybe([&] {
return menu_1_selected == 1 && menu_2_selected == 2; }),
static ScreenInteractive TerminalOutput()
Component Maybe(Component, const bool *show)
Decorate a component |child|. It is shown only when |show| is true.
Component Radiobox(RadioboxOption options)
A list of element, where only one can be selected.
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Component Checkbox(CheckboxOption options)
Draw checkable element.
Element text(std::wstring text)
Display a piece of unicode text.
Decorator color(Color)
Decorate using a foreground color.
The FTXUI ftxui:: namespace.