CrystalSpace

Public API Reference

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

iConsoleInput Struct Reference

This is a plugin that can handle keyboard input and display it on an associated console. More...

#include <conin.h>

Inheritance diagram for iConsoleInput:

iBase List of all members.

Public Methods

virtual void Bind (iConsoleOutput *)=0
 Bind to a console. More...

virtual void SetExecuteCallback (iConsoleExecCallback *iCallback)=0
 Set the command execution callback. More...

virtual iConsoleExecCallbackGetExecuteCallback ()=0
 Get the command execution callback. More...

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

virtual int GetCurLine () const=0
 Return the current input line number. More...

virtual int GetBufferSize () const=0
 Retrieve the size of the history buffer. More...

virtual void SetBufferSize (int iSize)=0
 Set the size of the history buffer. More...

virtual void Clear ()=0
 Clear the history buffer. More...

virtual void SetPrompt (const char *iPrompt)=0
 Set the prompt string. More...

virtual bool HandleEvent (iEvent &)=0
 Handle a console-related event. More...


Detailed Description

This is a plugin that can handle keyboard input and display it on an associated console.

The plugin has a command history and when user presses 'Enter' can call some callback function to execute the entered command.

WARNING Do NOT use the event handler that may (or may not) be implemented by the console and register that to the event queue. This doesn't work properly. Instead register your own event handler and call HandleEvent() from that.

Definition at line 53 of file conin.h.


Member Function Documentation

virtual void iConsoleInput::Bind iConsoleOutput   [pure virtual]
 

Bind to a console.

virtual void iConsoleInput::Clear   [pure virtual]
 

Clear the history buffer.

virtual int iConsoleInput::GetBufferSize   const [pure virtual]
 

Retrieve the size of the history buffer.

virtual int iConsoleInput::GetCurLine   const [pure virtual]
 

Return the current input line number.

virtual iConsoleExecCallback* iConsoleInput::GetExecuteCallback   [pure virtual]
 

Get the command execution callback.

virtual const char* iConsoleInput::GetText int    iLine = -1 const [pure virtual]
 

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

virtual bool iConsoleInput::HandleEvent iEvent   [pure virtual]
 

Handle a console-related event.

Do NOT use the event handler that may (or may not) be implemented by the console and register that to the event queue. This doesn't work properly. Instead register your own event handler and call HandleEvent() from that.

virtual void iConsoleInput::SetBufferSize int    iSize [pure virtual]
 

Set the size of the history buffer.

virtual void iConsoleInput::SetExecuteCallback iConsoleExecCallback   iCallback [pure virtual]
 

Set the command execution callback.

virtual void iConsoleInput::SetPrompt const char *    iPrompt [pure virtual]
 

Set the prompt string.


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