Represents the abstract notion of a character-addressable writable screen.
More...
#include <screen.h>
Represents the abstract notion of a character-addressable writable screen.
Definition at line 4 of file screen.h.
◆ Screen()
Screen::Screen |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
explicit |
- Parameters
-
width | width in columns |
height | height in rows |
- Exceptions
-
std::out_of_range | if width or height is negative |
Definition at line 5 of file screen.cpp.
◆ charAtPut()
virtual void Screen::charAtPut |
( |
int |
col, |
|
|
int |
row, |
|
|
char |
value |
|
) |
| |
|
pure virtual |
Abstract function that subclasses should override. May not cause the screen to update immediately.
- Parameters
-
col | 0-based column (x) index |
row | 0-based row (y) index |
value | the character to write |
- Exceptions
-
std::out_of_range | if the row or column is out of bounds (negative or too large) |
Implemented in StringScreen.
◆ checkCoordinates()
void Screen::checkCoordinates |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
protected |
◆ clear()
virtual void Screen::clear |
( |
| ) |
|
|
pure virtual |
Abstract function that subclasses should override. May not cause the screen to update immediately.
Implemented in StringScreen.
◆ height()
int Screen::height |
( |
| ) |
const |
- Returns
- the height in rows
Definition at line 33 of file screen.cpp.
◆ width()
int Screen::width |
( |
| ) |
const |
- Returns
- the width in columns
Definition at line 31 of file screen.cpp.
◆ height_
◆ width_
The documentation for this class was generated from the following files: