|
FTXUI 6.1.9
C++ functional terminal UI.
|
Por favor, consulta el tutorial del módulo ftxui/screen.
Namespaces | |
| namespace | ftxui::Dimension |
| Define cómo deben ser las dimensiones de la pantalla. | |
Classes | |
| struct | Box |
| Box es una estructura que representa un área rectangular en un espacio 2D. More... | |
| class | Color |
| Color es una clase que representa un color en la interfaz de usuario de la terminal. More... | |
| struct | ColorInfo |
| ColorInfo es una estructura que contiene información sobre la paleta de colores del terminal. More... | |
| class | Image |
| Una cuadrícula rectangular de píxeles. More... | |
| struct | Pixel |
| Un carácter Unicode y su estilo asociado. More... | |
| class | Screen |
| Una cuadrícula rectangular de píxeles. More... | |
| struct | Dimensions |
| Dimensions es una estructura que representa el tamaño de la terminal. More... | |
Enumerations | |
| enum | Color { Palette1 , Palette16 , Palette256 , TrueColor } |
| Color es una enumeración que representa el soporte de color de la terminal. More... | |
Functions | |
| Dimensions | Size () |
| Obtiene el tamaño del terminal. | |
| Color | ColorSupport () |
| Obtiene el soporte de color del terminal. | |
| struct ftxui::Box |
Box es una estructura que representa un área rectangular en un espacio 2D.
Se define por sus coordenadas mínimas y máximas a lo largo de los ejes x e y. Tenga en cuenta que las coordenadas son inclusivas, lo que significa que la caja incluye tanto los valores mínimos como los máximos.
Public Member Functions | |
| void | Shift (int x, int y) |
| bool | Contain (int x, int y) const |
| bool | IsEmpty () const |
| bool | operator== (const Box &other) const |
| bool | operator!= (const Box &other) const |
Static Public Member Functions | |
| static auto | Intersection (Box a, Box b) -> Box |
| static auto | Union (Box a, Box b) -> Box |
Public Attributes | |
| int | x_min = 0 |
| int | x_max = 0 |
| int | y_min = 0 |
| int | y_max = 0 |
| void Shift | ( | int | x, |
| int | y ) |
| bool Contain | ( | int | x, |
| int | y ) const |
| bool operator== | ( | const Box & | other | ) | const |
| bool operator!= | ( | const Box & | other | ) | const |
| class ftxui::Color |
Color es una clase que representa un color en la interfaz de usuario de la terminal.
Public Types | |
| enum | Palette1 : uint8_t { Default } |
| enum | Palette16 : uint8_t { Black = 0 , Red = 1 , Green = 2 , Yellow = 3 , Blue = 4 , Magenta = 5 , Cyan = 6 , GrayLight = 7 , GrayDark = 8 , RedLight = 9 , GreenLight = 10 , YellowLight = 11 , BlueLight = 12 , MagentaLight = 13 , CyanLight = 14 , White = 15 } |
| enum | Palette256 : uint8_t { Aquamarine1 = 122 , Aquamarine1Bis = 86 , Aquamarine3 = 79 , Blue1 = 21 , Blue3 = 19 , Blue3Bis = 20 , BlueViolet = 57 , CadetBlue = 72 , CadetBlueBis = 73 , Chartreuse1 = 118 , Chartreuse2 = 112 , Chartreuse2Bis = 82 , Chartreuse3 = 70 , Chartreuse3Bis = 76 , Chartreuse4 = 64 , CornflowerBlue = 69 , Cornsilk1 = 230 , Cyan1 = 51 , Cyan2 = 50 , Cyan3 = 43 , DarkBlue = 18 , DarkCyan = 36 , DarkGoldenrod = 136 , DarkGreen = 22 , DarkKhaki = 143 , DarkMagenta = 90 , DarkMagentaBis = 91 , DarkOliveGreen1 = 191 , DarkOliveGreen1Bis = 192 , DarkOliveGreen2 = 155 , DarkOliveGreen3 = 107 , DarkOliveGreen3Bis = 113 , DarkOliveGreen3Ter = 149 , DarkOrange = 208 , DarkOrange3 = 130 , DarkOrange3Bis = 166 , DarkRed = 52 , DarkRedBis = 88 , DarkSeaGreen = 108 , DarkSeaGreen1 = 158 , DarkSeaGreen1Bis = 193 , DarkSeaGreen2 = 151 , DarkSeaGreen2Bis = 157 , DarkSeaGreen3 = 115 , DarkSeaGreen3Bis = 150 , DarkSeaGreen4 = 65 , DarkSeaGreen4Bis = 71 , DarkSlateGray1 = 123 , DarkSlateGray2 = 87 , DarkSlateGray3 = 116 , DarkTurquoise = 44 , DarkViolet = 128 , DarkVioletBis = 92 , DeepPink1 = 198 , DeepPink1Bis = 199 , DeepPink2 = 197 , DeepPink3 = 161 , DeepPink3Bis = 162 , DeepPink4 = 125 , DeepPink4Bis = 89 , DeepPink4Ter = 53 , DeepSkyBlue1 = 39 , DeepSkyBlue2 = 38 , DeepSkyBlue3 = 31 , DeepSkyBlue3Bis = 32 , DeepSkyBlue4 = 23 , DeepSkyBlue4Bis = 24 , DeepSkyBlue4Ter = 25 , DodgerBlue1 = 33 , DodgerBlue2 = 27 , DodgerBlue3 = 26 , Gold1 = 220 , Gold3 = 142 , Gold3Bis = 178 , Green1 = 46 , Green3 = 34 , Green3Bis = 40 , Green4 = 28 , GreenYellow = 154 , Grey0 = 16 , Grey100 = 231 , Grey11 = 234 , Grey15 = 235 , Grey19 = 236 , Grey23 = 237 , Grey27 = 238 , Grey3 = 232 , Grey30 = 239 , Grey35 = 240 , Grey37 = 59 , Grey39 = 241 , Grey42 = 242 , Grey46 = 243 , Grey50 = 244 , Grey53 = 102 , Grey54 = 245 , Grey58 = 246 , Grey62 = 247 , Grey63 = 139 , Grey66 = 248 , Grey69 = 145 , Grey7 = 233 , Grey70 = 249 , Grey74 = 250 , Grey78 = 251 , Grey82 = 252 , Grey84 = 188 , Grey85 = 253 , Grey89 = 254 , Grey93 = 255 , Honeydew2 = 194 , HotPink = 205 , HotPink2 = 169 , HotPink3 = 132 , HotPink3Bis = 168 , HotPinkBis = 206 , IndianRed = 131 , IndianRed1 = 203 , IndianRed1Bis = 204 , IndianRedBis = 167 , Khaki1 = 228 , Khaki3 = 185 , LightCoral = 210 , LightCyan1Bis = 195 , LightCyan3 = 152 , LightGoldenrod1 = 227 , LightGoldenrod2 = 186 , LightGoldenrod2Bis = 221 , LightGoldenrod2Ter = 222 , LightGoldenrod3 = 179 , LightGreen = 119 , LightGreenBis = 120 , LightPink1 = 217 , LightPink3 = 174 , LightPink4 = 95 , LightSalmon1 = 216 , LightSalmon3 = 137 , LightSalmon3Bis = 173 , LightSeaGreen = 37 , LightSkyBlue1 = 153 , LightSkyBlue3 = 109 , LightSkyBlue3Bis = 110 , LightSlateBlue = 105 , LightSlateGrey = 103 , LightSteelBlue = 147 , LightSteelBlue1 = 189 , LightSteelBlue3 = 146 , LightYellow3 = 187 , Magenta1 = 201 , Magenta2 = 165 , Magenta2Bis = 200 , Magenta3 = 127 , Magenta3Bis = 163 , Magenta3Ter = 164 , MediumOrchid = 134 , MediumOrchid1 = 171 , MediumOrchid1Bis = 207 , MediumOrchid3 = 133 , MediumPurple = 104 , MediumPurple1 = 141 , MediumPurple2 = 135 , MediumPurple2Bis = 140 , MediumPurple3 = 97 , MediumPurple3Bis = 98 , MediumPurple4 = 60 , MediumSpringGreen = 49 , MediumTurquoise = 80 , MediumVioletRed = 126 , MistyRose1 = 224 , MistyRose3 = 181 , NavajoWhite1 = 223 , NavajoWhite3 = 144 , NavyBlue = 17 , Orange1 = 214 , Orange3 = 172 , Orange4 = 58 , Orange4Bis = 94 , OrangeRed1 = 202 , Orchid = 170 , Orchid1 = 213 , Orchid2 = 212 , PaleGreen1 = 121 , PaleGreen1Bis = 156 , PaleGreen3 = 114 , PaleGreen3Bis = 77 , PaleTurquoise1 = 159 , PaleTurquoise4 = 66 , PaleVioletRed1 = 211 , Pink1 = 218 , Pink3 = 175 , Plum1 = 219 , Plum2 = 183 , Plum3 = 176 , Plum4 = 96 , Purple = 129 , Purple3 = 56 , Purple4 = 54 , Purple4Bis = 55 , PurpleBis = 93 , Red1 = 196 , Red3 = 124 , Red3Bis = 160 , RosyBrown = 138 , RoyalBlue1 = 63 , Salmon1 = 209 , SandyBrown = 215 , SeaGreen1 = 84 , SeaGreen1Bis = 85 , SeaGreen2 = 83 , SeaGreen3 = 78 , SkyBlue1 = 117 , SkyBlue2 = 111 , SkyBlue3 = 74 , SlateBlue1 = 99 , SlateBlue3 = 61 , SlateBlue3Bis = 62 , SpringGreen1 = 48 , SpringGreen2 = 42 , SpringGreen2Bis = 47 , SpringGreen3 = 35 , SpringGreen3Bis = 41 , SpringGreen4 = 29 , SteelBlue = 67 , SteelBlue1 = 75 , SteelBlue1Bis = 81 , SteelBlue3 = 68 , Tan = 180 , Thistle1 = 225 , Thistle3 = 182 , Turquoise2 = 45 , Turquoise4 = 30 , Violet = 177 , Wheat1 = 229 , Wheat4 = 101 , Yellow1 = 226 , Yellow2 = 190 , Yellow3 = 148 , Yellow3Bis = 184 , Yellow4 = 100 , Yellow4Bis = 106 } |
Public Member Functions | |
| Color () | |
| Construye un color transparente. | |
| Color (Palette1 index) | |
| Construye un color transparente. | |
| Color (Palette16 index) | |
| Construye un color usando los colores de la Paleta16. | |
| Color (Palette256 index) | |
| Construye un color usando los colores de la Paleta256. | |
| Color (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha=255) | |
| Construye un Color a partir de su representación RGB. https://en.wikipedia.org/wiki/RGB_color_model. | |
| bool | operator== (const Color &rhs) const |
| bool | operator!= (const Color &rhs) const |
| std::string | Print (bool is_background_color) const |
| bool | IsOpaque () const |
Static Public Member Functions | |
| static Color | RGB (uint8_t red, uint8_t green, uint8_t blue) |
| Construye un Color a partir de su representación RGB. https://en.wikipedia.org/wiki/RGB_color_model. | |
| static Color | HSV (uint8_t hue, uint8_t saturation, uint8_t value) |
| Construye un Color a partir de su representación HSV. https://en.wikipedia.org/wiki/HSL_and_HSV. | |
| static Color | RGBA (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) |
| Construye un Color a partir de su representación RGBA. https://en.wikipedia.org/wiki/RGB_color_model. | |
| static Color | HSVA (uint8_t hue, uint8_t saturation, uint8_t value, uint8_t alpha) |
| Construye un Color a partir de su representación HSV. https://en.wikipedia.org/wiki/HSL_and_HSV. | |
| static Color | Interpolate (float t, const Color &a, const Color &b) |
| static Color | Blend (const Color &lhs, const Color &rhs) |
| Mezcla dos colores usando el canal alfa. | |
| enum Palette16 : uint8_t |
| enum Palette256 : uint8_t |
|
default |
Construye un color transparente.
Construye un color transparente.
Definition at line 80 of file screen/color.cpp.
Construye un color usando los colores de la Paleta16.
Definition at line 83 of file screen/color.cpp.
| Color | ( | Palette256 | index | ) |
Construye un color usando los colores de la Paleta256.
Definition at line 87 of file screen/color.cpp.
| Color | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue, | ||
| uint8_t | alpha = 255 ) |
Construye un Color a partir de su representación RGB. https://en.wikipedia.org/wiki/RGB_color_model.
| red | La cantidad de rojo [0,255] |
| green | La cantidad de verde [0,255] |
| blue | La cantidad de azul [0,255] |
| alpha | La cantidad de alfa [0,255] |
Definition at line 103 of file screen/color.cpp.
|
static |
Construye un Color a partir de su representación RGB. https://en.wikipedia.org/wiki/RGB_color_model.
| red | La cantidad de rojo [0,255] |
| green | La cantidad de verde [0,255] |
| blue | La cantidad de azul [0,255] |
Definition at line 147 of file screen/color.cpp.
|
static |
Construye un Color a partir de su representación HSV. https://en.wikipedia.org/wiki/HSL_and_HSV.
| h | El tono del color [0,255] |
| s | La "saturación" [0,255]. |
| v | La "luminosidad" [0,255] |
Definition at line 198 of file screen/color.cpp.
|
static |
Construye un Color a partir de su representación RGBA. https://en.wikipedia.org/wiki/RGB_color_model.
| red | La cantidad de rojo [0,255] |
| green | La cantidad de verde [0,255] |
| blue | La cantidad de azul [0,255] |
| alpha | La cantidad de alfa [0,255] |
Definition at line 159 of file screen/color.cpp.
|
static |
Construye un Color a partir de su representación HSV. https://en.wikipedia.org/wiki/HSL_and_HSV.
| h | El tono del color [0,255] |
| s | La "saturación" [0,255]. |
| v | La "luminosidad" [0,255] |
| alpha | La cantidad de alfa [0,255] |
Definition at line 171 of file screen/color.cpp.
Definition at line 203 of file screen/color.cpp.
Mezcla dos colores usando el canal alfa.
Definition at line 272 of file screen/color.cpp.
| bool operator== | ( | const Color & | rhs | ) | const |
Definition at line 37 of file screen/color.cpp.
| bool operator!= | ( | const Color & | rhs | ) | const |
Definition at line 42 of file screen/color.cpp.
| std::string Print | ( | bool | is_background_color | ) | const |
Definition at line 46 of file screen/color.cpp.
| struct ftxui::ColorInfo |
ColorInfo es una estructura que contiene información sobre la paleta de colores del terminal.
Definition at line 16 of file color_info.hpp.
Public Attributes | |
| const char * | name |
| uint8_t | index_256 |
| uint8_t | index_16 |
| uint8_t | red |
| uint8_t | green |
| uint8_t | blue |
| uint8_t | hue |
| uint8_t | saturation |
| uint8_t | value |
| const char* name |
Definition at line 17 of file color_info.hpp.
| uint8_t index_256 |
Definition at line 18 of file color_info.hpp.
| uint8_t index_16 |
Definition at line 19 of file color_info.hpp.
| uint8_t red |
Definition at line 20 of file color_info.hpp.
| uint8_t green |
Definition at line 21 of file color_info.hpp.
| uint8_t blue |
Definition at line 22 of file color_info.hpp.
| uint8_t hue |
Definition at line 23 of file color_info.hpp.
| uint8_t saturation |
Definition at line 24 of file color_info.hpp.
| uint8_t value |
Definition at line 25 of file color_info.hpp.
| class ftxui::Image |
Inheritance diagram for Image:Public Member Functions | |
| Image ()=delete | |
| Image (int dimx, int dimy) | |
| virtual | ~Image ()=default |
| std::string & | at (int x, int y) |
| Accede a un caracter en una celda en una posición dada. | |
| const std::string & | at (int x, int y) const |
| Accede a un caracter en una celda en una posición dada. | |
| Pixel & | PixelAt (int x, int y) |
| Accede a una celda (Pixel) en una posición dada. | |
| const Pixel & | PixelAt (int x, int y) const |
| Accede a una celda (Pixel) en una posición dada. | |
| int | dimx () const |
| int | dimy () const |
| void | Clear () |
| Borra todos los píxeles de la pantalla. | |
Public Attributes | |
| Box | stencil |
Protected Attributes | |
| int | dimx_ |
| int | dimy_ |
| std::vector< std::vector< Pixel > > | pixels_ |
|
delete |
|
virtualdefault |
| std::string & at | ( | int | x, |
| int | y ) |
| const std::string & at | ( | int | x, |
| int | y ) const |
| Pixel & PixelAt | ( | int | x, |
| int | y ) |
| const Pixel & PixelAt | ( | int | x, |
| int | y ) const |
| struct ftxui::Pixel |
Un carácter Unicode y su estilo asociado.
Public Member Functions | |
| Pixel () | |
Public Attributes | |
| bool | blink: 1 |
| bool | bold: 1 |
| bool | dim: 1 |
| bool | italic: 1 |
| bool | inverted: 1 |
| bool | underlined: 1 |
| bool | underlined_double: 1 |
| bool | strikethrough: 1 |
| bool | automerge: 1 |
| uint8_t | hyperlink = 0 |
| std::string | character = "" |
| Color | background_color = Color::Default |
| Color | foreground_color = Color::Default |
| bool bold |
| bool underlined |
| bool underlined_double |
| Color background_color = Color::Default |
| Color foreground_color = Color::Default |
| class ftxui::Screen |
Una cuadrícula rectangular de píxeles.
Definition at line 26 of file screen.hpp.
Inheritance diagram for Screen:Public Types | |
| using | SelectionStyle = std::function<void(Pixel&)> |
Public Member Functions | |
| Screen (int dimx, int dimy) | |
| ~Screen () override=default | |
| std::string | ToString () const |
| void | Print () const |
| void | Clear () |
| Borra todos los píxeles de la pantalla. | |
| std::string | ResetPosition (bool clear=false) const |
| Devuelve una cadena que se puede imprimir para restablecer la posición del cursor al principio de la pantalla. | |
| void | ApplyShader () |
| Cursor | cursor () const |
| void | SetCursor (Cursor cursor) |
| uint8_t | RegisterHyperlink (const std::string &link) |
| const std::string & | Hyperlink (uint8_t id) const |
| const SelectionStyle & | GetSelectionStyle () const |
| Devuelve el estilo de selección actual. | |
| void | SetSelectionStyle (SelectionStyle decorator) |
| Establece el estilo de selección actual. | |
| std::string & | at (int x, int y) |
| Accede a un caracter en una celda en una posición dada. | |
| const std::string & | at (int x, int y) const |
| Accede a un caracter en una celda en una posición dada. | |
| Pixel & | PixelAt (int x, int y) |
| Accede a una celda (Pixel) en una posición dada. | |
| const Pixel & | PixelAt (int x, int y) const |
| Accede a una celda (Pixel) en una posición dada. | |
| int | dimx () const |
| int | dimy () const |
Static Public Member Functions | |
| static Screen | Create (Dimensions dimension) |
| Crea una pantalla con la dimensión dada. | |
| static Screen | Create (Dimensions width, Dimensions height) |
| Crea una pantalla con la dimensión dada a lo largo de los ejes x e y. | |
Public Attributes | |
| Box | stencil |
Protected Attributes | |
| Cursor | cursor_ |
| std::vector< std::string > | hyperlinks_ = {""} |
| SelectionStyle | selection_style_ |
| int | dimx_ |
| int | dimy_ |
| std::vector< std::vector< Pixel > > | pixels_ |
| using SelectionStyle = std::function<void(Pixel&)> |
Definition at line 74 of file screen.hpp.
| Screen | ( | int | dimx, |
| int | dimy ) |
Definition at line 399 of file screen.cpp.
|
overridedefault |
|
static |
Crea una pantalla con la dimensión dada.
Definition at line 395 of file screen.cpp.
|
static |
Crea una pantalla con la dimensión dada a lo largo de los ejes x e y.
Definition at line 389 of file screen.cpp.
| std::string ToString | ( | ) | const |
Produce una std::string que se puede usar para imprimir la pantalla en la terminal.
Definition at line 416 of file screen.cpp.
| void Print | ( | ) | const |
Definition at line 453 of file screen.cpp.
| void Clear | ( | ) |
Borra todos los píxeles de la pantalla.
Definition at line 495 of file screen.cpp.
| std::string ResetPosition | ( | bool | clear = false | ) | const |
Devuelve una cadena que se puede imprimir para restablecer la posición del cursor al principio de la pantalla.
Definition at line 476 of file screen.cpp.
| void ApplyShader | ( | ) |
Definition at line 507 of file screen.cpp.
|
inline |
Definition at line 66 of file screen.hpp.
|
inline |
Definition at line 67 of file screen.hpp.
| std::uint8_t RegisterHyperlink | ( | const std::string & | link | ) |
Definition at line 534 of file screen.cpp.
| const std::string & Hyperlink | ( | uint8_t | id | ) | const |
Definition at line 547 of file screen.cpp.
| const Screen::SelectionStyle & GetSelectionStyle | ( | ) | const |
Devuelve el estilo de selección actual.
Definition at line 556 of file screen.cpp.
| void SetSelectionStyle | ( | SelectionStyle | decorator | ) |
Establece el estilo de selección actual.
Definition at line 562 of file screen.cpp.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protected |
Definition at line 79 of file screen.hpp.
|
protected |
Definition at line 80 of file screen.hpp.
|
protected |
Definition at line 83 of file screen.hpp.
| struct ftxui::Dimensions |
Dimensions es una estructura que representa el tamaño de la terminal.
Definition at line 11 of file terminal.hpp.
Public Attributes | |
| int | dimx |
| int | dimy |
| int dimx |
Definition at line 12 of file terminal.hpp.
| int dimy |
Definition at line 13 of file terminal.hpp.
| enum Color |
Color es una enumeración que representa el soporte de color de la terminal.
| Enumerator | |
|---|---|
| Palette1 | |
| Palette16 | |
| Palette256 | |
| TrueColor | |
Definition at line 23 of file terminal.hpp.
| Dimensions Size | ( | ) |
Obtiene el tamaño del terminal.
Definition at line 93 of file terminal.cpp.
| Color ColorSupport | ( | ) |
Obtiene el soporte de color del terminal.
Definition at line 129 of file terminal.cpp.