Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
orxonox::InGameConsole Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/orxonox/overlays/InGameConsole.h>

Inheritance diagram for orxonox::InGameConsole:
orxonox::Singleton< InGameConsole > orxonox::ShellListener orxonox::WindowEventListener orxonox::UpdateListener orxonox::Listable orxonox::Listable orxonox::Identifiable orxonox::Identifiable

Public Member Functions

 InGameConsole ()
 Constructor: Creates and initializes the InGameConsole. More...
 
 ~InGameConsole ()
 Destructor: Destroys the TextAreas. More...
 
void initialise ()
 Initializes the InGameConsole. More...
 
virtual void postUpdate (const Clock &time) override
 Gets called by Core after the framework was ticked (but before graphics are drawn). More...
 
virtual void preUpdate (const Clock &time) override
 Used to control the actual scrolling and the cursor. More...
 
void setConfigValues ()
 Sets the config values, describing the size of the console. More...
 
- Public Member Functions inherited from orxonox::ShellListener
 ShellListener ()=default
 
virtual ~ShellListener ()=default
 
- Public Member Functions inherited from orxonox::Listable
 Listable ()
 Constructor: Allocates space in the element list. More...
 
 Listable (Context *context)
 Constructor: Allocates space in the element list and assigns the context. More...
 
virtual ~Listable ()
 Destructor: Removes the object from the object-lists. More...
 
ContextgetContext () const
 
void setContext (Context *context)
 Changes the context. More...
 
void unregisterObject ()
 Removes this object from the object-lists. More...
 
- Public Member Functions inherited from orxonox::Identifiable
 Identifiable ()
 Constructor: Sets the default values. More...
 
virtual ~Identifiable ()
 
ORX_FORCEINLINE voidgetDerivedPointer (unsigned int classID)
 Returns a valid pointer of any derived type that is registered in the class hierarchy. More...
 
template<class T >
ORX_FORCEINLINE T * getDerivedPointer (unsigned int classID)
 Version of getDerivedPointer with template. More...
 
template<class T >
ORX_FORCEINLINE const T * getDerivedPointer (unsigned int classID) const
 Const version of getDerivedPointer with template. More...
 
IdentifiergetIdentifier () const
 Returns the Identifier of the object. More...
 
