FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/dom/separator.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. Todos los derechos reservados.
2// El uso de este código fuente se rige por la licencia MIT que se puede encontrar
3// en el archivo LICENSE.
4#include <ftxui/dom/elements.hpp> // for text, center, separator, operator|, flex, Element, vbox, Fit, hbox, border
5#include <ftxui/screen/screen.hpp> // for Full, Screen
6#include <memory> // for allocator
7
8#include "ftxui/dom/node.hpp" // for Render
9#include "ftxui/screen/color.hpp" // for ftxui
10
11int main() {
12 using namespace ftxui;
13 auto document = hbox({
14 text("left-column"),
15 separator(),
16 vbox({
17 center(text("top")) | flex,
18 separator(),
19 center(text("bottom")),
20 }) | flex,
21 separator(),
22 text("right-column"),
23 }) |
24 border;
25 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
26 Render(screen, document);
27 screen.Print();
28
29 return 0;
30}
auto screen
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
Definition vbox.cpp:95
return hbox({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
El espacio de nombres ftxui:: de FTXUI.
Definition animation.hpp:10