A compound box is a box which contains a set of other boxes. Compound boxes allow a set of boxes to be bracketed as a single functional unit. They behave in the same way as all other boxes when they are being drawn and manipulated, but can be opened to reveal a new subcanvas on which further boxes may be drawn. The set of boxes which comprise the compound may be drawn on this canvas in exactly the same way as boxes were drawn on the compound's parent canvas.
Any model can actually be thought of as a compound box, and opening a compound reveals a new canvas much like the main canvas. However, the canvas associated with a compound differs from the main canvas in one important way: it contains "virtual" boxes, drawn with dotted lines, representing those boxes to which the compound is externally linked. Arrows may be drawn to and from these external objects, enabling boxes within the compound to communicate with those outside of it.
There are several things which you might want to do with compounds but which cannot as yet be done. It is not possible, for example, to "rubber-band" a set of boxes and transform them into a compound. Conversely, it is not possible to "explode" a compound, so that all boxes within a compound return to the compound's parent. However, it is possible to cut and paste boxes between compounds (just as you can cut and paste subobjects between any pair of boxes of the same class). Since the main canvas on which a model is drawn is actually a compound, this facility means that you can cut objects from the main canvas and place them in a compound, or you can cut them from a compound and place them on the main canvas. In these situations, COGENT will attempt to be as intelligent as possible about any arrows between boxes. This intelligence includes reconstructing arrows were possible. Thus, if a box on the main canvas is deleted and pasted onto a compound, COGENT will automatically create arrows to the compound from any boxes which originally pointed to the deleted box. These arrows will appear both on the main canvas and on the compound's canvas.
The box/arrow editor allows the user to create and edit box/arrow diagrams, so if the compound box has been opened in Edit mode, there will be a palette of all available object and arrow types, at the bottom of the Diagram window. Its use is very straightforward: to add a box to the diagram, simply left-click on the appropriate box type on the palette, which will cause it to be highlighted, then move the mouse pointer to the intended location on th canvas and left-click again. The new box should appear at the selected location. To add arrows, left-click on the selected arrow type to highlight it, then left-click on the box from which the arrow will lead, and finally on the box where it should terminate. An arrow of the selected type will appear, linking the boxes.
Boxes can be opened by double-clicking on them with the left mouse button, and can be moved by dragging them with the left button held down. Clicking on diagram elements with the right mouse button pops up a context menu, which allows boxes to be Deleted, Printed, Copied or Opened, and also permits changing the box's class via a set of submenus. Right-clicking on the canvas permits objects to be pasted, if any objects have been deleted in the current session; otherwise all options are greyed out. Right-clicking on an arrow pops up a menu which provides options to Delete the arrow, to toggle its type (read or send), or reverse its direction. Finally, on systems with a middle mouse button, arrows can be created by dragging with the middle button from the source box to the destination box.
Boxes can be labelled by opening them, and editing the name field at the top of the box's main window.