OpenGUI::ScreenManager Class Reference

#include <OpenGUI_ScreenManager.h>

List of all members.


Detailed Description

Manages creating, destroying, and lookup of Screen objects.


Public Member Functions

ScreencreateScreen (const String &screenName, const FVector2 &initialSize, Viewport *viewport=0)
 Creates a new screen with the given screenName at the given initialSize, rendering to the given viewport.
void destroyScreen (Screen *screenPtr)
 destroys the given screen
ScreengetScreen (const String &screenName)
 returns the requested screen by name, or 0 on failure
void updateScreens ()
 performs an update on all screens that are auto updating
void updateTime ()
 performs time injections on all screens that are auto timing using TimerManager as the time source
iterator getIterator ()
 returns an iterator to walk the current list of screens
float statGetFPS ()
 Returns the current FPS.

Static Public Member Functions

static ScreenManagergetSingleton (void)
 Retrieve the current singleton, if one exists. If none exists, this will cause an error.
static ScreenManagergetSingletonPtr (void)
 Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.


Member Function Documentation

Screen * OpenGUI::ScreenManager::createScreen const String screenName,
const FVector2 initialSize,
Viewport viewport = 0
 

Creates a new screen with the given screenName at the given initialSize, rendering to the given viewport.

The viewport is optional, but you cannot render a Screen without a Viewport to render to, so Screens with no Viewport are created disabled, and cannot be enabled until a Viewport is assigned.

void OpenGUI::ScreenManager::destroyScreen Screen screenPtr  ) 
 

destroys the given screen

iterator OpenGUI::ScreenManager::getIterator  )  [inline]
 

returns an iterator to walk the current list of screens

The Key half of the iterator is the Screen name (String), the Value half is a pointer to the Screen (Screen *)

Screen * OpenGUI::ScreenManager::getScreen const String screenName  ) 
 

returns the requested screen by name, or 0 on failure

ScreenManager & OpenGUI::ScreenManager::getSingleton void   )  [static]
 

Retrieve the current singleton, if one exists. If none exists, this will cause an error.

ScreenManager * OpenGUI::ScreenManager::getSingletonPtr void   )  [static]
 

Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.

float OpenGUI::ScreenManager::statGetFPS  ) 
 

Returns the current FPS.

The FPS value returned is an average over the last 5 frames. If less than 5 frames have been rendered, then the average is based on as many frames as available. If no frames have been rendered, the returned value will be 0.0f.

Note:
A "frame" is defined as a single call to ScreenManager::updateScreens(). Since most applications will call this function once per scene frame, this is an adequate metric.

The results of all statistics are dependent on the accuracy of the TimerManager. Feeding inaccurate information to TimerManager will result in inaccurate results for all statistics.

void OpenGUI::ScreenManager::updateScreens  ) 
 

performs an update on all screens that are auto updating

void OpenGUI::ScreenManager::updateTime  ) 
 

performs time injections on all screens that are auto timing using TimerManager as the time source


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Sun Sep 9 02:00:21 2007