#include <OgreEventProcessor.h>
Inheritance diagram for Ogre::EventProcessor:
Public Methods | |
EventProcessor () | |
virtual | ~EventProcessor () |
void | startProcessingEvents () |
Removes this from being a FrameListener, and deactivates the queue. More... | |
void | stopProcessingEvents () |
Removes this from being a FrameListener, and deactivates the queue. More... | |
void | initialise (RenderWindow *ren) |
Creates the Queue object, Creates the InputReader object initialises the InputReader to use buffered input. More... | |
void | processEvent (InputEvent *e) |
Processes default events, these are events are aren't handled by any dispatcher. More... | |
void | addCursorMoveListener (MouseMotionListener *c) |
Adds a mouse motion listener to the cursor object. More... | |
void | removeCursorMoveListener (MouseMotionListener *c) |
Removes a mouse motion listener to the cursor object. More... | |
void | addTargetManager (TargetManager *targetManager) |
Creates a dispatcher object that dispatches to the targetManager. More... | |
bool | frameStarted (const FrameEvent &evt) |
Processes all events on the queue. More... | |
Real | getTop () const |
returns 0, since this is a default event target, default events have a top of 0. More... | |
Real | getLeft () const |
returns 0, since this is a default event target, default events have a left of 0. More... | |
PositionTarget * | getPositionTargetParent () |
returns NULL, There is no parent of the default event target. More... | |
virtual bool | frameEnded (const FrameEvent &evt) |
Called just after a frame has been rendered. More... | |
void | processMouseEvent (MouseEvent *e) |
void | addMouseListener (MouseListener *l) |
void | removeMouseListener (MouseListener *l) |
void | processMouseMotionEvent (MouseEvent *e) |
void | addMouseMotionListener (MouseMotionListener *l) |
void | removeMouseMotionListener (MouseMotionListener *l) |
Static Public Methods | |
EventProcessor & | getSingleton (void) |
Override standard Singleton retrieval. More... | |
EventProcessor * | getSingletonPtr (void) |
Protected Types | |
typedef std::vector< EventDispatcher * > | DispatcherList |
Protected Methods | |
void | cleanup () |
empty queue and cleanup objects. More... | |
Protected Attributes | |
EventQueue * | mEventQueue |
InputReader * | mInputDevice |
DispatcherList | mDispatcherList |
MouseListener * | mMouseListener |
MouseMotionListener * | mMouseMotionListener |
Static Protected Attributes | |
EventProcessor * | ms_Singleton = 0 |
The EventProcessor is a frame listener, so each frame, it empties the entire queue to the list of dispatchers. Each dispatcher corresponds to a registered TargetManager. The TargetManagers need to be registered with the Processor before initialise is called. After intialise is called, the Processor will start processing events once startProcessingEvents is called.
The Processor acts like a default EventTarget, so it can process events that no dispatcher consumes. You can listen default actions to the processor by e.g. mProcessor->addMouseListener(defaultMouseMovement);
|
|
|
|
|
|
|
Adds a mouse motion listener to the cursor object. This keeps the Cursor object hidden. |
|
|
|
|
|
Creates a dispatcher object that dispatches to the targetManager. Adds the new dispatcher object to the dispatcher list. |
|
empty queue and cleanup objects.
|
|
Called just after a frame has been rendered.
Reimplemented in Ogre::ParticleSystemManager. |
|
Processes all events on the queue. sends each event to each dispatcher. deletes the event objects Reimplemented from Ogre::FrameListener. |
|
returns 0, since this is a default event target, default events have a left of 0.
Implements Ogre::PositionTarget. |
|
returns NULL, There is no parent of the default event target.
Implements Ogre::PositionTarget. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< EventProcessor >. |
|
|
|
returns 0, since this is a default event target, default events have a top of 0.
Implements Ogre::PositionTarget. |
|
Creates the Queue object, Creates the InputReader object initialises the InputReader to use buffered input.
|
|
Processes default events, these are events are aren't handled by any dispatcher.
Implements Ogre::EventTarget. |
|
|
|
|
|
Removes a mouse motion listener to the cursor object. This keeps the Cursor object hidden. |
|
|
|
|
|
Removes this from being a FrameListener, and deactivates the queue.
|
|
Removes this from being a FrameListener, and deactivates the queue.
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team