Main Page   Modules   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

GNE::Console::TextConsole Class Reference
[Console API]

#include <TextConsole.h>

Inheritance diagram for GNE::Console::TextConsole:

GNE::ConsoleBuffer GNE::SynchronizedObject List of all members.

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.


Detailed Description

Provides a text-based window view of a buffer of text, similar to a textbox object in a GUI. This allows one to provide a text-based console which would be useful in a dedicated server running in a console, or in a UNIX prompt environment.

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.


Member Function Documentation

void GNE::Console::TextConsole::erase  )  [virtual]
 

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.

void GNE::Console::TextConsole::render int  x,
int  y,
std::string  text,
int  renderHints
[protected, virtual]
 

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.


The documentation for this class was generated from the following files:
Generated on Fri Aug 22 13:40:07 2003 for GNE by doxygen1.3