17 auto back_button =
Button(
"Back",
screen.ExitLoopClosure());
18 auto goto_1 =
Button(
"Goto /1", [path] {
Nested(path +
"/1"); });
19 auto goto_2 =
Button(
"Goto /2", [path] {
Nested(path +
"/2"); });
20 auto goto_3 =
Button(
"Goto /3", [path] {
Nested(path +
"/3"); });
21 auto layout = Container::Vertical({
27 auto renderer =
Renderer(layout, [&] {
29 text(
"path: " + path),
43 auto button_quit =
Button(
"Quit",
screen.ExitLoopClosure());
44 auto button_nested =
Button(
"Nested", [] {
Nested(
""); });
45 screen.Loop(Container::Vertical({
static ScreenInteractive FitComponent()
Component Button(ButtonOption options)
Dibuja un botón. Ejecuta una función al hacer clic.
Component Renderer(Component child, std::function< Element()>)
Retorna un nuevo Componente, similar a |child|, pero usando |render| como el evento Component::Render...
virtual void Render(Screen &screen)
Muestra un elemento en un ftxui::Screen.
Element text(std::wstring text)
Muestra un fragmento de texto Unicode.
Element separator()
Dibuja una separación vertical u horizontal entre otros dos elementos.
El espacio de nombres ftxui:: de FTXUI.
void Nested(std::string path)