14 namespace duds {
namespace hardware {
namespace display {
17 columnsize(-1), rowsize(-1), cpos(-1), rpos(-1) { }
63 std::string::const_iterator iter = text.begin();
66 }
while (++iter != text.end());
78 const std::string &text,
88 const std::string &text,
114 while ((
cpos != c) || (
rpos != r)) {
boost::error_info< struct Info_DisplayPosition, Info_DisplayColRow > TextDisplayPositionInfo
Column and row of a display position as part of an error.
The specified location is beyond the bounds of the display.
void move(unsigned int c, unsigned int r)
Moves the cursor to the given location.
std::uint8_t cpos
Cursor column position.
Stores column and row data for display errors.
virtual void writeImpl(int c)=0
Writes a single character onto the display at the current cursor location.
std::uint8_t columnsize
Number of columns on the display.
std::uint8_t rowsize
Number of rows on the display.
std::uint8_t rpos
Cursor row position.
virtual ~TextDisplay()=0
Allows destruction of a pointer of this base class to properly destruct the derived object...
TextDisplay()
Initializes the object with an invalid display size and cursor position.
virtual void moveImpl(unsigned int c, unsigned int r)=0
Moves the display's cursor to the indicated position.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
void clearTo(unsigned int c, unsigned int r)
Clear text from the current cursor position to the given position, inclusive.
void write(int c)
Writes a single character onto the display at the current cursor location and advances the cursor...
virtual bool advance()
Advances the column position, and if it goes off the visible portion of the display, updates the row position.
boost::error_info< struct Info_DisplaySize, Info_DisplayColRow > TextDisplaySizeInfo
Column and row size of a display as part of an error.