# Ogre::WindowEventUtilities Class Reference

Utility class to handle Window Events/Pumping/Messages More...

`#include <OgreWindowEventUtilities.h>`

List of all members.

## Public Types

typedef std::multimap < RenderWindow *, WindowEventListener * > | WindowEventListeners
typedef std::vector < RenderWindow * > | Windows

## Static Public Member Functions

static void | messagePump ()
| Call this once per frame if not using Root:startRendering().
static void | addWindowEventListener (RenderWindow *window, WindowEventListener *listener)
| Add a listener to listen to renderwindow events (multiple listener's per renderwindow is fine) The same listener can listen to multiple windows, as the Window Pointer is sent along with any messages.
static void | removeWindowEventListener (RenderWindow *window, WindowEventListener *listener)
| Remove previously added listener
static void | _addRenderWindow (RenderWindow *window)
| Called by RenderWindows upon creation for Ogre generated windows.
static void | _removeRenderWindow (RenderWindow *window)
| Called by RenderWindows upon creation for Ogre generated windows.

## Static Public Attributes

static WindowEventListeners | _msListeners
static Windows | _msWindows

## Detailed Description

Utility class to handle Window Events/Pumping/Messages

Definition at line 103 of file OgreWindowEventUtilities.h.

## Member Typedef Documentation

typedef std::multimap<RenderWindow*, WindowEventListener*> Ogre::WindowEventUtilities::WindowEventListeners

Definition at line 162 of file OgreWindowEventUtilities.h.

typedef std::vector<RenderWindow*> Ogre::WindowEventUtilities::Windows

Definition at line 165 of file OgreWindowEventUtilities.h.

## Member Function Documentation

static void Ogre::WindowEventUtilities::messagePump | ( |  | ) | `[static]`

Call this once per frame if not using Root:startRendering().

This will update all registered RenderWindows (If using external Windows, you can optionally register those yourself)

static void Ogre::WindowEventUtilities::addWindowEventListener | ( | RenderWindow * | window,
|  | WindowEventListener * | listener |
| ) |  |  | `[static]`

Add a listener to listen to renderwindow events (multiple listener's per renderwindow is fine) The same listener can listen to multiple windows, as the Window Pointer is sent along with any messages.

Parameters:

  | window | The RenderWindow you are interested in monitoring
  | listner | Your callback listener

static void Ogre::WindowEventUtilities::removeWindowEventListener | ( | RenderWindow * | window,
|  | WindowEventListener * | listener |
| ) |  |  | `[static]`

Remove previously added listener

Parameters:

  | window | The RenderWindow you registered with
  | listner | The listener registered

static void Ogre::WindowEventUtilities::_addRenderWindow | ( | RenderWindow * | window | ) | `[static]`

Called by RenderWindows upon creation for Ogre generated windows.

You are free to add your external windows here too if needed.

Parameters:

  | window | The RenderWindow to monitor

static void Ogre::WindowEventUtilities::_removeRenderWindow | ( | RenderWindow * | window | ) | `[static]`

Called by RenderWindows upon creation for Ogre generated windows.

You are free to add your external windows here too if needed.

Parameters:

  | window | The RenderWindow to remove from list

## Member Data Documentation

WindowEventListeners Ogre::WindowEventUtilities::_msListeners `[static]`

Definition at line 163 of file OgreWindowEventUtilities.h.

Windows Ogre::WindowEventUtilities::_msWindows `[static]`

Definition at line 166 of file OgreWindowEventUtilities.h.

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

- OgreWindowEventUtilities.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Dec 27 17:37:11 2009