COGENT Online
CONTENTS
COGENT Version 2.2 Help

Compound

Introduction

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 sub-canvas 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.

Subtypes of Compound

There are two sub-classes of compound: Compound/Generic and Compound/Subject. The boxes are distinguished diagrammatically by the letter G or S in the top-right corner of the compound icon. Generic compounds may contain boxes of any type, and place no restrictions on the contents of those boxes. Subject compounds may only contain boxes that make sense within a model of a subject (participant). For example, data boxes and generic compounds may not occur within a subject compound (although another subject compound may occur). Certain built-in conditions are also not accessible from subject compounds (e.g., statistical functions). Subject compounds are meant to provide a small degree of constraint on the development of cognitive models within COGENT. If a user doesn't like the restrictions that subject compounds enforce, then they may simply use generic compounds in preference to subject compounds.

Properties

The behaviour of compound boxes is fully determined by the behaviour of the boxes contained within them. They have no class-specific properties.

Operations on the Contents of Compound Boxes

COGENT provides facilities to cut and paste boxes between compounds (just as you can cut and paste sub-objects between any pair of COGENT 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. The cut box will be placed on COGENT's clipboard, from where it may be pasted into a compound sub-box. Similarly you can cut a box from a compound sub-box and paste it onto the main canvas. In these situations, COGENT will attempt to be as intelligent as possible about restoring 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.

Cutting and pasting from one compound to its parent or vice versa is facilitated by the Promote and Demote items on the menu that pops up when you right-click on a box. These functions allow moving of boxes between compounds without invoking the clipboard. More extensive operations (e.g., "rubber-banding" a set of boxes and transforming them into a compound, or "exploding" a compound, so that all boxes within it return to its parent) may be introduced in future versions of COGENT.

The Box and Arrow Editor

The box and arrow editor allows the user to create and edit box and arrow diagrams. 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 page. Its use is very straightforward: to add a box to the diagram, simply left-click on the appropriate box type on the palette, move the mouse pointer to the intended location on the canvas and left-click again. The new box should appear at the selected location. To add arrows, left-click on the selected arrow type, then left-click on the box from which the arrow will lead, and drag the mouse to the box where it should terminate. Then release the mouse button. An arrow of the selected type will appear, linking the boxes.

Boxes may be opened by double-clicking on them with the left mouse button, and may be moved by dragging them with the left button held down. Clicking on diagram elements with the right mouse button pops up a context-dependent menu, which allows boxes to be opened, printed, cut (deleted), pasted, copied, promoted or demoted, and also permits changing the box's class via a set of sub-menus. 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, and existing arrows may be redirected or spliced in two by middle-clicking on one end and dragging to another box, or by middle-clicking near the middle of an arrow and dragging to another box.

To name or comment a box it is necessary to first open it in edit mode. Text may then be typed into the Name or Brief Description fields near the top of the window.


COGENT Online
CONTENTS
COGENT Version 2.2 Help