17 std::vector<std::string> toggle_1_entries = {
21 std::vector<std::string> toggle_2_entries = {
25 std::vector<std::string> toggle_3_entries = {
29 std::vector<std::string> toggle_4_entries = {
35 int toggle_1_selected = 0;
36 int toggle_2_selected = 0;
37 int toggle_3_selected = 0;
38 int toggle_4_selected = 0;
51 auto renderer =
Renderer(container, [&] {
53 text(
"Choose your options:"),
63 screen.Loop(renderer);
static ScreenInteractive TerminalOutput()
Element Render()
Draw the component. Build a ftxui::Element to be drawn on the ftxui::Screen representing this ftxui::...
Component Toggle(ConstStringListRef entries, int *selected)
An horizontal list of elements. The user can navigate through them.
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...
Element text(std::wstring text)
Display a piece of unicode text.
Element vbox(Elements)
A container displaying elements vertically one by one.
The FTXUI ftxui:: namespace.
Element hbox(Elements)
A container displaying elements horizontally one by one.
std::shared_ptr< ComponentBase > Component