Disabled widgets
----------------

Disabled widgets are widgets that does not react to user input and are "grayed
out" in the GUI. Once widget is disabled all its subwidgets are disabled as
well.

image:widgets_disable.png[Disabled widget]

.Functions to disable and enable widgets
[source,c]
-------------------------------------------------------------------------------
void gp_widget_enable(gp_widget *self);

void gp_widget_disable(gp_widget *self);

void gp_widget_disable_set(gp_widget *self, bool disable);
-------------------------------------------------------------------------------

.Function to return widget disabled state
[source,c]
-------------------------------------------------------------------------------
bool gp_widget_disabled(gp_widget *self);
-------------------------------------------------------------------------------

Note that this function returns true only if particular widget is disabled
explicitly. It will return false for child widgets that are disabled because
of parent widgets have been disabled.

.Example
[source,c]
------------------------------------------------------------------
include::../demos/widgets/disable.c[]
------------------------------------------------------------------
