orxonox::InGameConsole Class Reference

#include <src/orxonox/overlays/console/InGameConsole.h>

Inheritance diagram for orxonox::InGameConsole:

orxonox::ShellListener orxonox::WindowEventListener orxonox::OrxonoxClass

List of all members.

Public Member Functions

void destroy ()
 InGameConsole ()
 Constructor: Creates and initializes the InGameConsole.
void initialise (int windowWidth, int windowHeight)
 Initializes the InGameConsole.
void setConfigValues ()
 Sets the config values, describing the size of the console.
void update (const Clock &time)
 Used to control the actual scrolling and the cursor.
 ~InGameConsole ()
 Destructor: Destroys the TextAreas.

Static Public Member Functions

static void closeConsole ()
 Deactivates the console.
static InGameConsolegetInstance ()
static InGameConsolegetInstancePtr ()
static void openConsole ()
 Activates the console.

Private Member Functions

void activate ()
 Shows the InGameConsole.
void bHidesAllInputChanged ()
 Called whenever bHidesAllInput_ changes.
void colourLine (int colourcode, int index)
void cursorChanged ()
 Called if the position of the cursor in the input-line has changed.
void deactivate ()
 Hides the InGameConsole.
void exit ()
 Called if the console gets closed.
 InGameConsole (const InGameConsole &other)
void inputChanged ()
 Called if the text in the input-line has changed.
void lineAdded ()
 Called if a new output-line was added.
void linesChanged ()
 Called if all output-lines have to be redrawn.
void onlyLastLineChanged ()
 Called if only the last output-line has changed.
void print (const std::string &text, int index, bool alwaysShift=false)
 Prints string to bottom line.
void setCursorPosition (unsigned int pos)
void shiftLines ()
 Shifts all output lines one line up.
void windowResized (unsigned int newWidth, unsigned int newHeight)
 Resizes the console elements. Call if window size changes.

Private Attributes

bool bActive_
bool bHidesAllInput_
float blinkTime
bool bShowCursor_
Ogre::Overlay * consoleOverlay_
Ogre::BorderPanelOverlayElement * consoleOverlayBorder_
Ogre::OverlayContainer * consoleOverlayContainer_
Ogre::TextAreaOverlayElement * consoleOverlayCursor_
Ogre::PanelOverlayElement * consoleOverlayNoise_
Ogre::TextAreaOverlayElement ** consoleOverlayTextAreas_
float cursor_
char cursorSymbol_
int desiredTextWidth_
std::string displayedText_
SimpleInputStateinputState_
unsigned int inputWindowStart_
unsigned int maxCharsPerLine_
float noiseSize_
unsigned int numLinesShifted_
float relativeHeight
float relativeWidth
int scroll_
float scrollSpeed_
int windowH_
int windowW_

Static Private Attributes

static InGameConsolesingletonRef_s = 0


Constructor & Destructor Documentation

orxonox::InGameConsole::InGameConsole (  ) 

orxonox::InGameConsole::~InGameConsole (  ) 

orxonox::InGameConsole::InGameConsole ( const InGameConsole other  )  [private]


Member Function Documentation

void orxonox::InGameConsole::activate (  )  [private]

void orxonox::InGameConsole::bHidesAllInputChanged (  )  [private]

void orxonox::InGameConsole::closeConsole (  )  [static]

Deactivates the console.

References deactivate(), and getInstance().

void orxonox::InGameConsole::colourLine ( int  colourcode,
int  index 
) [private]

void orxonox::InGameConsole::cursorChanged (  )  [private, virtual]

Called if the position of the cursor in the input-line has changed.

Reimplemented from orxonox::ShellListener.

References consoleOverlayCursor_, cursorSymbol_, orxonox::Shell::getCursorPosition(), orxonox::Shell::getInstance(), inputWindowStart_, maxCharsPerLine_, relativeHeight, and windowH_.

Referenced by activate(), and windowResized().

void orxonox::InGameConsole::deactivate (  )  [private]

void orxonox::InGameConsole::destroy (  ) 

