C4 Engine
C4 Engine API Documentation

Widget::SetWidgetUsage

Defined in:  C4Widgets.h
Sets the widget usage flags.
Prototype

void SetWidgetUsage(uint32 usage);

Parameters
usage The new widget usage flags.
Description
The SetWidgetUsage function sets the widget usage flags to the value specified by the usage parameter, which can be a combination (through logical OR) of the following constants.
kWidgetKeyboardFocus The widget is capable of acquiring the keyboard focus.
kWidgetMouseWheel The widget can handle mouse wheel events.
kWidgetTrackInhibit The widget is not tracked after any mouse down event.
kWidgetTrackRightMouse The widget is tracked after a right mouse button click. (Ignored if kWidgetTrackInhibit is set.)
kWidgetTrackMiddleMouse The widget is tracked after a middle mouse button click. (Ignored if kWidgetTrackInhibit is set.)
kWidgetClickActivate The widget can be configured to be activated by default when the kWidgetClickable widget state is set.
kWidgetGeneratedImage The primary texture map of an ImageWidget is a generated texture, and the name of any texture resource should not be saved.
The initial value of the usage flags for all widgets is 0. A subclass implementation typically calls the SetWidgetUsage function in order to specify what kinds of events it can handle.
See Also

Widget::GetWidgetUsage

Widget::HandleMouseEvent

Widget::HandleKeyboardEvent