#include <wit/console.h>
Public Member Functions | |
| ~Console () | |
| int | rows () const |
| int | columns () const |
| void | setCursorPosition (int x, int y) |
| void | setCursorX (int x) |
| void | setCursorY (int y) |
| int | cursorX () const |
| int | cursorY () const |
| void | enableGecko (int channel, bool safe) |
| void | disableGecko () |
Static Public Member Functions | |
| static void | write (const char *text) |
| static void | clear () |
The Console class provides access to the text console and, if a USBGecko is installed, the debugging console.
Console is not intended to be subclassed or instantiated by user code. The only way to access the console is by using wit::Application::console().
All console functions are safe to invoke even if the console is disabled; they will simply do nothing.
Note: Output on the text console is not persistent. Enabling wit::UseGX or wit::UseDoubleBuffer will cause output to the text console to be overwritten after each frame.
Definition at line 7 of file console.h.
| wit::Console::~Console | ( | ) |
Destroys the console handler.
User code should not delete the Console object.
Definition at line 45 of file console.cpp.
| void wit::Console::clear | ( | ) | [static] |
Clears the screen.
Note that this clears the framebuffer, not just the console.
Definition at line 171 of file console.cpp.
| int wit::Console::columns | ( | ) | const |
Returns the number of text columns available on the console.
Definition at line 70 of file console.cpp.
| int wit::Console::cursorX | ( | ) | const |
Returns the current horizontal position of the cursor.
Definition at line 113 of file console.cpp.
| int wit::Console::cursorY | ( | ) | const |
Returns the current vertical position of the cursor.
Definition at line 125 of file console.cpp.
| void wit::Console::disableGecko | ( | ) |
Disables the USBGecko debugging console.
Definition at line 149 of file console.cpp.
| void wit::Console::enableGecko | ( | int | channel, |
| bool | safe | ||
| ) |
Enables the debugging console on a USBGecko.
TODO: Figure out what the parameters are for
Definition at line 139 of file console.cpp.
| int wit::Console::rows | ( | ) | const |
Returns the number of text rows available on the console.
Definition at line 58 of file console.cpp.
| void wit::Console::setCursorPosition | ( | int | x, |
| int | y | ||
| ) |
Positions the text cursor on the screen. The next call to wit::Console::write() will begin at this position.
Definition at line 83 of file console.cpp.
| void wit::Console::setCursorX | ( | int | x ) |
Positions the text cursor at the specified column, leaving the row unchanged. The next call to wit::Console::write() will begin at this position.
Definition at line 95 of file console.cpp.
| void wit::Console::setCursorY | ( | int | y ) |
Positions the text cursor at the specified row, leaving the column unchanged. The next call to wit::Console::write() will begin at this position.
Definition at line 105 of file console.cpp.
| void wit::Console::write | ( | const char * | text ) | [static] |
Writes a string to the text console at the current cursor position.
Definition at line 159 of file console.cpp.
1.7.2