Gel2D - The free/open source game creation suite

Public Member Functions | Protected Attributes
gel::GelEvent Class Reference

Base event class. More...

#include <gelEvent.h>

Inheritance diagram for gel::GelEvent:
gel::GelKeyEvent gel::GelMouseEvent gel::GelResizeEvent

List of all members.

Public Member Functions

 GelEvent (EventType tp)
 Constructor.
virtual ~GelEvent ()
 Destructor.
EventType getType () const
 Gets the the event type.
bool isAccepted () const
 Checks whether or not the event is accepted.
void accept ()
 Sets the accept flag.
void ignore ()
 Clears the accept flag.

Protected Attributes

EventType type
 Event type.
bool acc
 Accept flag.

Detailed Description

Base event class.

The event contains an accepted flag, and is set by default. As a general rule, if the event is accepted, it will not be propagated to other receivers; however, the accepted flag can also be used for different reasons in some event types.


Constructor & Destructor Documentation

gel::GelEvent::GelEvent ( EventType  tp) [inline]

Constructor.

Parameters:
tp: The event type.
virtual gel::GelEvent::~GelEvent ( ) [inline, virtual]

Destructor.


Member Function Documentation

EventType gel::GelEvent::getType ( ) const [inline]

Gets the the event type.

bool gel::GelEvent::isAccepted ( ) const [inline]

Checks whether or not the event is accepted.

void gel::GelEvent::accept ( ) [inline]

Sets the accept flag.

void gel::GelEvent::ignore ( ) [inline]

Clears the accept flag.


Member Data Documentation

Event type.

bool gel::GelEvent::acc [protected]

Accept flag.


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