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 carácter Unicode y su estilo asociado.
15///
16/// @note Esta estructura se llamaba anteriormente 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 campo de bits que representa el estilo:
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 // El hipervínculo asociado a la celda.
43 // 0 es el valor predeterminado, lo que significa que no hay hipervínculo.
44 // Es un índice para acceder a los metadatos de Screen
45 uint8_t hyperlink = 0;
46
47 // Los grafemas almacenados en la celda. Para admitir caracteres combinados,
48 // como: a?, esto puede potencialmente contener múltiples puntos de código.
49 std::string character = "";
50
51 // Colores:
52 Color background_color = Color::Default;
53 Color foreground_color = Color::Default;
54};
55
56} // namespace ftxui
57
58#endif // FTXUI_SCREEN_CELL_HPP
El espacio de nombres ftxui:: de FTXUI.
Definition animation.hpp:11