PlatformWindowManager Class Reference

#include <platformWindowMgr.h>

Inheritance diagram for PlatformWindowManager:

Inheritance graph
[legend]
List of all members.

Detailed Description

Abstract representation of a manager for native OS windows.

The PlatformWindowManager interface provides a variety of methods for querying the current desktop configuration, as well as allocating and retrieving existing windows. It may also manage application-level event handling.


Public Member Functions

 PlatformWindowManager ()
virtual ~PlatformWindowManager ()
virtual RectI getPrimaryDesktopArea ()=0
 Return the extents in window coordinates of the primary desktop area.
virtual S32 getDesktopBitDepth ()=0
 Retrieve the currently set desktop bit depth.
virtual Point2I getDesktopResolution ()=0
 Retrieve the currently set desktop resolution.
virtual void getMonitorRegions (Vector< RectI > &regions)=0
 Populate a vector with all monitors and their extents in window space.
virtual PlatformWindowcreateWindow (GFXDevice *device, const GFXVideoMode &mode)=0
 Create a new window, appropriate for the specified device and mode.
virtual void getWindows (VectorPtr< PlatformWindow * > &windows)=0
 Populate a list with references to all the windows created from this manager.
virtual PlatformWindowgetFocusedWindow ()=0
 Get the window that currently has the input focus or NULL.
virtual PlatformWindowgetWindowById (WindowId id)=0
 Get a window from a device ID.
virtual PlatformWindowgetFirstWindow ()=0
 Get the first window in the window list.
virtual void setParentWindow (void *newParent)=0
 Set the parent window.
virtual voidgetParentWindow ()=0
 Get the parent window.
virtual void lowerCurtain ()=0
 This method cues the appearance of that window ("lowering the curtain").
virtual void raiseCurtain ()=0

Static Public Member Functions

static PlatformWindowManagerget ()
 Get Global Singleton.
static void processCmdLineArgs (const S32 argc, const char **argv)

Protected Member Functions

S32 getNextId ()
 Get the next available window Id.

Private Member Functions

virtual void _processCmdLineArgs (const S32 argc, const char **argv)=0
 Process command line arguments from StandardMainLoop.

Private Attributes

S32 mIdSource


Constructor & Destructor Documentation

PlatformWindowManager::PlatformWindowManager (  )  [inline]

virtual PlatformWindowManager::~PlatformWindowManager (  )  [inline, virtual]


Member Function Documentation

S32 PlatformWindowManager::getNextId (  )  [inline, protected]

Get the next available window Id.

static PlatformWindowManager* PlatformWindowManager::get (  )  [static]

Get Global Singleton.

static void PlatformWindowManager::processCmdLineArgs ( const S32  argc,
const char **  argv 
) [static]

virtual RectI PlatformWindowManager::getPrimaryDesktopArea (  )  [pure virtual]

Return the extents in window coordinates of the primary desktop area.

On a single monitor system this is just the display extents. On a multimon system this is the primary monitor (which Torque should launch on).

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual S32 PlatformWindowManager::getDesktopBitDepth (  )  [pure virtual]

Retrieve the currently set desktop bit depth.

Returns:
The current desktop bit depth, or -1 if an error occurred

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual Point2I PlatformWindowManager::getDesktopResolution (  )  [pure virtual]

Retrieve the currently set desktop resolution.

Returns:
The current desktop bit depth, or Point2I(-1,-1) if an error occurred

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::getMonitorRegions ( Vector< RectI > &  regions  )  [pure virtual]

Populate a vector with all monitors and their extents in window space.

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual PlatformWindow* PlatformWindowManager::createWindow ( GFXDevice device,
const GFXVideoMode mode 
) [pure virtual]

Create a new window, appropriate for the specified device and mode.

Returns:
Pointer to the new window.

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::getWindows ( VectorPtr< PlatformWindow * > &  windows  )  [pure virtual]

Populate a list with references to all the windows created from this manager.

Implemented in MacWindowManager, and Win32WindowManager.

virtual PlatformWindow* PlatformWindowManager::getFocusedWindow (  )  [pure virtual]

Get the window that currently has the input focus or NULL.

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual PlatformWindow* PlatformWindowManager::getWindowById ( WindowId  id  )  [pure virtual]

Get a window from a device ID.

Returns:
The window associated with the specified ID, or NULL if no match was found.

Implemented in MacWindowManager, and Win32WindowManager.

virtual PlatformWindow* PlatformWindowManager::getFirstWindow (  )  [pure virtual]

Get the first window in the window list.

Returns:
The first window in the list, or NULL if no windows found

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::setParentWindow ( void newParent  )  [pure virtual]

Set the parent window.

This can be used to render in a child window.

Implemented in MacWindowManager, and Win32WindowManager.

virtual void* PlatformWindowManager::getParentWindow (  )  [pure virtual]

Get the parent window.

Implemented in MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::lowerCurtain (  )  [pure virtual]

This method cues the appearance of that window ("lowering the curtain").

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::raiseCurtain (  )  [pure virtual]

See also:
lowerCurtain
This method removes the curtain window.

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.

virtual void PlatformWindowManager::_processCmdLineArgs ( const S32  argc,
const char **  argv 
) [private, pure virtual]

Process command line arguments from StandardMainLoop.

This is done to allow web plugin functionality, where we are passed platform-specific information allowing us to set ourselves up in the web browser, to occur in a platform-neutral way.

Implemented in XB360WindowManager, MacWindowManager, and Win32WindowManager.


Member Data Documentation