Next: , Previous: , Up: Reference for Common Language Elements   [Contents]


8.9 Chart Designs

A chart design is a collection of color, style and procedure definitions and values of certain chart options. For signalling charts the value of the hscale, numbering, compress, vspacing, text, background and comment options are included. For numbering you can turn it on or off and specify the format of the top level number - but you cannot specify multiple levels. For block diagrams the background and the conflict_report chart options can be made part of designs.

Note that color, style and procedure definitions are local to a scope (take effect only within) and can be stored in designs. Shape and design definitions on the other hand are global and as such can not be added to designs.

Except for graphs, we differentiate are full designs and partial designs. A full design contains a value for all the chart options, default colors and styles. A partial design contails values only for some of these. E.g., the thick_lines design is a partial one - it merely makes all lines of width 2 in all the default styles, but leaves color, line type, fill or any other attribute or chart option unchanged.

In signalling charts you can apply a full style using the msc = <design_name> chart option and a partial style using msc += <style_name>. For graphs and block diagrams use usedesign <design_name> (for all designs). Note that it is best to apply a full design at the first line of the chart, as any chart option specified before it will likely be overwritten by applying a full design. You can apply a full or partial design inside any scope, the effect will last only whithin the scope.

Currently the following partial designs ship with Msc-generator for signalling charts: hcn, thick_lines, all_blue, feng_shui_notes. The first one simply sets hscale to auto and turns on compression and numbering. The second one makes lines of all default styles of width 2. The third makes the color of lines in all default styles blue. The last makes notes rounded and red on yellow background. Block diagrams have the same, except hcn. Try them.

You can define or re-define chart designs by using the syntax below.

defdesign designname {
   [ msc=parent design | usedesign parent design ]
   [ msc+=partial design | usedesign partial design]
   options, ...
   color definitions, ...
   style definitions, ...
   procedure definitions, ...
}

First you can name an existing full design to inherit from using the ‘msc=’ option or via ‘usedesign parent design’. If specified the design will become a full design, too. Thus in each such design definition the default styles are always present and fully specified. If omitted, the style will become a partial style. Then you can specify optional multiple ‘msc+=’ or ‘usedesign’ options to bring in partial designs. Finally, you can define colors, styles and procedures in any order and/or set one or more of the attributes mentioned above.

It is possible to add your design definitions to a file having the .signalling, .graph or .block extension and making them available in all charts for use. See Design Library.


Next: Defining Shapes, Previous: Defining Styles, Up: Reference for Common Language Elements   [Contents]