9.4 Boxes

Boxes enable 1) to group a set of arrows by drawing a rectangle around them; 2) to express alternatives to the flow of the process; and 3) to add comments to the flow of the process. The first two use is by adding a set of arrows to the box, while in the third case no such arrows are added, making the box empty.

The syntax definition for boxes is as follows.

[box] entityname boxsymbol entityname [attr = value | style, ...]
{ element; ... };

The box symbol is optional at the beginning of the line. The boxsymbol can be ‘..’, ‘++’, ‘--’ or ‘==’ for dotted, dashed, solid and double line boxes, respectively.

As with arrows the two entity names specify the horizontal span. These can be omitted (even both of them), making the box auto-adjusting to cover all the elements within. If there are no elements within and you omit one or both entities the default is to span to the edge of the chart. Specifying the entity names therefore, is useful if you want a deliberately larger or smaller box, or if you specify an empty box. Contrary to arrows, you can use group entities when specifying a box. The box will then cover all member entities in that group. Specifying the leftmost or rightmost member entity instead of the group entity makes a difference only if the group entity is collapsed. In the former case the box may disappear, in the latter case it will not. See the example below.

ex73_cshex73

Boxes take attributes, controlling colors, numbering, text identation quite similar to arrows. Specifically boxes also have a label attribute that can also be shorthanded, as for arrows. For example: ..: Auto-adjusting empty box; is a valid definition. The valid box attributes are label, number, refname, compress, vspacing, color, text.*, line.*, shadow.* and fill.*. The latter specifies the background color of the box, while line.* specifies the attributes of the line around. Note that color for boxes is equivalent to fill.color. text.ident defaults to centering for empty boxes and to left identation for ones having content.

After the (optional) attributes list, the content of the box can be specified between braces ‘{’ and ‘}’. Anything can be placed into an box, including arrows, dividers, other boxes or commands. If you omit the braces and specify no content, then you get an empty box, which is useful to make notes, comments or summarize larger processes into one visual element by omitting the details.