C4 Engine
C4 Engine API Documentation

Widget::WidgetEnabled

Defined in:  C4Widgets.h
Returns a boolean value indicating whether a widget is enabled.
Prototype

bool WidgetEnabled(voidconst;

Description
The WidgetEnabled function returns true if the widget is enabled and false if it is disabled. Calling the WidgetEnabled function is equivalent to calling the Widget::GetWidgetState function and testing that the kWidgetDisabled state is not set.

A widget that is disabled does not receive input events, but it is still rendered, sometimes in a dimmed appearance depending on the type of the widget.

A widget may be implicitly disabled due to one of its predecessors in the widget tree having the disabled state. In this case, the WidgetEnabled function can still return true if the widget itself is not disabled, but the widget will still be unable to receive input events. You can quickly determine whether a widget is either explicitly or implicitly disabled by calling the Widget::GetGlobalWidgetState function and testing the kWidgetDisabled state.
See Also

Widget::EnableWidget

Widget::DisableWidget

Widget::GetWidgetState

Widget::SetWidgetState

Widget::WidgetVisible