Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Gtk+/Gnome Application Development
Prev Home Next

Widget States

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.

#include <gtk/gtkwidget.h>

GTK_WIDGET_STATE(widget);

Figure 27. State Accessor

Gtk+/Gnome Application Development
Prev Home Next

 
 
  Published under free license. Design by Interspire