Public Member Functions

FIFE::Console Class Reference

#include <console.h>

Collaboration diagram for FIFE::Console:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Console ()
virtual ~Console ()
void println (const std::string &s)
void show ()
void hide ()
void clear ()
void toggleShowHide ()
void execute (std::string cmd)
void updateCaption ()
void updateAnimation ()
void action (const gcn::ActionEvent &event)
void setConsoleExecuter (ConsoleExecuter *const consoleexec)
void removeConsoleExecuter ()
void reLayout ()
void setIOFont (GuiFont *font)
void focusLost (const gcn::Event &event)

Detailed Description

Ingame Console

Definition at line 64 of file console.h.


Constructor & Destructor Documentation

FIFE::Console::Console (  ) 
FIFE::Console::~Console (  )  [virtual]

Destructor

Definition at line 147 of file console.cpp.


Member Function Documentation

void FIFE::Console::action ( const gcn::ActionEvent &  event  ) 

Callback from guichan to respond to button press

Definition at line 283 of file console.cpp.

References FIFE::ConsoleExecuter::onToolsClick().

void FIFE::Console::clear (  ) 

Clear the console output

Definition at line 184 of file console.cpp.

void FIFE::Console::execute ( std::string  cmd  ) 

Execute a command Normally just sends the command to runString() Checks whether the cmd is just one token and print it's value rather than throw an useless error.

Todo:
generalize the generated command and the regexp used.

Definition at line 230 of file console.cpp.

References FIFE::Exception::getMessage(), FIFE::ConsoleExecuter::onConsoleCommand(), and println().

Referenced by Console().

Here is the caller graph for this function:

void FIFE::Console::focusLost ( const gcn::Event &  event  ) 

Hide if we loose focus

Definition at line 304 of file console.cpp.

References hide().

void FIFE::Console::hide (  ) 

Hide the console Removes itself from the toplevel container and pops it's input context

Definition at line 216 of file console.cpp.

Referenced by focusLost().

Here is the caller graph for this function:

void FIFE::Console::println ( const std::string &  s  ) 

Print one or more lines to the console output

Definition at line 253 of file console.cpp.

Referenced by execute().

Here is the caller graph for this function:

void FIFE::Console::reLayout (  ) 

Layouts the console to match e.g. font changes

Definition at line 89 of file console.cpp.

Referenced by Console().

Here is the caller graph for this function:

void FIFE::Console::removeConsoleExecuter (  ) 

Removes executer for the console

Definition at line 295 of file console.cpp.

void FIFE::Console::setConsoleExecuter ( ConsoleExecuter *const   consoleexec  ) 

Sets executer for the console

Definition at line 291 of file console.cpp.

void FIFE::Console::setIOFont ( GuiFont *  font  ) 

Sets the font used for the input and output areas

Definition at line 299 of file console.cpp.

Referenced by Console().

Here is the caller graph for this function:

void FIFE::Console::show (  ) 

Show the console Adds the Console to the guichan toplevel container and pushes an input Context so that keys are not send to the rest of the game.

Definition at line 208 of file console.cpp.

void FIFE::Console::toggleShowHide (  ) 

Toggle the console Toggles whether the Console is shown or not. Calls show() or hide() respectively.

Definition at line 223 of file console.cpp.

void FIFE::Console::updateAnimation (  ) 

Update the scroll in/out animation.

Note:
Is a timer callback.

Definition at line 168 of file console.cpp.

Referenced by Console().

Here is the caller graph for this function:

void FIFE::Console::updateCaption (  ) 

Update the FPS caption

Note:
Is a timer callback.

Definition at line 161 of file console.cpp.

Referenced by Console().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: