GL Studio API
Public Types | Public Member Functions | List of all members
InputHandler Class Referenceabstract

#include <input_handler.h>

Public Types

typedef unsigned int ID
 Type for unique identifiers.
 

Public Member Functions

virtual DisplayObjectHandleInput (DisplayEvent *ev)=0
 
virtual ID RegisterGlobalKeyboardHandler (KeyboardCallbackBase *callback)=0
 
virtual void UnregisterGlobalKeyboardHandler (ID id)=0
 
virtual ~InputHandler ()
 

Detailed Description

Base class implemented by all input handlers

Constructor & Destructor Documentation

virtual ~InputHandler ( )
inlinevirtual

destructor

Member Function Documentation

virtual DisplayObject* HandleInput ( DisplayEvent ev)
pure virtual

Handle the event

Parameters
evthe event to handle
Returns
the object that handled the event, or NULL if no object handled the event
virtual ID RegisterGlobalKeyboardHandler ( KeyboardCallbackBase callback)
pure virtual

Register a global keyboard handler.

Parameters
callbackthe callback to call when a keyboard event occurs. The input handler owns the callback and will delete it.
Returns
unique ID. Used to unregister.
virtual void UnregisterGlobalKeyboardHandler ( ID  id)
pure virtual

Unregister a global keyboard handler.

Parameters
idthe unique identifier returned from RegisterGlobalKeyboardHandler.

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