|
FTXUI
6.1.9
C++ functional terminal UI.
|
A rectangular grid of Pixel. More...
Data Structures | |
| struct | Cursor |
Public Types | |
| using | SelectionStyle = std::function<void(Pixel&)> |
Public Member Functions | |
| Screen (int dimx, int dimy) | |
| std::string | ToString () const |
| void | Print () const |
| void | Clear () |
| Clear all the pixel from the screen. | |
| 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. | |
| 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 |
| Return the current selection style. | |
| void | SetSelectionStyle (SelectionStyle decorator) |
| Set the current selection style. | |
| std::string & | at (int x, int y) |
| Access a character in a cell at a given position. | |
| const std::string & | at (int x, int y) const |
| Access a character in a cell at a given position. | |
| Pixel & | PixelAt (int x, int y) |
| Access a cell (Pixel) at a given position. | |
| const Pixel & | PixelAt (int x, int y) const |
| Access a cell (Pixel) at a given position. | |
| int | dimx () const |
| int | dimy () const |
Static Public Member Functions | |
| static Screen | Create (Dimensions dimension) |
| Create a screen with the given dimension. | |
| static Screen | Create (Dimensions width, Dimensions height) |
| Create a screen with the given dimension along the x-axis and y-axis. | |
Data Fields | |
| Box | stencil |
Protected Attributes | |
| Cursor | cursor_ |
| std::vector< std::string > | hyperlinks_ = {""} |
| SelectionStyle | selection_style_ |
| int | dimx_ |
| int | dimy_ |
| std::vector< std::vector< Pixel > > | pixels_ |
A rectangular grid of Pixel.
Definition at line 27 of file screen.hpp.
| using SelectionStyle = std::function<void(Pixel&)> |
Definition at line 72 of file screen.hpp.
| Screen | ( | int | dimx, |
| int | dimy ) |
Definition at line 398 of file screen.cpp.
|
static |
Create a screen with the given dimension.
Definition at line 394 of file screen.cpp.
|
static |
Create a screen with the given dimension along the x-axis and y-axis.
Definition at line 388 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 415 of file screen.cpp.
| void Print | ( | ) | const |
Definition at line 452 of file screen.cpp.
| void Clear | ( | ) |
Clear all the pixel from the screen.
Definition at line 494 of file screen.cpp.
| 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 475 of file screen.cpp.
| void ApplyShader | ( | ) |
Definition at line 506 of file screen.cpp.
|
inline |
Definition at line 64 of file screen.hpp.
|
inline |
Definition at line 65 of file screen.hpp.
| std::uint8_t RegisterHyperlink | ( | const std::string & | link | ) |
Definition at line 533 of file screen.cpp.
| const std::string & Hyperlink | ( | uint8_t | id | ) | const |
Definition at line 546 of file screen.cpp.
| const Screen::SelectionStyle & GetSelectionStyle | ( | ) | const |
Return the current selection style.
Definition at line 555 of file screen.cpp.
| void SetSelectionStyle | ( | SelectionStyle | decorator | ) |
Set the current selection style.
Definition at line 561 of file screen.cpp.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protected |
Definition at line 77 of file screen.hpp.
|
protected |
Definition at line 78 of file screen.hpp.
|
protected |
Definition at line 81 of file screen.hpp.
|
protectedinherited |