#include <string>
#include <vector>
int main() {
std::vector<std::string> entries = {
"entry 1",
"entry 2",
"entry 3",
};
int menu_1_selected = 0;
int menu_2_selected = 0;
bool menu_1_show = false;
bool menu_2_show = false;
}) |
Maybe([&] {
return menu_1_selected == 1 && menu_2_selected == 2; }),
});
screen.Loop(layout);
}
static ScreenInteractive TerminalOutput()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
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.
Element text(std::wstring text)
Display a piece of unicode text.
Component Checkbox(CheckboxOption options)
Draw checkable element.
Element border(Element)
Draw a border around the element.
Decorator color(Color)
Decorate using a foreground color.