examples/component/tab_vertical.cpp

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<memory>//forallocator,__shared_ptr_access,shared_ptr
    #include<string>//forstring,basic_string
    #include<vector>//forvector

    #include"ftxui/component/captured_mouse.hpp"//forftxui
    #include"ftxui/component/component.hpp"//forRadiobox,Horizontal,Menu,Renderer,Tab
    #include"ftxui/component/component_base.hpp"//forComponentBase
    #include"ftxui/component/screen_interactive.hpp"//forScreenInteractive
    #include"ftxui/dom/elements.hpp"//forElement,separator,hbox,operator|,border

    usingnamespaceftxui;

    intmain(){
    std::vector<std::string>tab_values{
    "tab_1",
    "tab_2",
    "tab_3",
    };
    inttab_selected=0;
    autotab_menu=Menu(&tab_values,&tab_selected);

    std::vector<std::string>tab_1_entries{
    "Forest",
    "Water",
    "Idon'tknow",
    };
    inttab_1_selected=0;

    std::vector<std::string>tab_2_entries{
    "Hello",
    "Hi",
    "Hay",
    };
    inttab_2_selected=0;

    std::vector<std::string>tab_3_entries{
    "Table",
    "Nothing",
    "Is",
    "Empty",
    };
    inttab_3_selected=0;
    autotab_container=Container::Tab(
    {
    Radiobox(&tab_1_entries,&tab_1_selected),
    Radiobox(&tab_2_entries,&tab_2_selected),
    Radiobox(&tab_3_entries,&tab_3_selected),
    },
    &tab_selected);

    autocontainer=Container::Horizontal({
    tab_menu,
    tab_container,
    });

    autorenderer=Renderer(container,[&]{
    returnhbox({
    tab_menu->Render(),
    separator(),
    tab_container->Render(),
    })|
    border;
    });

    autoscreen=ScreenInteractive::TerminalOutput();
    screen.Loop(renderer);
    }