#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. | |
| typedef void OpenGUI::EventCallback::EventCallbackFunc(Object *sender, EventArgs &args) |
Function signature required for use as C-style event callback.
void myCallback( Object* , EventArgs* );
| OpenGUI::EventCallback::EventCallback | ( | EventCallbackFunc * | C_funcPtr | ) | [inline] |
Constructor requires a pointer to a valid C function pointer.
| virtual void OpenGUI::EventCallback::onEvent | ( | Object * | sender, | |
| EventArgs & | args | |||
| ) | [inline, virtual] |
Calls the function given at event callback creation on event trigger.
Implements OpenGUI::EventHandler.
| virtual void OpenGUI::EventCallback::onEventDestruction | ( | ) | [inline, virtual] |
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.