FTXUI
6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
vbox_hbox.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 <stdio.h>
// for getchar
5
#include <
ftxui/dom/elements.hpp
>
// for filler, text, hbox, vbox
6
#include <
ftxui/screen/screen.hpp
>
// for Full, Screen
7
#include <memory>
// for allocator
8
9
#include "
ftxui/dom/node.hpp
"
// for Render
10
#include "
ftxui/screen/color.hpp
"
// for ftxui
11
12
int
main
() {
13
using namespace
ftxui
;
14
auto
document =
//
15
vbox
({
16
hbox
({
17
text(
"north-west"
),
18
filler(),
19
text(
"north-east"
),
20
}),
21
filler(),
22
hbox
({
23
filler(),
24
text(
"center"
),
25
filler(),
26
}),
27
filler(),
28
hbox
({
29
text(
"south-west"
),
30
filler(),
31
text(
"south-east"
),
32
}),
33
});
34
auto
screen
= Screen::Create(Dimension::Full());
35
Render(
screen
, document);
36
screen
.Print();
37
getchar();
38
39
return
0;
40
}
color.hpp
screen
auto screen
Definition
composition.cpp:56
elements.hpp
vbox
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
Definition
vbox.cpp:95
hbox
return hbox({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
ftxui
El espacio de nombres ftxui:: de FTXUI.
Definition
animation.hpp:10
node.hpp
screen.hpp
main
int main()
Definition
vbox_hbox.cpp:12