#include <OpenGUI_EventHandler.h>
Inheritance diagram for OpenGUI::EventCallback:

obj is a pointer to a valid Object, and desiredEvent is a valid event for that Object. obj->getEvents()["desiredEvent"].add( new EventCallback(&myCallback) );
Public Types | |
| typedef void | EventCallbackFunc (Object *sender, EventArgs &args) |
| Function signature required for use as C-style event callback. | |
Public Member Functions | |
| EventCallback (EventCallbackFunc *C_funcPtr) | |
| Constructor requires a pointer to a valid C function pointer. | |
| virtual void | onEvent (Object *sender, EventArgs &args) |
| Calls the function given at event callback creation on event trigger. | |
| virtual void | onEventDestruction () |
| Automatically deletes self on event destruction. | |
|
|
Function signature required for use as C-style event callback.
void myCallback( Object* , EventArgs* );
|
|
|
Constructor requires a pointer to a valid C function pointer.
|
|
||||||||||||
|
Calls the function given at event callback creation on event trigger.
Implements OpenGUI::EventHandler. |
|
|
Automatically deletes self on event destruction. This is so that you do not need to retain a pointer to it. In fact, you probably shouldn't. Reimplemented from OpenGUI::EventHandler. |