Event Objects

Events are instances of event classes that implement the IEvent interface. The IEvent interface defines the Dispatch() method, which takes a pointer to the object handling the event and invokes the appropriate handler function. Events implement the Dispatch() method by querying the event handler for the appropriate event listener interface and then invoking the handler method on the interface. The relationship between events and event listeners is an example of the visitor design pattern.

Event classes are simply C++ classes that implement the IEvent interface. The Events package implements the most common Windows messages as event classes. Developers can create their own custom event types by implementing the IEvent interface and one or more corresponding event listener types.