FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
style_inverted.cpp
浏览该文件的文档.
1// 版权所有 2020 Arthur Sonzogni. 保留所有权利。
2// 本源代码的使用受 MIT 许可证的约束,该许可证可在
3// LICENSE 文件中找到。
4#include <ftxui/dom/elements.hpp> // for text, operator|, inverted, Fit, hbox, Element
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
11int main() {
12 using namespace ftxui;
13 auto document = hbox({
14 text("This text is "),
15 text("inverted") | inverted,
16 text(". Do you like it?"),
17 });
18 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
19 Render(screen, document);
20 screen.Print();
21
22 return 0;
23}
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
int main()