Write class creates an abstraction for controlling how the terminal will print to the screen.
More...
#include <write.h>
|
| struct | TerminalSize |
| | Terminal size structure defines a simple interface for defining a width and a height integer. More...
|
| |
|
| static std::string | c (const Colors &color) |
| | c method returns a color associated with enum
|
| |
| static void | clearSection (int x, int y, int width, int height) |
| | clearSection erases specified section of the terminal by replacing them with empty strings
|
| |
| static void | printInSection (int x, int y, std::string text) |
| | printInSection takes a section of the terminal and prints the specified string in the section
|
| |
| static void | clearAllConsole () |
| | clearAllConsole method clears the entire console erasing all characters on the console screen
|
| |
|
| static TerminalSize | myTerminalSize |
| | myTerminalSize is a public variable to use throughout the application to easily query the terminal dimensions the user is currently working with
|
| |
Write class creates an abstraction for controlling how the terminal will print to the screen.
◆ Colors
Colors integer enum creates an easy interface for defining colors to use in the console when printing.
| Enumerator |
|---|
| YELLOW | |
| RED | |
| BLUE | |
| BLACK | |
| PURPLE | |
| CYAN | |
| WHITE | |
| ENDCOLOR | |
◆ Write()
◆ c()
| std::string Write::c |
( |
const Colors & | color | ) |
|
|
static |
c method returns a color associated with enum
- See also
- Colors
- Parameters
-
- See also
- Colors
◆ clearAllConsole()
| void Write::clearAllConsole |
( |
| ) |
|
|
static |
clearAllConsole method clears the entire console erasing all characters on the console screen
◆ clearSection()
| void Write::clearSection |
( |
int | x, |
|
|
int | y, |
|
|
int | width, |
|
|
int | height ) |
|
static |
clearSection erases specified section of the terminal by replacing them with empty strings
- Parameters
-
| x | Integer indicating where to start the cursor in column |
| y | Integer indicating where to start the cursor in row |
| width | Integer indicating the amount of columns the cursor should travel to erase |
| height | Integer indicating the amount of rows the cursor should travel to erase |
◆ printInSection()
| void Write::printInSection |
( |
int | x, |
|
|
int | y, |
|
|
std::string | text ) |
|
static |
printInSection takes a section of the terminal and prints the specified string in the section
- Parameters
-
| x | Integer indicating where to start the cursor in column |
| y | Integer indicating where to start the cursor in row |
| text | String that should be printed |
◆ myTerminalSize
Initial value:
myTerminalSize is a public variable to use throughout the application to easily query the terminal dimensions the user is currently working with
The documentation for this class was generated from the following files: