FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
separator_style.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 en
3// el archivo LICENSE.
4#include <ftxui/screen/screen.hpp> // for Screen
5#include <iostream> // for endl, cout, ostream
6#include <memory> // for allocator
7
8#include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight
9#include "ftxui/dom/node.hpp" // for Render
10#include "ftxui/screen/box.hpp" // for ftxui
11
12int main() {
13 using namespace ftxui;
14
15 auto document = vbox({
16 vbox({
17 text("separatorLight"),
18 separatorLight(),
19 hbox(text("left"), separatorLight(), text("right")),
20 }) | borderLight,
21
22 vbox({
23 text("separatorDashed"),
24 separatorDashed(),
25 hbox(text("left"), separatorDashed(), text("right")),
26 }) | borderDashed,
27
28 vbox({
29 text("separatorHeavy"),
30 separatorHeavy(),
31 hbox(text("left"), separatorHeavy(), text("right")),
32 }) | borderHeavy,
33
34 vbox({
35 text("separatorDouble"),
36 separatorDouble(),
37 hbox(text("left"), separatorDouble(), text("right")),
38 }) | borderDouble,
39 });
40
41 auto screen =
42 Screen::Create(Dimension::Fit(document), Dimension::Fit(document));
43 Render(screen, document);
44 screen.Print();
45 std::cout << std::endl;
46}
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
int main()