void orxonox::InGameConsole::exit (  )  [private, virtual]

Called if the console gets closed.

Reimplemented from orxonox::ShellListener.

References deactivate().

static InGameConsole& orxonox::InGameConsole::getInstance (  )  [inline, static]

Referenced by closeConsole(), and openConsole().

static InGameConsole* orxonox::InGameConsole::getInstancePtr (  )  [inline, static]

void orxonox::InGameConsole::initialise ( int  windowWidth,
int  windowHeight 
)

void orxonox::InGameConsole::inputChanged (  )  [private, virtual]

Called if the text in the input-line has changed.

Reimplemented from orxonox::ShellListener.

References orxonox::Shell::getInstance(), inputWindowStart_, orxonox::LINES, and print().

void orxonox::InGameConsole::lineAdded (  )  [private, virtual]

Called if a new output-line was added.

Reimplemented from orxonox::ShellListener.

References numLinesShifted_, onlyLastLineChanged(), and shiftLines().

void orxonox::InGameConsole::linesChanged (  )  [private, virtual]

Called if all output-lines have to be redrawn.

Reimplemented from orxonox::ShellListener.

References orxonox::Shell::getInstance(), orxonox::Shell::getNewestLineIterator(), orxonox::LINES, and print().

Referenced by activate(), and windowResized().

void orxonox::InGameConsole::onlyLastLineChanged (  )  [private, virtual]

Called if only the last output-line has changed.

Reimplemented from orxonox::ShellListener.

References orxonox::Shell::getInstance(), orxonox::LINES, and print().

Referenced by lineAdded().

void orxonox::InGameConsole::openConsole (  )  [static]

Activates the console.

References activate(), and getInstance().

void orxonox::InGameConsole::print ( const std::string text,
int  index,
bool  alwaysShift = false 
) [private]

void orxonox::InGameConsole::setConfigValues (  ) 

Sets the config values, describing the size of the console.

Reimplemented from orxonox::OrxonoxClass.

References bHidesAllInput_, bHidesAllInputChanged(), blinkTime, cursorSymbol_, noiseSize_, relativeHeight, relativeWidth, scrollSpeed_, and SetConfigValue.

Referenced by InGameConsole().

void orxonox::InGameConsole::setCursorPosition ( unsigned int  pos  )  [private]

void orxonox::InGameConsole::shiftLines (  )  [private]

Shifts all output lines one line up.

References consoleOverlayTextAreas_, and orxonox::LINES.

Referenced by lineAdded(), and print().

void orxonox::InGameConsole::update ( const Clock time  ) 

void orxonox::InGameConsole::windowResized ( unsigned int  newWidth,
unsigned int  newHeight 
) [private, virtual]


Member Data Documentation

Referenced by setConfigValues(), and update().

Referenced by update().

Ogre::Overlay* orxonox::InGameConsole::consoleOverlay_ [private]

Ogre::BorderPanelOverlayElement* orxonox::InGameConsole::consoleOverlayBorder_ [private]

Ogre::OverlayContainer* orxonox::InGameConsole::consoleOverlayContainer_ [private]

Referenced by initialise(), update(), and ~InGameConsole().

Ogre::TextAreaOverlayElement* orxonox::InGameConsole::consoleOverlayCursor_ [private]

Ogre::PanelOverlayElement* orxonox::InGameConsole::consoleOverlayNoise_ [private]

Ogre::TextAreaOverlayElement** orxonox::InGameConsole::consoleOverlayTextAreas_ [private]

Referenced by InGameConsole(), and update().

Referenced by windowResized().

Referenced by print().

Referenced by cursorChanged(), print(), and windowResized().

Referenced by setConfigValues(), and windowResized().

Referenced by InGameConsole(), lineAdded(), and print().

Referenced by setConfigValues(), and update().

Referenced by InGameConsole(), and ~InGameConsole().

Referenced by activate(), and windowResized().


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

Generated on Tue Jul 28 16:22:38 2009 for Orxonox by  doxygen 1.5.6