#include <EventListener.h>


Public Member Functions | |
| EventListener (PyObject *object) | |
| EventListener (const Rocket::Core::String &code, Element *context=NULL) | |
| virtual void | ProcessEvent (Event &event) |
| Process the event. | |
| virtual void | OnAttach (Element *element) |
| Listen for detach event so we can clean up. | |
| virtual void | OnDetach (Element *element) |
This event listener reference counts its OnAttach/OnDetach events and cleans itself up when the count hits 0.
| Rocket::Core::Python::EventListener::EventListener | ( | PyObject * | object | ) |
Constructor from python object
| Python | object to fire the event on |
| Rocket::Core::Python::EventListener::EventListener | ( | const Rocket::Core::String & | code, | |
| Element * | context = NULL | |||
| ) |
Constructor for inline string
| code | Python code string to fire | |
| context | Optional, if set the code will be executed in this element's namespace |