Resolution independent 2D graphics engine
qr::quit_on_keypress

Class Description

Event receiver which quits the application if the specified key is pressed. Inherits qr::event_receiver.

Public Methods

quit_on_keypress (KEY keysym)

Protected Methods

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

Details

qr::quit_on_keypress::quit_on_keypress ( KEY keysym
)

Description

Register keysym to listen for.

Paramiters

keysym
void qr::quit_on_keypress::on_event ( scene_node * node,
event * n_event
) [protected, virtual]

Description

Listens for keypress events and checks to see if the keysym of the event matches the keysym provided in the objects constructor. Raises a qr::quit_event if it does.

Paramiters

node
n_event
void qr::quit_on_keypress::on_attach ( scene_node * node
) [protected, inline, virtual]

Description

Does nothing but is necessary for the event receiver to register.

Paramiters

node
void qr::quit_on_keypress::on_detach ( scene_node * node
) [protected, inline, virtual]

Description

Does nothing but is necessary for the event receiver to register.

Paramiters

node