FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
cell.hpp
Go to the documentation of this file.
1// Copyright 2024 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#ifndef FTXUI_SCREEN_CELL_HPP
5#define FTXUI_SCREEN_CELL_HPP
6
7#include <cstdint> // for uint8_t
8#include <string> // for string, basic_string, allocator
9#include "ftxui/screen/color.hpp" // for Color, Color::Default
10#include "ftxui/util/export.hpp"
11
12namespace ftxui {
13
14/// @brief Unicode文字とその関連スタイル。
15///
16/// @note この構造体は以前はPixelという名前でした。
17///
18/// @ingroup screen
19struct FTXUI_EXPORT(SCREEN) Cell {
20 Cell()
21 : blink(false),
22 bold(false),
23 dim(false),
24 italic(false),
25 inverted(false),
26 underlined(false),
27 underlined_double(false),
28 strikethrough(false),
29 automerge(false) {}
30
31 // スタイルを表すビットフィールド:
32 bool blink : 1;
33 bool bold : 1;
34 bool dim : 1;
35 bool italic : 1;
36 bool inverted : 1;
37 bool underlined : 1;
38 bool underlined_double : 1;
39 bool strikethrough : 1;
40 bool automerge : 1;
41
42 // セルに関連付けられたハイパーリンク。
43 // 0はデフォルト値で、ハイパーリンクなしを意味します。
44 // Screenのメタデータにアクセスするためのインデックスです。
45 uint8_t hyperlink = 0;
46
47 // セルに格納されているグラフェム。結合文字をサポートするために、
48 // 例えばa?のように、複数のコードポイントを含む可能性があります。
49 std::string character = "";
50
51 // 色:
52 Color background_color = Color::Default;
53 Color foreground_color = Color::Default;
54};
55
56} // namespace ftxui
57
58#endif // FTXUI_SCREEN_CELL_HPP
FTXUI ftxui::名前空間
Definition animation.hpp:11