#include <TextConsole.h>
Inheritance diagram for GNE::Console::TextConsole:
Public Member Functions | |
TextConsole (int xoffset, int yoffset, int width, int height) | |
virtual void | erase () |
Tells the renderer for this ConsoleBuffer to completely erase the display. | |
Protected Member Functions | |
virtual void | render (int x, int y, std::string text, int renderHints) |
Asks the renderer to render the data at the specified location. |
The console needs a rectangle on the screen for which it can have exclusive access. Other threads may use located versions of text output (like Console::mlprintf) outside of the specified window area. The window provides word wrapping and software-based scrolling.
|
Tells the renderer for this ConsoleBuffer to completely erase the display. This is different from clear in the fact that erase will "hide" the console. The behavior of calling update, or adding text during auto render mode, before calling redraw or clear is defined by the renderer, but in general if you want to use the console again, you should call either clear or redraw before inserting text. Implements GNE::ConsoleBuffer. |
|
Asks the renderer to render the data at the specified location. There will not be newline characters in the text string. The renderHints parameter contains hints for the renderer. At this time the only hint is ConsoleBuffer::REDRAW_HINT, which is set when redrawing to a location. The renderHints field is a bitmask, so use the bitwise and operator to check for hints. Implements GNE::ConsoleBuffer. |