bool isA (const Identifier *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
template<class B >
bool isA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isA (const Identifiable *object)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isChildOf (const Identifier *identifier)
 Returns true if the object's class is a child of the given type. More...
 
template<class B >
bool isChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a child of the given type. More...
 
bool isChildOf (const Identifiable *object)
 Returns true if the object's class is a child of the given type. More...
 
bool isDirectChildOf (const Identifier *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
template<class B >
bool isDirectChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectChildOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectParentOf (const Identifier *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
template<class B >
bool isDirectParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
bool isDirectParentOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isExactlyA (const Identifier *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
template<class B >
bool isExactlyA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
bool isExactlyA (const Identifiable *object)
 Returns true if the object's class is exactly of the given type. More...
 
bool isParentOf (const Identifier *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
template<class B >
bool isParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
bool isParentOf (const Identifiable *object)
 Returns true if the object's class is a parent of the given type. More...
 
- Public Member Functions inherited from orxonox::UpdateListener
 UpdateListener ()
 

Static Public Member Functions

static void closeConsole ()
 Deactivates the console. More...
 
static void openConsole ()
 Activates the console. More...
 
- Static Public Member Functions inherited from orxonox::Singleton< InGameConsole >
static bool exists ()
 Tells whether the singleton has been created. More...
 
static InGameConsolegetInstance ()
 Returns a reference to the singleton instance. More...
 

Private Member Functions

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

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_
 
InputStateinputState_
 
unsigned int inputWindowStart_
 
unsigned int maxCharsPerLine_
 
float noiseSize_
 
unsigned int numLinesShifted_
 
float relativeHeight
 
float relativeWidth
 
int scroll_
 
float scrollSpeed_
 
Shellshell_
 
int windowH_
 
int windowW_
 

Static Private Attributes

static InGameConsolesingletonPtr_s
 

Friends

class Singleton< InGameConsole >
 

Additional Inherited Members

- Protected Member Functions inherited from orxonox::Singleton< InGameConsole >
 Singleton ()
 Constructor sets the singleton instance pointer. More...
 
virtual ~Singleton ()
 Destructor resets the singleton instance pointer. More...
 
- Protected Member Functions inherited from orxonox::WindowEventListener
 WindowEventListener ()
 
virtual ~WindowEventListener ()=default
 
unsigned int getWindowHeight () const
 Returns the current render window height. More...
 
unsigned int getWindowWidth () const
 Returns the current render window width. More...
 

Constructor & Destructor Documentation

orxonox::InGameConsole::InGameConsole ( )

Constructor: Creates and initializes the InGameConsole.

orxonox::InGameConsole::~InGameConsole ( )

Destructor: Destroys the TextAreas.

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

Member Function Documentation

void orxonox::InGameConsole::activate ( )
private

Shows the InGameConsole.

void orxonox::InGameConsole::bHidesAllInputChanged ( )
private

Called whenever bHidesAllInput_ changes.

void orxonox::InGameConsole::closeConsole ( )
static

Deactivates the console.

void orxonox::InGameConsole::colourLine ( Shell::LineType  type,
int  index 
)
private
void orxonox::InGameConsole::cursorChanged ( )
overrideprivatevirtual

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

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::deactivate ( )
private

Hides the InGameConsole.

void orxonox::InGameConsole::executed ( )
overrideprivatevirtual

Called if a command is about to be executed.

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::exit ( )
overrideprivatevirtual

Called if the console gets closed.

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::initialise ( )

Initializes the InGameConsole.

void orxonox::InGameConsole::inputChanged ( )
overrideprivatevirtual

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

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::lineAdded ( )
overrideprivatevirtual

Called if a new output-line was added.

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::linesChanged ( )
overrideprivatevirtual

Called if all output-lines have to be redrawn.

Reimplemented from orxonox::ShellListener.

void orxonox::InGameConsole::openConsole ( )
static

Activates the console.

virtual void orxonox::InGameConsole::postUpdate ( const Clock time)
inlineoverridevirtual

Gets called by Core after the framework was ticked (but before graphics are drawn).

Implements orxonox::UpdateListener.

void orxonox::InGameConsole::preUpdate ( const Clock time)
overridevirtual

Used to control the actual scrolling and the cursor.

Implements orxonox::UpdateListener.

void orxonox::InGameConsole::print ( const std::string &  text,
Shell::LineType  type,
int  index,
bool  alwaysShift = false 
)
private

Prints string to bottom line.

Parameters
textThe string to be printed
typeThe type of the text, defines the color
indexThe index of the text overlay in which the string will be displayed
alwaysShiftIf true the ohter lines in the console are always shifted by one line
void orxonox::InGameConsole::setConfigValues ( void  )

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

void orxonox::InGameConsole::setCursorPosition ( unsigned int  pos)
private
void orxonox::InGameConsole::shiftLines ( )
private

Shifts all output lines one line up.

void orxonox::InGameConsole::windowResized ( unsigned int  newWidth,
unsigned int  newHeight 
)
overrideprivatevirtual

Resizes the console elements.

Call if window size changes.

Reimplemented from orxonox::WindowEventListener.

Friends And Related Function Documentation

friend class Singleton< InGameConsole >
friend

Member Data Documentation

bool orxonox::InGameConsole::bActive_
private
bool orxonox::InGameConsole::bHidesAllInput_
private
float orxonox::InGameConsole::blinkTime
private
bool orxonox::InGameConsole::bShowCursor_
private
Ogre::Overlay* orxonox::InGameConsole::consoleOverlay_
private
Ogre::BorderPanelOverlayElement* orxonox::InGameConsole::consoleOverlayBorder_
private
Ogre::OverlayContainer* orxonox::InGameConsole::consoleOverlayContainer_
private
Ogre::TextAreaOverlayElement* orxonox::InGameConsole::consoleOverlayCursor_
private
Ogre::PanelOverlayElement* orxonox::InGameConsole::consoleOverlayNoise_
private
Ogre::TextAreaOverlayElement** orxonox::InGameConsole::consoleOverlayTextAreas_
private
float orxonox::InGameConsole::cursor_
private
char orxonox::InGameConsole::cursorSymbol_
private
int orxonox::InGameConsole::desiredTextWidth_
private
std::string orxonox::InGameConsole::displayedText_
private
InputState* orxonox::InGameConsole::inputState_
private
unsigned int orxonox::InGameConsole::inputWindowStart_
private
unsigned int orxonox::InGameConsole::maxCharsPerLine_
private
float orxonox::InGameConsole::noiseSize_
private
unsigned int orxonox::InGameConsole::numLinesShifted_
private
float orxonox::InGameConsole::relativeHeight
private
float orxonox::InGameConsole::relativeWidth
private
int orxonox::InGameConsole::scroll_
private
float orxonox::InGameConsole::scrollSpeed_
private
Shell* orxonox::InGameConsole::shell_
private
InGameConsole* orxonox::InGameConsole::singletonPtr_s
staticprivate
int orxonox::InGameConsole::windowH_
private
int orxonox::InGameConsole::windowW_
private

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