FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/dom/border.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 <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}
int main()
The FTXUI ftxui:: namespace.
Definition animation.hpp:10