examples/component/radiobox_in_frame.cpp

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<memory>//forshared_ptr,__shared_ptr_access
    #include<string>//forstring,basic_string,operator+,to_string
    #include<vector>//forvector

    #include"ftxui/component/captured_mouse.hpp"//forftxui
    #include"ftxui/component/component.hpp"//forRadiobox,Renderer
    #include"ftxui/component/component_base.hpp"//forComponentBase
    #include"ftxui/component/screen_interactive.hpp"//forScreenInteractive
    #include"ftxui/dom/elements.hpp"//foroperator|,Element,size,border,frame,HEIGHT,LESS_THAN

    usingnamespaceftxui;

    intmain(){
    std::vector<std::string>entries;
    intselected=0;

    for(inti=0;i<30;++i)
    entries.push_back("RadioBox"+std::to_string(i));
    autoradiobox=Radiobox(&entries,&selected);
    autorenderer=Renderer(radiobox,[&]{
    returnradiobox->Render()|vscroll_indicator|frame|
    size(HEIGHT,LESS_THAN,10)|border;
    });

    autoscreen=ScreenInteractive::FitComponent();
    screen.Loop(renderer);

    return0;
    }