Event class reference


Basic interface for events. Objects of this type are processed by Window class objects.

Functions documentation

virtual Event* Clone() const = 0;

The function creates a clone of the object. It is needed in the process of sending events to child windows. Typical implementation: "return new ImplementedEventName (* this);"


virtual ~Event();

Virtual destructor.


EventType GetEventType() const;

Returns the type of event.


void SetEventType(EventType eventType);

Allows you to set the type of event from outside. Note - wrong setting of this parameter may cause memory corruption violation because events are often cast from the base class to the correct one.


bool WasProcessed() const;

Returns a flag informing about the event being handled. Returns true if the event has been processed and false if it is still waiting to be processed.


void SetAsProcessed();

Allows you to set the event processing flag.


Window* GetOwner();

Returns the handle (pointer) to the window that created the event.


void SetOwner(Window* owner);

Sets the parent window for the event.


Variables documentation

EventType m_Type = EventType::Default;

Describes the type of event.


bool m_bProcessed = false;

The state flag of serving the event. If it is equal to "true" the event has been handled.


Window* m_OwnedBy = nullptr;

Stores the pointer to the Window that created the event.