OGRE: OgreBites::WindowEventUtilities Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
OgreBites::WindowEventUtilities Class Reference
Optional Components » Bites

Utility class to handle Window Messages. More...

`#include <OgreWindowEventUtilities.h>`

## Static Public Member Functions
static void | _addRenderWindow (Ogre::RenderWindow *window)
| Call upon creation of Ogre windows.
static void | _removeRenderWindow (Ogre::RenderWindow *window)
| Called upon deletion of previously registered windows.
static void | addWindowEventListener (Ogre::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 | messagePump ()
| Call this once per frame.
static void | removeWindowEventListener (Ogre::RenderWindow *window, WindowEventListener *listener)
| Remove previously added listener.

## Detailed Description

Utility class to handle Window Messages.

This only provides a minimal implementation for moving/ resizing windows.

Note
  For input handling and proper platform integration rather use SDL2/ Qt/ whatever.

See also
  ApplicationContext

## Member Function Documentation

## ◆ messagePump()

void OgreBites::WindowEventUtilities::messagePump | ( |  | ) |
| static

Call this once per frame.

This will update all registered RenderWindows.

## ◆ addWindowEventListener()

void OgreBites::WindowEventUtilities::addWindowEventListener | ( | Ogre::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
  listener | Your callback listener

## ◆ removeWindowEventListener()

void OgreBites::WindowEventUtilities::removeWindowEventListener | ( | Ogre::RenderWindow * | window,
|  | WindowEventListener * | listener )
| static

Remove previously added listener.

Parameters

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

## ◆ _addRenderWindow()

void OgreBites::WindowEventUtilities::_addRenderWindow | ( | Ogre::RenderWindow * | window | ) |
| static

Call upon creation of Ogre windows.

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

Parameters

  window | The RenderWindow to monitor

## ◆ _removeRenderWindow()

void OgreBites::WindowEventUtilities::_removeRenderWindow | ( | Ogre::RenderWindow * | window | ) |
| static

Called upon deletion of previously registered windows.

Parameters

  window | The RenderWindow to remove from list

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

- OgreWindowEventUtilities.h