FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
border_colored.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 operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
5#include <ftxui/screen/screen.hpp> // for Screen
6#include <iostream> // for endl, cout, ostream
7#include <memory> // for allocator
8
9#include "ftxui/dom/node.hpp" // for Render
10#include "ftxui/screen/color.hpp" // for ftxui
11
12int main() {
13 using namespace ftxui;
14
15 auto make_boxed = [] {
16 return vbox({
17 text("borderLight") | borderStyled(LIGHT, Color::Red),
18 text("borderDashed") | borderStyled(DASHED, Color::Green),
19 text("borderHeavy") | borderStyled(HEAVY, Color::Blue),
20 text("borderDouble") | borderStyled(DOUBLE, Color::Yellow),
21 text("borderRounded") | borderStyled(ROUNDED, Color::Cyan),
22 });
23 };
24
25 auto document = hbox({
26 make_boxed(),
27 separator() | color(Color::Red),
28 make_boxed(),
29 separator() | color(Color::Red),
30 make_boxed(),
31 }) |
32 borderStyled(ROUNDED, Color::Red);
33
34 auto screen =
35 Screen::Create(Dimension::Fit(document), Dimension::Fit(document));
36 Render(screen, document);
37 screen.Print();
38 std::cout << std::endl;
39}
int main()
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