FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/dom/dbox.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#include <ftxui/dom/elements.hpp> // for text, operator|, border, Element, vbox, center, Fit, dbox
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 = dbox({
14 vbox({
15 text("line_1"),
16 text("line_2"),
17 text("line_3"),
18 text("line_4"),
19 text("line_5"),
20 }) | border,
21 text("overlay") | border | center,
22 });
23 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
24 Render(screen, document);
25
26 screen.Print();
27
28 return 0;
29}
int main()
The FTXUI ftxui:: namespace.
Definition animation.hpp:10