17 std::vector<std::string> entries;
20 for (
int i = 0; i < 30; ++i) {
21 entries.push_back(
"RadioBox " + std::to_string(i));
23 auto radiobox =
Radiobox(&entries, &selected);
24 auto renderer =
Renderer(radiobox, [&] {
25 return radiobox->Render() | vscroll_indicator | frame |
29 auto screen = App::FitComponent();
30 screen.Loop(renderer);
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Radiobox(ConstStringListRef entries, int *selected_, RadioboxOption options={})
A list of element, where only one can be selected.
Decorator size(WidthOrHeight direction, Constraint constraint, int value)
Apply a constraint on the size of an element.
Element border(Element child)
Draw a border around the element.
The FTXUI ftxui:: namespace.