FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
separator_style.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/screen/screen.hpp> // for Screen
5#include <iostream> // for endl, cout, ostream
6#include <memory> // for allocator
7
8#include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight
9#include "ftxui/dom/node.hpp" // for Render
10#include "ftxui/screen/box.hpp" // for ftxui
11
12int main() {
13 using namespace ftxui;
14
15 auto document = vbox({
16 vbox({
17 text("separatorLight"),
18 separatorLight(),
19 hbox(text("left"), separatorLight(), text("right")),
20 }) | borderLight,
21
22 vbox({
23 text("separatorDashed"),
24 separatorDashed(),
25 hbox(text("left"), separatorDashed(), text("right")),
26 }) | borderDashed,
27
28 vbox({
29 text("separatorHeavy"),
30 separatorHeavy(),
31 hbox(text("left"), separatorHeavy(), text("right")),
32 }) | borderHeavy,
33
34 vbox({
35 text("separatorDouble"),
36 separatorDouble(),
37 hbox(text("left"), separatorDouble(), text("right")),
38 }) | borderDouble,
39 });
40
41 auto screen =
42 Screen::Create(Dimension::Fit(document), Dimension::Fit(document));
43 Render(screen, document);
44 screen.Print();
45 std::cout << std::endl;
46}
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
int main()