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 Un caractère Unicode et son style associé.
15///
16/// @note Cette structure s'appelait précédemment 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 // Un champ de bits représentant le style :
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 // Le lien hypertexte associé à la cellule.
43 // 0 est la valeur par défaut, signifiant l'absence de lien hypertexte.
44 // C'est un index permettant d'accéder aux méta-données de Screen.
45 uint8_t hyperlink = 0;
46
47 // Les graphèmes stockés dans la cellule. Pour supporter les caractères
48 // combinants, comme : a?, ceci peut potentiellement contenir plusieurs
49 // codepoints.
50 std::string character = "";
51
52 // Couleurs :
53 Color background_color = Color::Default;
54 Color foreground_color = Color::Default;
55};
56
57} // namespace ftxui
58
59#endif // FTXUI_SCREEN_CELL_HPP
L'espace de noms FTXUI ftxui::
Definition animation.hpp:11