FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
border_style.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// 本原始碼的使用受 MIT 授權約束,該授權可在 LICENSE 檔案中找到。
3#include <ftxui/dom/elements.hpp> // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
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/node.hpp" // for Render
9#include "ftxui/screen/color.hpp" // for ftxui
10
11int main() {
12 using namespace ftxui;
13
14 auto document = vbox({
15 text("borderLight") | borderLight,
16 text("borderDashed") | borderDashed,
17 text("borderHeavy") | borderHeavy,
18 text("borderDouble") | borderDouble,
19 text("borderRounded") | borderRounded,
20 });
21
22 auto screen =
23 Screen::Create(Dimension::Fit(document), Dimension::Fit(document));
24 Render(screen, document);
25 screen.Print();
26 std::cout << std::endl;
27}
int main()
void Render(Screen &screen, const Element &element)
在 ftxui::Screen 上顯示元素。
Definition node.cpp:82
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10