FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
pixel.hpp
Go to the documentation of this file.
1// Copyright 2024 Arthur Sonzogni. All rights reserved.
2// 本原始碼的使用受 MIT 授權條款約束,詳情請參閱 LICENSE 檔案。
3#ifndef FTXUI_SCREEN_PIXEL_HPP
4#define FTXUI_SCREEN_PIXEL_HPP
5
6#include <cstdint> // for uint8_t
7#include <string> // for string, basic_string, allocator
8#include "ftxui/screen/color.hpp" // for Color, Color::Default
9
10namespace ftxui {
11
12/// @brief 一個 Unicode 字元及其相關樣式。
13/// @ingroup screen
14struct Pixel {
16 : blink(false),
17 bold(false),
18 dim(false),
19 italic(false),
20 inverted(false),
21 underlined(false),
22 underlined_double(false),
23 strikethrough(false),
24 automerge(false) {}
25
26 // 表示樣式的位元欄位:
27 bool blink : 1;
28 bool bold : 1;
29 bool dim : 1;
30 bool italic : 1;
31 bool inverted : 1;
32 bool underlined : 1;
34 bool strikethrough : 1;
35 bool automerge : 1;
36
37 // 與像素關聯的超連結。
38 // 0 是預設值,表示沒有超連結。
39 // 它是用於存取螢幕元資料的索引。
40 uint8_t hyperlink = 0;
41
42 // 儲存在像素中的字素。為了支援組合字元,
43 // 例如:á,這可能包含多個碼點。
44 std::string character = "";
45
46 // 顏色:
49};
50
51} // namespace ftxui
52
53#endif // FTXUI_SCREEN_PIXEL_HPP
bool inverted
Definition pixel.hpp:31
bool strikethrough
Definition pixel.hpp:34
Color foreground_color
Definition pixel.hpp:48
bool blink
Definition pixel.hpp:27
Color background_color
Definition pixel.hpp:47
std::string character
Definition pixel.hpp:44
bool bold
Definition pixel.hpp:28
bool underlined
Definition pixel.hpp:32
bool italic
Definition pixel.hpp:30
bool automerge
Definition pixel.hpp:35
bool underlined_double
Definition pixel.hpp:33
Color 是一個在終端使用者介面中表示顏色的類別。
Definition color.hpp:20
一個 Unicode 字元及其相關樣式。
Definition pixel.hpp:14
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10