17 std::vector<std::string> tab_values{
23 auto tab_menu =
Menu(&tab_values, &tab_selected);
25 std::vector<std::string> tab_1_entries{
30 int tab_1_selected = 0;
32 std::vector<std::string> tab_2_entries{
37 int tab_2_selected = 0;
39 std::vector<std::string> tab_3_entries{
45 int tab_3_selected = 0;
48 Radiobox(&tab_1_entries, &tab_1_selected),
49 Radiobox(&tab_2_entries, &tab_2_selected),
50 Radiobox(&tab_3_entries, &tab_3_selected),
59 auto renderer =
Renderer(container, [&] {
69 screen.Loop(renderer);
static ScreenInteractive TerminalOutput()
Component Horizontal(Components children)
A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow...
Component Menu(MenuOption options)
A list of text. The focused element is selected.
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 Tab(Components children, int *selector)
A list of components, where only one is drawn and interacted with at a time. The |selector| gives the...
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
The FTXUI ftxui:: namespace.
Element hbox(Elements)
A container displaying elements horizontally one by one.