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