FTXUI  6.0.2
C++ functional terminal UI.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
11namespace ftxui {
12
13/// @brief A Unicode character and its associated style.
14/// @ingroup screen
15struct Pixel {
26
27 // A bit field representing the style:
28 bool blink : 1;
29 bool bold : 1;
30 bool dim : 1;
31 bool italic : 1;
32 bool inverted : 1;
33 bool underlined : 1;
35 bool strikethrough : 1;
36 bool automerge : 1;
37
38 // The hyperlink associated with the pixel.
39 // 0 is the default value, meaning no hyperlink.
40 // It's an index for accessing Screen meta data
42
43 // The graphemes stored into the pixel. To support combining characters,
44 // like: a?, this can potentially contain multiple codepoints.
45 std::string character = "";
46
47 // Colors:
50};
51
52} // namespace ftxui
53
54#endif // FTXUI_SCREEN_PIXEL_HPP
A class representing terminal colors.
Definition color.hpp:20
std::shared_ptr< T > Make(Args &&... args)
Definition component.hpp:26
A Unicode character and its associated style.
Definition pixel.hpp:15
uint8_t hyperlink
Definition pixel.hpp:41
bool inverted
Definition pixel.hpp:32
bool strikethrough
Definition pixel.hpp:35
Color foreground_color
Definition pixel.hpp:49
bool blink
Definition pixel.hpp:28
Color background_color
Definition pixel.hpp:48
std::string character
Definition pixel.hpp:45
bool bold
Definition pixel.hpp:29
bool underlined
Definition pixel.hpp:33
bool italic
Definition pixel.hpp:31
bool automerge
Definition pixel.hpp:36
bool underlined_double
Definition pixel.hpp:34