FTXUI 6.1.9
C++ functional terminal UI.
Chargement...
Recherche...
Aucune correspondance
examples/dom/border.cpp
Aller à la documentation de ce fichier.
1// Copyright 2020 Arthur Sonzogni. Tous droits réservés.
2// L'utilisation de ce code source est régie par la licence MIT qui peut être trouvée dans
3// le fichier LICENSE.
4#include <stdlib.h> // for EXIT_SUCCESS
5#include <ftxui/dom/elements.hpp> // for text, operator|, vbox, border, Element, Fit, hbox
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
12int main() {
13 using namespace ftxui;
14 auto document = //
15 hbox({
16 vbox({
17 text("Line 1"),
18 text("Line 2"),
19 text("Line 3"),
20 }) | border,
21
22 vbox({
23 text("Line 4"),
24 text("Line 5"),
25 text("Line 6"),
26 }) | border,
27
28 vbox({
29 text("Line 7"),
30 text("Line 8"),
31 text("Line 9"),
32 }) | border,
33 });
34 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
35 Render(screen, document);
36 screen.Print();
37 return EXIT_SUCCESS;
38}
auto screen
void Render(Screen &screen, const Element &element)
Affiche un élément sur un ftxui::Screen.
Definition node.cpp:83
L'espace de noms FTXUI ftxui::
Definition animation.hpp:10