Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::IEventReceiver Class Referenceabstract

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

#include <nirtcpp/core/engine/IEventReceiver.hpp>

Inheritance diagram for nirt::IEventReceiver:
Inheritance graph

Public Member Functions

virtual ~IEventReceiver ()
 Destructor.
 
virtual bool OnEvent (const SEvent &event)=0
 Called if an event happened.
 

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 nirt::EEVENT_TYPE for a description of where each type of event starts, and the path it takes through the system.

Member Function Documentation

◆ OnEvent()

virtual bool nirt::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 Nirtcpp 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 nirt::gui::IGUIElement, nirt::scene::ISceneNodeAnimator, and nirt::scene::ICameraSceneNode.


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

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print