Previous Next

Graphical Interface Development with Glade2

Author: Rikke D. Giles, copyright Rikke D. Giles 2003

A Quick Tour of Glade

The Glade Interface

The Main Window

The main window will be similar to what you see to the right. It is where you specify the options for your project, save the project, load a project, and build the project. It also includes a listing of each separate window you have built for your application.

The Project menu contains self-explanatory entries. The edit menu is the same. With the views menu you can open several windows to give access to different aspects of your project. Glade automatically opens the Palette and Properties windows when it starts. It is helpful to have the Widget Tree window open as well.

The settings menu lets you change different aspects of Glade. It's best to experiment with these to find out which you prefer. Finally the help menu should be self-explanatory.

Glade2: Main Window
 
 
The Palette Window
Glade Palette The Palette contains the arrays of widgets which Glade can use. There are several different 'pages' of widgets, accessible by clicking on the different buttons labeled 'Gtk+ Basic', 'Gtk+ Additional', Gnome' and 'Deprecated'. The deprecated page contains widgets which are being withdrawn, these include the old Gtk1 style list and tree widgets, and various redundant Gnome Widgets.

Depending upon the installation of Glade, you might find other pages of widgets available. If Glade has been installed with customized widgets, there will be pages of these. If it has been installed with Gnome-DB support, there is an extra Gnome-DB page.

A widget is selected by clicking on it in the palette and then clicking again on the spot where you wish to add it to the application interface you are building. You must start building by choosing a window to contain the other widgets you might want.

 
 
The Properties Window
The Properties window is where you can adjust and set the properties of the various widgets in your application. Here you should probably at least give each major input/output widget a name. You can also set default sizes, decide whether a widget is editable or not (if it is a text type widget), decide if it's 'sensitive' to mouse clicks, change the sizes of container widgets and so on. You can also set titles and headers for each widget.

There are several notebook tabs in this window: Widget, Packing, Common, Signals and Accessibility (as given by the international symbol for handicapped). The specifics under each tab change with widget type, so they will not be detailed here. Under Widget you can set the name and basic look of the widget. Packing lets you move widgets around in the container widgets, and set how they expand and contract with changes in window size. Common allows more specific parameters to be set, for instance if you must have a fixed size window, and so on. Signals is an important tab, as this is where you set the callback function or signal handler for each signal event you wish to capture. The accessibility tab is new with Glade2 and allows you to set parameters which will then comply with the Gnome accessibility guidelines. This makes it much easier for your application to be used with voice synthesizers, etc.

The Properties WIndow
 
 
The Widget Tree Window
Glade Widget View The widget tree is accessible from the view menu in the main window. It lists all the widgets you've used in your application, their names, and gives a dependency tree. Right clicking on any widget in the tree allows you to select it, any of its parents, cut it, copy it, delete it, etc. This is an easy way to move widgets around if the application requires rebuilding, without redoing all the names, signal handlers, sizing options and so on. Note however, that if you copy a widget from one place to another, the copy will have default names and values. This is because each widget must have an unique name.
 
 

Previous Next