C4 Engine
C4 Engine API Documentation

Widget::PostWidgetEvent

Defined in:  C4Widgets.h
Posts a widget event.
Prototype

void PostWidgetEvent(const WidgetEventData& eventData);

Parameters
eventData The widget event data.
Description
The PostWidgetEvent function should be called by a widget subclass implementation when the observers of a widget need to be informed of some kind of change due to user interaction. The eventType field of the WidgetEventData structure can be one of the following constants.
kEventWidgetActivate The user activated the widget with the intention of causing some kind of permanent action to take place. For example, the user pressed a pushbutton.
kEventWidgetChange The user caused some state of the widget to change, but not in a way that is intended to cause a permanent action to take place. For example, the user changed the state of a check box.
A widget should always return immediately after calling the PostWidgetEvent function because the observer that receives the event is allowed to destroy the widget in response to the event.
See Also

Widget::ActivateWidget

Widget::HandleMouseEvent

Widget::HandleKeyboardEvent

WidgetEventData