14 auto screen = App::Fullscreen();
31 auto renderer =
Renderer(split, [&] {
32 return window(
text(
"Drag the separator with the mouse"),
34 text(
"Min: " + std::to_string(size_min)),
35 text(
"Max: " + std::to_string(size_max)),
36 text(
"Size: " + std::to_string(size)),
38 split->Render() |
flex,
42 screen.Loop(renderer);
Component Renderer(Component child, std::function< Element()>)
Retourne un nouveau Component, similaire à |child|, mais utilisant |render| comme événement Component...
Element window(Element title, Element content, BorderStyle border=ROUNDED)
Dessine une fenêtre avec un titre et une bordure autour de l'élément.
Element text(std::string_view text)
Affiche un morceau de texte unicode encodé en UTF8.
Element flex(Element child)
Permet à un élément enfant de s'étendre proportionnellement à l'espace restant dans un conteneur.
Element center(Element child)
Centre un élément horizontalement et verticalement.
Element separator()
Dessine une séparation verticale ou horizontale entre deux autres éléments.
Element vbox(Elements children)
Un conteneur affichant les éléments verticalement un par un.
L'espace de noms FTXUI ftxui::
Component ResizableSplit(ResizableSplitOption options)
Une séparation entre deux composants.