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
// Use of this source code is governed by the MIT license that can be found in
3
// the LICENSE file.
4
#ifndef FTXUI_SCREEN_PIXEL_HPP
5
#define FTXUI_SCREEN_PIXEL_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
11
namespace
ftxui
{
12
13
/// @brief Un carácter Unicode y su estilo asociado.
14
/// @ingroup screen
15
struct
Pixel
{
16
Pixel
()
17
: blink(false),
18
bold(false),
19
dim(false),
20
italic(false),
21
inverted(false),
22
underlined(false),
23
underlined_double
(false),
24
strikethrough(false),
25
automerge(false) {}
26
27
// Un campo de bits que representa el estilo:
28
bool
blink
: 1;
29
bool
bold
: 1;
30
bool
dim
: 1;
31
bool
italic
: 1;
32
bool
inverted
: 1;
33
bool
underlined
: 1;
34
bool
underlined_double
: 1;
35
bool
strikethrough
: 1;
36
bool
automerge
: 1;
37
38
// El hipervínculo asociado al píxel.
39
// 0 es el valor predeterminado, lo que significa que no hay hipervínculo.
40
// Es un índice para acceder a los metadatos de la pantalla
41
uint8_t hyperlink = 0;
42
43
// Los grafemas almacenados en el píxel. Para admitir la combinación de caracteres,
44
// como: a?, esto puede contener potencialmente múltiples puntos de código.
45
std::string
character
=
""
;
46
47
// Colores:
48
Color
background_color
=
Color::Default
;
49
Color
foreground_color
=
Color::Default
;
50
};
51
52
}
// namespace ftxui
53
54
#endif
// FTXUI_SCREEN_PIXEL_HPP
color.hpp
ftxui::Pixel::inverted
bool inverted
Definition
pixel.hpp:32
ftxui::Pixel::strikethrough
bool strikethrough
Definition
pixel.hpp:35
ftxui::Pixel::foreground_color
Color foreground_color
Definition
pixel.hpp:49
ftxui::Pixel::blink
bool blink
Definition
pixel.hpp:28
ftxui::Pixel::background_color
Color background_color
Definition
pixel.hpp:48
ftxui::Pixel::character
std::string character
Definition
pixel.hpp:45
ftxui::Pixel::dim
bool dim
Definition
pixel.hpp:30
ftxui::Pixel::Pixel
Pixel()
Definition
pixel.hpp:16
ftxui::Pixel::bold
bool bold
Definition
pixel.hpp:29
ftxui::Pixel::underlined
bool underlined
Definition
pixel.hpp:33
ftxui::Color::Default
@ Default
Definition
color.hpp:49
ftxui::Pixel::italic
bool italic
Definition
pixel.hpp:31
ftxui::Pixel::automerge
bool automerge
Definition
pixel.hpp:36
ftxui::Pixel::underlined_double
bool underlined_double
Definition
pixel.hpp:34
ftxui::Color
Color es una clase que representa un color en la interfaz de usuario de la terminal.
Definition
color.hpp:21
ftxui::Pixel
Un carácter Unicode y su estilo asociado.
Definition
pixel.hpp:15
ftxui
El espacio de nombres ftxui:: de FTXUI.
Definition
animation.hpp:10