Resolution independent 2D graphics engine
qr::event_receiver

Class Description

Event receiver base. Event receivers are objects which can be attached to scene nodes to catch events. Uses include the detection of keyboard input and user-created events that were raised by scene_node::raise_event(). This class is pure virtual and defines an interface allowing event receivers to be implemented.

Public Methods

void on_attach (scene_node *node)=0
void on_event (scene_node *node, event *n_event)=0
void on_detach (scene_node *node)=0

Details

virtual void qr::event_receiver::on_attach ( scene_node * node
) [pure virtual]

Description

Method that gets called when event receiver is attached to a scene node.

Paramiters

node Pointer to the scene node that is registering the event receiver.
virtual void qr::event_receiver::on_event ( scene_node * node,
event * n_event
) [pure virtual]

Description

Method that gets called when an event occurs.

Paramiters

node Pointer to the scene node that is calling the event receiver.
n_event Event object.
virtual void qr::event_receiver::on_detach ( scene_node * node
) [pure virtual]

Description

Method that gets called when event receiver is detached from a scene node.

Paramiters

node Pointer to the scene node that is calling the event receiver.