Rocket::Core::Python::EventListener Class Reference

#include <EventListener.h>

Inheritance diagram for Rocket::Core::Python::EventListener:
Collaboration diagram for Rocket::Core::Python::EventListener:

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)

Detailed Description

Python Version of the Event Listener

This event listener reference counts its OnAttach/OnDetach events and cleans itself up when the count hits 0.

Author:
Lloyd Weehuizen

Constructor & Destructor Documentation

Rocket::Core::Python::EventListener::EventListener ( PyObject *  object  ) 

Constructor from python object

Parameters:
Python object to fire the event on

Rocket::Core::Python::EventListener::EventListener ( const Rocket::Core::String code,
Element context = NULL 
)

Constructor for inline string

Parameters:
code Python code string to fire
context Optional, if set the code will be executed in this element's namespace


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