FTXUI 6.1.9
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
11namespace ftxui {
12
13/// @brief A Unicode character and its associated style.
14///
15/// @note This struct was previously named Pixel.
16///
17/// @ingroup screen
18struct Cell {
20 : blink(false),
21 bold(false),
22 dim(false),
23 italic(false),
24 inverted(false),
25 underlined(false),
26 underlined_double(false),
27 strikethrough(false),
28 automerge(false) {}
29
30 // A bit field representing the style:
31 bool blink : 1;
32 bool bold : 1;
33 bool dim : 1;
34 bool italic : 1;
35 bool inverted : 1;
36 bool underlined : 1;
38 bool strikethrough : 1;
39 bool automerge : 1;
40
41 // The hyperlink associated with the cell.
42 // 0 is the default value, meaning no hyperlink.
43 // It's an index for accessing Screen meta data
44 uint8_t hyperlink = 0;
45
46 // The graphemes stored into the cell. To support combining characters,
47 // like: a?, this can potentially contain multiple codepoints.
48 std::string character = "";
49
50 // Colors:
53};
54
55} // namespace ftxui
56
57#endif // FTXUI_SCREEN_CELL_HPP
bool inverted
Definition cell.hpp:35
bool strikethrough
Definition cell.hpp:38
Color foreground_color
Definition cell.hpp:52
bool blink
Definition cell.hpp:31
Color background_color
Definition cell.hpp:51
std::string character
Definition cell.hpp:48
bool dim
Definition cell.hpp:33
bool bold
Definition cell.hpp:32
bool underlined
Definition cell.hpp:36
bool italic
Definition cell.hpp:34
bool automerge
Definition cell.hpp:39
bool underlined_double
Definition cell.hpp:37
Color is a class that represents a color in the terminal user interface.
Definition color.hpp:22
A Unicode character and its associated style.
Definition cell.hpp:18
The FTXUI ftxui:: namespace.
Definition animation.hpp:10