#include <stdlib.h>
#include <memory>
#include <string>
#include <vector>
return window(text(title),
component->Render()) | flex;
});
}
std::vector<std::vector<std::string>> menu_entries = {
{
"Ananas",
"Raspberry",
"Citrus",
},
{
"Potatoes",
"Weat",
"Rise",
},
{
"Carrot",
"Lettuce",
"Tomato",
},
};
int menu_selected_global = 0;
auto menu_global = Container::Vertical(
{
},
&menu_selected_global);
auto info = Renderer([&] {
int g = menu_selected_global;
return window(text("Content"),
vbox({
text("menu_selected_global = " + std::to_string(g)),
text("menu_selected[0] = " +
text("menu_selected[1] = " +
text("menu_selected[2] = " +
text("Value = " + value),
})) |
flex;
});
auto global = Container::Horizontal({
menu_global,
info,
});
auto screen = ScreenInteractive::TerminalOutput();
screen.Loop(global);
return EXIT_SUCCESS;
}
std::shared_ptr< ComponentBase > Component