#include <string>
text("FTXUI: Una potente biblioteca para construir interfaces de usuario."),
text("Disfruta de un rico conjunto de componentes y un estilo declarativo."),
text("Crea UIs hermosas y responsivas con un mínimo esfuerzo."),
text("Únete a la comunidad y experimenta el poder de FTXUI."),
});
}
auto screen = ScreenInteractive::TerminalOutput();
auto quit =
Button(
"Quit",
screen.ExitLoopClosure(), ButtonOption::Animated());
int selection_change_counter = 0;
std::string selection_content = "";
selection_change_counter++;
selection_content =
screen.GetSelection();
});
auto renderer = Renderer(quit, [&] {
text("Selección cambiada: " + std::to_string(selection_change_counter) +
" veces"),
text("Actualmente seleccionado: "),
paragraph(selection_content) | vscroll_indicator | frame | border |
separator(),
separator(),
})),
separator(),
separator(),
})),
window(text(
"División en cuadrícula con estilo diferente"),
separator(),
| selectionBackgroundColor(Color::Yellow)
| selectionColor(Color::Black)
| selectionStyleReset,
separator(),
}),
separator(),
separator(),
}),
separator(),
}),
})),
quit->Render(),
});
});
}
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
Un carácter Unicode y su estilo asociado.
return dimx size(HEIGHT, EQUAL, dimy)
return window(text(title)|hcenter|bold, text("contenido")|hcenter|dim)|size(WIDTH
return hbox({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
El espacio de nombres ftxui:: de FTXUI.
std::shared_ptr< Node > Element