FTXUI
5.0.0
C++ functional terminal UI.
|
A rectangular grid of Pixel. More...
Data Structures | |
struct | Cursor |
Public Member Functions | |
Screen (int dimx, int dimy) | |
std::string & | at (int x, int y) |
Access a character in a cell at a given position. More... | |
const std::string & | at (int x, int y) const |
Access a character in a cell at a given position. More... | |
Pixel & | PixelAt (int x, int y) |
Access a cell (Pixel) at a given position. More... | |
const Pixel & | PixelAt (int x, int y) const |
Access a cell (Pixel) at a given position. More... | |
std::string | ToString () const |
void | Print () const |
int | dimx () const |
int | dimy () const |
std::string | ResetPosition (bool clear=false) const |
Return a string to be printed in order to reset the cursor position to the beginning of the screen. More... | |
void | Clear () |
Clear all the pixel from the screen. More... | |
void | ApplyShader () |
Cursor | cursor () const |
void | SetCursor (Cursor cursor) |
uint8_t | RegisterHyperlink (const std::string &link) |
const std::string & | Hyperlink (uint8_t id) const |
Static Public Member Functions | |
static Screen | Create (Dimensions dimension) |
Create a screen with the given dimension. More... | |
static Screen | Create (Dimensions width, Dimensions height) |
Create a screen with the given dimension along the x-axis and y-axis. More... | |
Data Fields | |
Box | stencil |
Protected Attributes | |
int | dimx_ |
int | dimy_ |
std::vector< std::vector< Pixel > > | pixels_ |
Cursor | cursor_ |
std::vector< std::string > | hyperlinks_ = {""} |
A rectangular grid of Pixel.
Definition at line 63 of file screen.hpp.
Screen | ( | int | dimx, |
int | dimy | ||
) |
Definition at line 395 of file screen.cpp.
|
static |
Create a screen with the given dimension.
Definition at line 391 of file screen.cpp.
|
static |
Create a screen with the given dimension along the x-axis and y-axis.
Definition at line 385 of file screen.cpp.
std::string & at | ( | int | x, |
int | y | ||
) |
Access a character in a cell at a given position.
x | The cell position along the x-axis. |
y | The cell position along the y-axis. |
Definition at line 456 of file screen.cpp.
const std::string & at | ( | int | x, |
int | y | ||
) | const |
Access a character in a cell at a given position.
x | The cell position along the x-axis. |
y | The cell position along the y-axis. |
Definition at line 463 of file screen.cpp.
Pixel & PixelAt | ( | int | x, |
int | y | ||
) |
Access a cell (Pixel) at a given position.
x | The cell position along the x-axis. |
y | The cell position along the y-axis. |
Definition at line 470 of file screen.cpp.
const Pixel & PixelAt | ( | int | x, |
int | y | ||
) | const |
Access a cell (Pixel) at a given position.
x | The cell position along the x-axis. |
y | The cell position along the y-axis. |
Definition at line 477 of file screen.cpp.
std::string ToString | ( | ) | const |
Produce a std::string that can be used to print the Screen on the terminal.
Definition at line 416 of file screen.cpp.
void Print | ( | ) | const |
Definition at line 449 of file screen.cpp.
|
inline |
Definition at line 84 of file screen.hpp.
|
inline |
Definition at line 85 of file screen.hpp.
std::string ResetPosition | ( | bool | clear = false | ) | const |
Return a string to be printed in order to reset the cursor position to the beginning of the screen.
Definition at line 500 of file screen.cpp.
void Clear | ( | ) |
Clear all the pixel from the screen.
Definition at line 519 of file screen.cpp.
void ApplyShader | ( | ) |
Definition at line 534 of file screen.cpp.
|
inline |
Definition at line 110 of file screen.hpp.
|
inline |
Definition at line 111 of file screen.hpp.
uint8_t RegisterHyperlink | ( | const std::string & | link | ) |
Definition at line 561 of file screen.cpp.
const std::string & Hyperlink | ( | uint8_t | id | ) | const |
Definition at line 574 of file screen.cpp.
Box stencil |
Definition at line 118 of file screen.hpp.
|
protected |
Definition at line 121 of file screen.hpp.
|
protected |
Definition at line 122 of file screen.hpp.
|
protected |
Definition at line 123 of file screen.hpp.
|
protected |
Definition at line 124 of file screen.hpp.
|
protected |
Definition at line 125 of file screen.hpp.