GNU/Linux Desktop Survival Guide
by Graham Williams
Together with the GTK toolkit Gnome provides an extensive collection of user interface building blocks called widgets. These are components like text fields, labels, numeric entries, check buttons, menus, and so on.
In your programming language of choice you access these widgets to compose a graphical user interface for your application. This often involves careful programming to place your widgets correctly and to associate code with actions that are performed on the widget (such as clicking on a button).
Glade simplifies this task by providing a GUI-based GUI-builder. With Glade you choose widgets from a graphical palette of available widgets and place them onto your evolving application window (the canvas). You edit the properties associated with the widgets through another graphical interface where you also add the appropriate connections between your widgets and externally written code. This is done by identifying the names of functions that will be called when a widget receives a signal. For example, you can associate a function that you might call on_button1_clicked with the “clicked” signal associated with a button). These functions (callbacks) you code up in your programming language of choice, whether that be C, C++, Ada95, Python, Perl, or Eiffel.
When you are happy with how the interface looks you will either generate the source code that implements the interface you have created or else you will use a library () that directly loads the saved description of the interface at run time and dynamically creates it.
Your main coding task is to write your callbacks (the functionality behind the interface) and the associated support functions.