Reference

CL_Event_ButtonPress(3)

Event callback interface for button presses.

NAME

CL_Event_ButtonPress - Event callback interface for button presses.

DESCRIPTION

This interface is used to intercept button presses from the keyboard, mouse and joystick. To use this interface, inherit it and implement on_button_press(). Then add it to a CL_EventChain_ButtonPress chain. The topmost chain is located in CL_Input. ClanLib has some common case inheritance of most of our events, and you may want to have a look at them before using this interface. One example is the CL_InputBuffer class, which converts button events into a poll queue.

Inherited from public virtual CL_Event

CLASS MEMBERS

virtual ~CL_Event_ButtonPress()
virtual bool on_button_press(
 CL_InputDevice *device,
const CL_Key &key)

MEMBERS WITH DESCRIPTIONS

virtual ~CL_Event_ButtonPress()
Description:

virtual bool on_button_press(
 CL_InputDevice *device,
const CL_Key &key)

Parameters:
device - Input device where the event originates from.
key - The key/button that triggered the event.

Description:

Called when a button press event occours.

Return value:

If true is returned, the event chain that called this function will break the chain (stop sending it the remaining listeners on the chain.

SEE ALSO

All ClanLib API classes can be found in clanlib (3).

AUTHORS

Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).

See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.