Workbench

The workbench is the central working area of OpenCAGE. All commands that do not pertain to a certain graph window are collected here.

Motivation

Mechanics

Figure 5-8. UML Class diagram: Workbench

UML Class diagram: Workbench

UML Class diagram: Workbench

The workbench has a modular design. It consists of GUI_Elements, that are combined in a window. The order and existance of the implemented elements can be configured in the XML file.

The workbench display itself is created by the Workbench_Factory, which traverses the XML nodes and creates the elements accordingly.

At the moment, these elements are implemented:

Menu

A menu bar. This class reads the menu information from the given XML node. Every time a top-menu is clicked, the controller asks all command factories for the sub-menu commands, if they are executable and updates the sensitivity accordingly.

If a menu item is clicked on, the command factory is asked to create a new command. The command is then given to the command pipe.

Bar, Icon_Bar

A Bar is a container Widget. The only element that can be instantiated in it is a Icon_Bar. The Icon_Bar shows a bar of icons, which issue commands if clicked. There are two different flavours: the normal and the toggle mode. In toggle mode, the button stays in clicked position. The current implementation of toggle mode is hard-wired to react to state model changes.

Therefore, the Icon_bar holds an observer at the State_Model. A second observer is attached at the Graph_Factory, so every time a graph is loaded or closed, the command factories are asked if they can execute and the button sensitivity is changed accordingly.

Status_Bar

The status bar shows the number of selected nodes in the currently focused window. Therefore it holds observers at the Window_Master_Model, at the State_Model and at every Display_Controller.