Next: , Up: GUI



7.1 GUI Overview

The aim of VRR 's GUI is to provide a simple and easy-to-use graphic interface without lots of buttons or complicated windows. We have also tried to minimize the number of pop-up modal windows; most messages are output into a status bar instead of opening a message window.

As the whole program is written in the C language, we decided to create the GUI using the GTK. However, like the rest of VRR source code, the GUI prefers our own data types and data structures defined in VRRLIB to those of GObject and GLib (for effectivity and uniformity reasons). See VRRLIB for description of VRRLIB.

The GUI contains several windows (mostly independent on each other) and several high-level mechanisms: the Command Structure and the GO Factory. The Command Structure defines the structure of all menus and toolbars, generates and maintains menus and toolbars and for each command it controls and evaluates the conditions under which it can be activated. The GO Factory is a mechanism similar to a finite automaton which creates new graphic objects. (They are described in more detail in the following sections.)

The source code of GUI consists mainly of callbacks for GTK signals and our kernel hooks (see Hooks). The purpose of kernel hooks is to inform (via callbacks) other parts of VRR about data structure changes and other actions. Almost no copy of kernel data structures is kept in GUI; editing actions are performed on kernel data directly. Windows displaying the same data are informed about data updates by kernel hooks as well.