console Class Reference

This class handle all the suff of the console. More...

#include <console.h>

Inheritance diagram for console:
base

List of all members.

Public Member Functions

 console ()
 Constructor.
 ~console ()
 Destructor.
int init (coeur *, IGUIEnvironment *)
 Init the console.
int update ()
 Updating (must be call on each loop).
int close ()
 Close the console.
bool OnEvent (const SEvent &)
 Call when an event occured.
void write (std::string const &)
 Write some text on the console.
void position ()
 Display the position of the camera.
void rotation ()
 Display the rotation of the camera.
void target ()
 Display the position of the target of the camera.
void exit ()
void quit ()
 Quit the game.
void help ()
 Display an helping text.
void fps ()
 Display the actual fps.

Private Attributes

IrrlichtDevice * device
 The Irrlicht Device.
IGUIEnvironment * env
 The Irrlicht Envirronement.
stringw * text
 Contain the text display by the console.
IGUIImage * cons
 Just use to contain all the item of the console.
IGUIEditBox * tx
 Box where are displayed the text of the console.
IGUIEditBox * box
 Box where you type the command to launch to the console.
IGUIStaticText * FPS
 Box who displayed the fps.
std::vector< stringw > * history
 Contain the history of the command enter.
unsigned int histPos
 Contain the position in the history.

Detailed Description

This class handle all the suff of the console.

Definition at line 27 of file console.h.


Constructor & Destructor Documentation

console::console (  ) 

Constructor.

/todo Hide the fps when hide the console(or not)

Definition at line 9 of file console.cpp.

References history, histPos, and text.

console::~console (  ) 

Destructor.

Definition at line 17 of file console.cpp.


Member Function Documentation

int console::close (  )  [virtual]

Close the console.

Reimplemented from base.

Definition at line 84 of file console.cpp.

References pyInt::exec(), base::mycore, and coeur::py.

Referenced by coeur::close().

void console::exit (  ) 

Close the console /todo Change the name of this function because it exit as much as it lake visible

Definition at line 155 of file console.cpp.

References cons, and base::log().

Referenced by BOOST_PYTHON_MODULE(), and OnEvent().

void console::fps (  ) 

Display the actual fps.

Definition at line 194 of file console.cpp.

References env, base::log(), and write().

Referenced by BOOST_PYTHON_MODULE().

void console::help (  ) 

Display an helping text.

Definition at line 176 of file console.cpp.

References coeur::getVersion(), base::log(), base::mycore, and write().

Referenced by BOOST_PYTHON_MODULE().

int console::init ( coeur c,
IGUIEnvironment *  e 
)
bool console::OnEvent ( const SEvent &  event  ) 

Call when an event occured.

Definition at line 92 of file console.cpp.

References box, cons, pyInt::eval(), exit(), history, histPos, base::log(), base::mycore, coeur::py, and write().

Referenced by coeur::OnEvent().

void console::position (  ) 

Display the position of the camera.

Definition at line 137 of file console.cpp.

References coeur::cam, base::log(), base::mycore, and write().

Referenced by BOOST_PYTHON_MODULE().

void console::quit (  ) 

Quit the game.

Definition at line 169 of file console.cpp.

References base::log(), base::mycore, coeur::q, and write().

Referenced by BOOST_PYTHON_MODULE().

void console::rotation (  ) 

Display the rotation of the camera.

Definition at line 143 of file console.cpp.

References coeur::cam, base::log(), base::mycore, and write().

Referenced by BOOST_PYTHON_MODULE().

void console::target (  ) 

Display the position of the target of the camera.

Definition at line 149 of file console.cpp.

References coeur::cam, base::log(), base::mycore, and write().

Referenced by BOOST_PYTHON_MODULE().

int console::update (  )  [virtual]

Updating (must be call on each loop).

Reimplemented from base.

Definition at line 72 of file console.cpp.

References box, cons, env, and FPS.

Referenced by coeur::update().

void console::write ( std::string const &  message  ) 

Write some text on the console.

This method log a text to the console, used by python to replace stdout

Parameters:
message Text to log
Returns:
Nothing

Definition at line 130 of file console.cpp.

References text, and tx.

Referenced by BOOST_PYTHON_MODULE(), fps(), help(), OnEvent(), position(), quit(), rotation(), and target().


Member Data Documentation

IGUIEditBox* console::box [private]

Box where you type the command to launch to the console.

Definition at line 90 of file console.h.

Referenced by init(), OnEvent(), and update().

IGUIImage* console::cons [private]

Just use to contain all the item of the console.

Definition at line 84 of file console.h.

Referenced by exit(), init(), OnEvent(), and update().

IrrlichtDevice* console::device [private]

The Irrlicht Device.

Definition at line 75 of file console.h.

IGUIEnvironment* console::env [private]

The Irrlicht Envirronement.

Definition at line 78 of file console.h.

Referenced by fps(), init(), and update().

IGUIStaticText* console::FPS [private]

Box who displayed the fps.

Definition at line 93 of file console.h.

Referenced by init(), and update().

std::vector<stringw>* console::history [private]

Contain the history of the command enter.

Definition at line 96 of file console.h.

Referenced by console(), and OnEvent().

unsigned int console::histPos [private]

Contain the position in the history.

Definition at line 99 of file console.h.

Referenced by console(), and OnEvent().

stringw* console::text [private]

Contain the text display by the console.

Definition at line 81 of file console.h.

Referenced by console(), and write().

IGUIEditBox* console::tx [private]

Box where are displayed the text of the console.

Definition at line 87 of file console.h.

Referenced by init(), and write().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends

Generated on Wed Sep 9 18:20:15 2009 for The Merry Turnip by  doxygen 1.6.1