FTXUI 6.1.9 C++ functional terminal UI.

Loading...
Searching...
No Matches
examples/dom/separator.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, center, separator, operator|, flex, Element, vbox, Fit, hbox, border
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
11 int main() {
12 using namespace ftxui;
13 auto document = hbox({
14 text("left-column"),
15 separator(),
16 vbox({
17 center(text("top")) | flex,
18 separator(),
19 center(text("bottom")),
20 }) | flex,
21 separator(),
22 text("right-column"),
23 }) |
24 border;
25 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
26 Render(screen, document);
27 screen.Print();
28
29 return 0;
30}
color.hpp
elements.hpp
main
int main()
Definition examples/dom/separator.cpp:11
ftxui
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
node.hpp
screen.hpp