#include <console.h>

Public Types | |
| enum | ColourTypes { , FG_GREEN = 0x0002, FG_RED = 0x0004, FG_INTENSITY = 0x0008, BG_BLUE = 0x0010, BG_GREEN = 0x0020, BG_RED = 0x0040, BG_INTENSITY = 0x0080 } |
| Flags used for describing console colour output. More... | |
Public Member Functions | |
| Console (bool _clearOnInit=false, bool _fillScreen=false) | |
| The default constructor. | |
| Console (FILE *_outputBuffer, FILE *_inputBuffer) | |
| The alternate constructor. | |
| ~Console () | |
| The destructor. | |
| void | SetColour () |
| Sets the console output colour to the default. | |
| void | SetColour (int _flags) |
| Sets the console output colour. | |
| void | SetTitle (const char *_title) |
| Sets the title of the terminal window. | |
| void | SetTitle (std::string &_title) |
| Sets the title of the terminal window. | |
| void | Clear () |
| Clears the console. | |
| void | MoveUp (int _lines) |
| Move the cursor up a given number of lines. | |
| void | Flush () |
| Flushes the input and output buffers. | |
Private Member Functions | |
| bool | EndOfFile () |
| Determines whether the end of the file has been reached. | |
| int | Forward (cc_int64_t _position) |
| Moves forward to a location in the buffer. | |
| int | Seek (cc_int64_t _position) |
| Seeks to a location in the buffer. | |
| cc_int64_t | Length () |
| Determines the length of the file buffer. | |
| int | Read (char *_buffer, size_t _bufferLength, size_t _bufferIndex, size_t _count) |
| Reads a block of data from the file buffer. | |
| enum ColourTypes |
Flags used for describing console colour output.
| Console | ( | bool | _clearOnInit = false, |
|
| bool | _fillScreen = false | |||
| ) |
The default constructor.
Allocates a new console for stdout and stderr output.
| _clearOnInit | If true, clears the output console if supported. | |
| _fillScreen | This moves the console window to the extreme left and switches to the maximum possible window height. |
| Console | ( | FILE * | _outputBuffer, | |
| FILE * | _inputBuffer | |||
| ) |
| void Clear | ( | ) |
Clears the console.
Clears the console output (similar to commands 'cls' on Windows and 'clear' on Linux).
| bool EndOfFile | ( | ) | [private, virtual] |
Determines whether the end of the file has been reached.
Reimplemented from CoreIOReader.
| int Forward | ( | cc_int64_t | _position | ) | [private, virtual] |
Moves forward to a location in the buffer.
| _position | Position to seek to, relative to the current position in the buffer. |
Reimplemented from CoreIOReader.
| cc_int64_t Length | ( | ) | [private, virtual] |
Determines the length of the file buffer.
Reimplemented from CoreIOReader.
| void MoveUp | ( | int | _lines | ) |
Move the cursor up a given number of lines.
Permits you to overwrite previous lines. Good for a status display.
| _lines | Number of lines to move the cursor |
| int Read | ( | char * | _buffer, | |
| size_t | _bufferLength, | |||
| size_t | _bufferIndex, | |||
| size_t | _count | |||
| ) | [private, virtual] |
Reads a block of data from the file buffer.
| _buffer | The output buffer to read to. | |
| _bufferLength | The size of _buffer (in bytes). | |
| _bufferIndex | The position in _buffer to begin writing. | |
| _count | The number of bytes to read. |
Reimplemented from CoreIOReader.
| int Seek | ( | cc_int64_t | _position | ) | [private, virtual] |
Seeks to a location in the buffer.
| _position | Position to seek to, relative to the first byte of the buffer. |
Reimplemented from CoreIOReader.
| void SetColour | ( | int | _flags | ) |
Sets the console output colour.
Sets the console output colour using the flags specified in _flags.
| _flags | A bitmask created by OR-ing Console::ColourTypes flags. |
| void SetTitle | ( | std::string & | _title | ) |
Sets the title of the terminal window.
Sets the console window title using the value in the _title parameter.
| _title | The title requested for the console window. |
| void SetTitle | ( | const char * | _title | ) |
Sets the title of the terminal window.
Sets the console window title using the value in the _title parameter.
| _title | The title requested for the console window. |
1.5.8