rag
graphic 2d engine
Public Member Functions | Public Attributes | List of all members
events::Event Class Reference

Base class for event system. More...

#include <Event.h>

Inheritance diagram for events::Event:
events::KeyboardEvent events::TextEvent events::TouchEvent

Public Member Functions

 Event (std::string type)
 Creates a new event of the given type.
 
virtual std::string toString ()
 string representing the event.
 

Public Attributes

std::string type
 The type of the event. The string should be unique for this event.
 
bool captured
 When an event is captured, it won't propagate anymore through the Display List.
 
rag::DisplayObjecttarget
 Usually points to the dispatcher object. 'target' can be assigned to anything for custom events.
 

Detailed Description

Base class for event system.

When an event is triggered, it is processed this way: The display list is travelled from leafs to stage (AKA root). The propagation stops when the root is reached or when a node with the property 'captureInput' set to true is traversed.

See also
EventListener, EventDispatcher

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