Widgets have states which
determine their appearance:
-
Normal: just like it
sounds.
-
Active: a button is
currently pressed in, or a check box is currently
checked, for example.
-
Prelight: the mouse is
over the widget (and typically clicking would have
some effect). Buttons "highlight" when you move
over them, for example.
-
Selected: the widget is in
a list or other set of alternatives, and is the
currently selected option.
-
Insensitive: the widget is
"ghosted," inactive, or unresponsive; it will not
respond to input.
The exact meaning and visual representation of a given
state depends on the particular widget and the current
theme. You can access the state of the widget GTK_WIDGET_STATE() (Figure 27). This macro
returns one of the constants
GTK_STATE_NORMAL,
GTK_STATE_ACTIVE,
GTK_STATE_PRELIGHT,
GTK_STATE_SELECTED, or
GTK_STATE_INSENSITIVE.