Draw a subgraph

A subgraph is constructed by drawing base objects in the working area and then save these as a
subgraph. You can also draw other subgraphs in the working area, but these can't have any
dynamics of its own, but will follow the dynamic of the main subgraph. There are two special
objects that are used in subgraphs: connection points and annotations.

Connection points makes it possible to draw connections between objects. They are created
by activating connection point in the tool panel and clicking MB1 in the working area. In the
object editor for the connection point you can state the direction (Direction) of the point,
i.e. the direction a connection out from the point will get. Connectionpoints on the left side
of an object should have Direction Left, on the upper side Up, on the right side Right and on
the lower side Down.

Annotation is a place for a text, that can vary for different instance of the subgraph. They
are created by selecting An in the tool panel and click with MB1 in the working area. When you
create instances of the subgraph, the annotations are displayed as attributes in the object
editor for the subgraphs object as A1, A2 etc., and you kan in this way put texts in the
annotations.

When the subgraph is ready you open 'File/GraphAttributes' and enter 1 in Subgraph. You can
also enter default values for dynamic type or action, e.g. DigLowColor. Then you save it with
a suitable name.

You create instances of the subgraphs by selecting it under the folder Local/Subgraphs in the
subgraph palette, and click with MB2 in the working area.

A subgraph with several pages

Some types of dynamic, e.g. animations, presume that you hava a subgraph with several pages.
When building an animation you create several pages that slightly differs from each other,
and the pages are run through, it gives an illusion of movement. The dynamic types DigShift
and AnalogShift also uses different pages, and shifts between pages depending on the value of
a digital or analog signal.

When to draw a subgraph with several pages, you draw the first page in the usual way. When
you have saved it as a subgraph, you activate 'File/Page/Create next page' (Shift+Ctrl/N).
Now the second page is created, which is marked in the title of the window. When the changes
on page 2 is drawn, this is saved and you again activate 'Create next page' to create the
third page etc.

You can shift between pages with 'File/Page/Next page' (Ctrl/N) and 'File/Page/Previous page'
(Ctrl+J). When drawing animations, this is a valuable way to see differences between pages and
evaluate how the animation works.

Slider

A slider is constructed with two separate subgraphs, one background, and one mobile part. The
slider should always be drawn vertically, i.e. with vertical movement direction.

For the background subgraph you measure the y coordinate for the endpoints of the slider
movement, and enter the values in the attributes y0 and y1 in 'Graph attributes'. As DynamicType
you state SliderBackground.

For the mobile subgraph you measure the y coordinate for the point that is to be adjusted against
the signal value, and put this in y0. The attribute Slider should be set to 1.

FillLevel

For a subgraph with dynamic FillLevel, e.g. a thermometer, you often want to set a minimum
and maximum limit for the level. By measuring the coordinates for the maximum and minium level
and put these in y0 and y1 in 'Graph attributes' you achieve this function. The subgraph should
always be drawn in an upright position, so that the level is changed up or down.

Animation

For subgraphs with dynamic Animation, you select a suitable AnimationSequence in 'Graph
Attributes'. AnimationSequence can be Cyclic, Dig or ForwBack.