FTXUI
6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
style_bold.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 text, operator|, bold, 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
10
int
main
() {
11
using namespace
ftxui
;
12
auto
document =
//
13
hbox({
14
text(
"This text is "
),
15
text(
"bold"
) | bold,
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
}
color.hpp
elements.hpp
Render
void Render(Screen &screen, const Element &element)
在 ftxui::Screen 上顯示元素。
Definition
node.cpp:82
ftxui
FTXUI 的 ftxui:: 命名空間
Definition
animation.hpp:10
node.hpp
screen.hpp
main
int main()
Definition
style_bold.cpp:10