FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
style_strikethrough.cpp
Go to the documentation of this file.
1// 版權所有 2020 Arthur Sonzogni. 保留所有權利。
2// 本原始碼的使用受 MIT 授權條款約束,該條款可在
3// LICENSE 文件中找到。
4#include <ftxui/dom/elements.hpp> // 用於 text, operator|, strikethrough, Fit, hbox, Element
5#include <ftxui/screen/screen.hpp> // 用於 Full, Screen
6#include <memory> // 用於 allocator
7
8#include "ftxui/dom/node.hpp" // 用於 Render
9#include "ftxui/screen/color.hpp" // 用於 ftxui
10
11int main() {
12 using namespace ftxui;
13 auto document = //
14 hbox({
15 text("這段文字是 "),
16 text("刪除線") | strikethrough,
17 text("。你喜歡嗎?"),
18 });
19 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
20 Render(screen, document);
21 screen.Print();
22
23 return 0;
24}
void Render(Screen &screen, const Element &element)
在 ftxui::Screen 上顯示元素。
Definition node.cpp:82
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10
int main()