Irrlicht Engine: irr::IEventReceiver Class Reference

Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::IEventReceiver Class Reference

Interface of an object which can receive events. More...

`#include <IEventReceiver.h>`

Inheritance diagram for irr::IEventReceiver:

List of all members.

## Public Member Functions
virtual bool | OnEvent (const SEvent &event)=0
| Called if an event happened.
virtual | ~IEventReceiver ()
| Destructor.

## Detailed Description

Interface of an object which can receive events.

Many of the engine's classes inherit IEventReceiver so they are able to process events. Events usually start at a postEventFromUser function and are passed down through a chain of event receivers until OnEvent returns true. See irr::EEVENT_TYPE for a description of where each type of event starts, and the path it takes through the system.

Definition at line 432 of file IEventReceiver.h.

## Constructor & Destructor Documentation

virtual irr::IEventReceiver::~IEventReceiver | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 437 of file IEventReceiver.h.

## Member Function Documentation

virtual bool irr::IEventReceiver::OnEvent | ( | const SEvent & | event | ) | `[pure virtual]`

Called if an event happened.

Please take care that you should only return 'true' when you want to _prevent_ Irrlicht from processing the event any further. So 'true' does mean that an event is completely done. Therefore your return value for all unprocessed events should be 'false'.

Returns:
  True if the event was processed.

Implemented in irr::scene::ICameraSceneNode, irr::gui::IGUIElement, and irr::scene::ISceneNodeAnimator.

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

- IEventReceiver.h

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Oct 24 12:42:02 2010 by Doxygen (1.6.2)