|
DUDS
|
Distributed Update of Data from Something
|
The base class for output streams that write to TextDisplay objects. More...
#include <TextDisplayStream.hpp>
Public Member Functions | |
| TextDisplayBaseStream (TextDisplayBasicStreambuf< Char, Traits > *tbuf) | |
| Makes an output stream that writes to the given display. More... | |
| void | clearDisplay () |
| Remove all text from the display and place the cursor in the upper left corner. More... | |
| void | clearTo (unsigned int c, unsigned int r) |
| Clear text from the current cursor position to the given position, inclusive. More... | |
| const std::shared_ptr< TextDisplay > & | display () const |
| Returns the output display. More... | |
| void | moveCursor (unsigned int c, unsigned int r) |
| Moves the display's cursor to the given location. More... | |
| void | startLine () |
| Moves the cursor to the start of a line clearing text along the way. More... | |
Static Public Member Functions | |
| static int | xallocIndex () |
| Returns the index from xalloc(); needed by the stream manipulators. More... | |
Private Types | |
| using | base = std::basic_ostream< Char, Traits > |
Private Attributes | |
| TextDisplayBasicStreambuf< Char, Traits > * | tdbb |
| The buffer handling the output. More... | |
Static Private Attributes | |
| static const int | xidx = std::ios_base::xalloc() |
| The value from xalloc() used for stream manipulators to identify this stream type. More... | |
The base class for output streams that write to TextDisplay objects.
The stream manipulators made for text displays all work with this class so there isn't a need for multiple sets of the stream manipulators, and the manipulators do not need a run-time check for multiple stream types. This class can be used directly, but it is easier to use one of the derived classes.
Definition at line 424 of file TextDisplayStream.hpp.
|
private |
Definition at line 425 of file TextDisplayStream.hpp.
|
inline |
Makes an output stream that writes to the given display.
| tbuf | The stream buffer that will handle output to the display. |
Definition at line 441 of file TextDisplayStream.hpp.
|
inline |
Remove all text from the display and place the cursor in the upper left corner.
Definition at line 472 of file TextDisplayStream.hpp.
|
inline |
Clear text from the current cursor position to the given position, inclusive.
The cursor will be moved to the spot immediately after the given position.
| c | The end column. |
| r | The end row. |
| TextDisplayRangeError | The requested position is beyond the display's boundries. |
Definition at line 484 of file TextDisplayStream.hpp.
|
inline |
Returns the output display.
Definition at line 455 of file TextDisplayStream.hpp.
|
inline |
Moves the display's cursor to the given location.
| c | The destination column. |
| r | The destination row. |
| TextDisplayRangeError | The requested position is beyond the display's boundries. |
Definition at line 465 of file TextDisplayStream.hpp.
|
inline |
Moves the cursor to the start of a line clearing text along the way.
If the cursor is already at the start of a line, it will not move and no text will be cleared.
Definition at line 492 of file TextDisplayStream.hpp.
|
inlinestatic |
Returns the index from xalloc(); needed by the stream manipulators.
Definition at line 449 of file TextDisplayStream.hpp.
|
private |
The buffer handling the output.
Definition at line 429 of file TextDisplayStream.hpp.
|
staticprivate |
The value from xalloc() used for stream manipulators to identify this stream type.
Needed for each template instantiation.
Definition at line 434 of file TextDisplayStream.hpp.