Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgEventHandler Class Reference

This object maintains a set of event handlers. More...

#include <ddgevent.h>

Class diagram for ddgEventHandler:

List of all members.


Public Members

typedef bool (* MouseHandlerFn )(void*, int button, int state, int x, int y)
Event handler, returns true if a change occurred.

typedef bool (* MouseMotionHandlerFn )(void*, int x, int y)
Event handler, returns true if a change occurred.

typedef bool (* SpecialKeyHandlerFn )(void*, int key, int x, int y)
Event handler, returns true if a change occurred.

typedef bool (* KeyHandlerFn )(void*, unsigned char key, int x, int y)
Event handler, returns true if a change occurred.

 ddgEventHandler (void)
void mouseHandler ( MouseHandlerFn h )
Set Key handler method.

MouseHandlerFn mouseHandler ( void )
Get Key handler method.

void mouseMotionHandler ( MouseMotionHandlerFn h )
Set Key handler method.

void keyHandler ( KeyHandlerFn h )
Set Key handler method.

void specialKeyHandler ( SpecialKeyHandlerFn h )
Set Key handler method.

MouseMotionHandlerFn mouseMotionHandler ( void )
Get Key handler method.

KeyHandlerFn keyHandler ( void )
Get Key handler method.

SpecialKeyHandlerFn specialKeyHandler ( void )
Get Key handler method.

void handlerObject ( void *obj )
Set the handler object.

void* handlerObject ( void )
Get Key handler object.

void defaultHandler ( ddgEventHandler *handler )
Set Default handler object.

ddgEventHandler* defaultHandler ( void )
Get Default handler object.

void set ( void *obj, KeyHandlerFn skey, SpecialKeyHandlerFn sspecialKey, MouseHandlerFn smouse, MouseMotionHandlerFn smouseMotion )
Set the handler functions and context object on this event handler.

void overrideEventHandler ( ddgEventHandler *handler )
Overrride another handlers event handlers with the specified functions. More...


Static Public Members

bool smouse (void *obj, int button, int state, int x, int y)
Default key handler.

bool smouseMotion (void *obj, int x, int y)
Default Event handler, returns true if a change occurred.

bool sspecialKey (void *obj, int k, int x, int y)
Default Event handler, returns true if a change occurred.

bool skey (void *obj, unsigned char k, int x, int y)
Default Event handler, returns true if a change occurred.


Detailed Description

This object maintains a set of event handlers.


Member Function Documentation

void ddgEventHandler::overrideEventHandler (ddgEventHandler * handler)

Overrride another handlers event handlers with the specified functions.

store the original handlers in this object and call those if we do not handle the events ourselves.


The documentation for this class was generated from the following files:
Generated at Sun Sep 17 19:27:53 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999