CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iConsoleOutput Struct Reference

This is the Crystal Space Console interface. More...

#include <conout.h>

Inheritance diagram for iConsoleOutput:

iBase List of all members.

Public Methods

virtual void PutText (const char *iText,...)=0
 Put some text to the console. More...

virtual void PutTextV (const char *iText, va_list args)=0
 Var_args version of PutText. More...

virtual const char * GetLine (int iLine=-1) const=0
 Return a line from the buffer (-1 = current line). More...

virtual void Draw2D (csRect *oRect=NULL)=0
 Display the console and return the dirty rectangle. More...

virtual void Draw3D (csRect *oRect=NULL)=0
 Update the 3D part of the console on the window. More...

virtual void Clear (bool iWipe=false)=0
 Clear console. More...

virtual void SetBufferSize (int iMaxLines)=0
 Set the buffer size in lines. More...

virtual bool GetTransparency () const=0
 Retrieve the transparency setting. More...

virtual void SetTransparency (bool iTransp)=0
 Set transparency. More...

virtual iFontGetFont () const=0
 Gets the current font. More...

virtual void SetFont (iFont *Font)=0
 Sets the type of the font. More...

virtual int GetTopLine () const=0
 Get the current top line being displayed. More...

virtual void ScrollTo (int iTopLine, bool iSnap=true)=0
 Set the current top line, or use of the constants above for scrolling. More...

virtual int GetCursorStyle () const=0
 Retrieve the cursor style. More...

virtual void SetCursorStyle (int iStyle)=0
 Assign the cursor style. More...

virtual void SetVisible (bool iShow)=0
 Show/hide the console. More...

virtual bool GetVisible ()=0
 Query whether the console is visible or hidden. More...

virtual void AutoUpdate (bool iAutoUpdate)=0
 Enable or disable automatic console updates. More...

virtual void SetCursorPos (int iCharNo)=0
 Set cursor horizontal position (-1 == follow output). More...

virtual int GetMaxLineWidth ()=0
 Query maximal line width in characters. More...

virtual void RegisterWatcher (iConsoleWatcher *)=0
 Tell console that this object should be notified when console visibility status changes. More...

virtual bool PerformExtension (const char *iCommand,...)=0
 Implement simple extension commands. More...

virtual bool PerformExtensionV (const char *iCommand, va_list)=0
 Implement simple extension commands. More...


Detailed Description

This is the Crystal Space Console interface.

It is an output only system. It can be used in conjunction with the iConsoleInput interface to form an interactive console.

Definition at line 68 of file conout.h.


Member Function Documentation

virtual void iConsoleOutput::AutoUpdate bool    iAutoUpdate [pure virtual]
 

Enable or disable automatic console updates.

When the console is in console auto-update mode, it automatically calls BeginDraw/Console->Draw methods on every PutText call. Otherwise it is your responsability to call Draw() at appropiate times. Initially this mode is enabled.

Note that some implementations of the output consoles may be thread-safe. But in that case you MUST use AutoUpdate(false) because access to graphics is not thread-safe.

virtual void iConsoleOutput::Clear bool    iWipe = false [pure virtual]
 

Clear console.

If wipe = false, it just moves the top line to the current line; if wipe is true, it clears the buffer completely.

virtual void iConsoleOutput::Draw2D csRect   oRect = NULL [pure virtual]
 

Display the console and return the dirty rectangle.

The graphics driver should be in 2D draw mode. Only call this function from the same thread that maintains the graphics subsystem!

virtual void iConsoleOutput::Draw3D csRect   oRect = NULL [pure virtual]
 

Update the 3D part of the console on the window.

The graphics driver should be in 3D draw mode. Only call this function from the same thread that maintains the graphics subsystem!

virtual int iConsoleOutput::GetCursorStyle   const [pure virtual]
 

Retrieve the cursor style.

virtual iFont* iConsoleOutput::GetFont   const [pure virtual]
 

Gets the current font.

virtual const char* iConsoleOutput::GetLine int    iLine = -1 const [pure virtual]
 

Return a line from the buffer (-1 = current line).

virtual int iConsoleOutput::GetMaxLineWidth   [pure virtual]
 

Query maximal line width in characters.

virtual int iConsoleOutput::GetTopLine   const [pure virtual]
 

Get the current top line being displayed.

virtual bool iConsoleOutput::GetTransparency   const [pure virtual]
 

Retrieve the transparency setting.

virtual bool iConsoleOutput::GetVisible   [pure virtual]
 

Query whether the console is visible or hidden.

virtual bool iConsoleOutput::PerformExtension const char *    iCommand,
...   
[pure virtual]
 

Implement simple extension commands.

virtual bool iConsoleOutput::PerformExtensionV const char *    iCommand,
va_list   
[pure virtual]
 

Implement simple extension commands.

virtual void iConsoleOutput::PutText const char *    iText,
...   
[pure virtual]
 

Put some text to the console.

Console acts like a simple TTY and should interpret basical symbols like '
' and '\b'. The '\r' character has a special meaning: it sets a flag that tells console to clear the current line before next character is output. That is, you can emmit non-persistent messages this way: PutText ("some text\r"); This message will disappear as soon as any other message will be sent to console.

virtual void iConsoleOutput::PutTextV const char *    iText,
va_list    args
[pure virtual]
 

Var_args version of PutText.

virtual void iConsoleOutput::RegisterWatcher iConsoleWatcher   [pure virtual]
 

Tell console that this object should be notified when console visibility status changes.

virtual void iConsoleOutput::ScrollTo int    iTopLine,
bool    iSnap = true
[pure virtual]
 

Set the current top line, or use of the constants above for scrolling.

If snap is true, the console returns to the very bottom of the display when a new line is printed.

virtual void iConsoleOutput::SetBufferSize int    iMaxLines [pure virtual]
 

Set the buffer size in lines.

virtual void iConsoleOutput::SetCursorPos int    iCharNo [pure virtual]
 

Set cursor horizontal position (-1 == follow output).

virtual void iConsoleOutput::SetCursorStyle int    iStyle [pure virtual]
 

Assign the cursor style.

virtual void iConsoleOutput::SetFont iFont   Font [pure virtual]
 

Sets the type of the font.

virtual void iConsoleOutput::SetTransparency bool    iTransp [pure virtual]
 

Set transparency.

virtual void iConsoleOutput::SetVisible bool    iShow [pure virtual]
 

Show/hide the console.

In 'hidden' state console should not display anything at all (when Draw() is called) or draw some minimal information


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14