Placement of sections and Movements

Dimension parameters determine the dimensions with which a $SECTION, $GROUP, $LINE can appear on the screen.   The different dimension parameters are always interconnected with each other, for example, the possible number and position of lines is calculated on the basis of the dimension parameters ABOVE, IMGY, BELOW, MINSPACE

Placement parameters are a request, how (where) to place the block inside the parent section. It is valid as a general strategy: if there is plenty of room, Traffic fulfills the requests, how to place the block. If there is little space, to whole block will be positioned, that it fits inside. And if there is not enough space (not event the requested area fits into the parent section), Traffic still tries to place the block to show the movements.

There is a core area - the stripe, where the movement takes places and a single pixer row below and above it (or, for a $SCENE with multiple $PATH-es on different vertical positions: all the movement stripes and the additional single pixel height rows below and above them). If the core area cannot be shown - the vertical space is not enough high to contain it -, then the movement/$SCENE will be skipped. If the core area fits into the vertical place inside the parent section, it will be placed so, that the whole vertical area will be used, and possibly the core area comes into the middle.

$SECTIONs can contain several blocks: several $SECTIONs/$GROUPs/$SCENEs/Movements inside them. When some blocks are already placed and running, and the next block requests more vertical space, as available at the moment, but the core area fits into the remaining space, Traffic prefers to wait some of the running blocks to terminate, and places the next block, when more space is available. The child blocks will be truncated only, if they do not fit into the parent $SECTION even if they are alone inside it, otherwise they wait some - or all - previous child blocks to terminate.

The parameters for the dimensions and placement are:

WIDTH=; The maximal width of the movement/section/scene. If there is more space in the parent section, only the given width will be used. If there is less space, all available space will be used, there is no minimum width below which the section (together with the contained movements, other section) will be omitted.
for Movements and $GROUPs:
IMGY=; Specifies the height in pixels of the core stripe, where the vehicles move. In Traffic, only this area is able to move a vehicle: if a large scale vehicle stands out from this area, the upper part will but cut off, the movement takes place only in the stripe with the given height.
ABOVE=; Specifies the maximal height in pixels above the stripe, where the vehicles move. This area belongs to the movement, background and foreground elements can be placed there (catenary, sky, buildings etc.). If there is not enough place in the parent section, the areas above and below the core stripe will be lowered, but a single pixel height have to remain - otherwise the movement does not fit into the parent section.
BELOW=; Specifies the maximal height in pixels below the stripe, where the vehicles move. This area belongs to the movement, background and foreground elements can be placed there (trackbad, rail, road, vegetation etc.). If there is not enough place in the parent section, the areas above and below the core stripe will be lowered, but a single pixel height have to remain - otherwise the movement does not fit into the parent section.
for $SECTIONs and $SCENEs:
HEIGHT=; Specifies the maximal height of $SECTION or $SCENE. If there is more vertical space, than this section occupies only the given space, if there is less, the $SECTION will be started despite of the lack of vertical space - but possibly not all the movements and $SCENEs are able to run in it, they will be skipped.
Placing the sections inside the parent $SECTION:
TOP=; The requested vertical position inside parent section. Beside integer values meaning pixels measured from the top side of the parent section the parameter request alignment to the top, middle or bottom of the containing space.
LEFT=; The requested horizontal position inside the parent section, or an alignment character. Horizontally also applies: showing the whole requested area, or at least so much, as fits into the parent section takes precedence over the requested fixed position.
Distributing child $SECTIONs/$GROUPs/$SCENEs/Movements inside a $SECTION:
MAXLINE=;
MINSPACE=; Minimal vertical space between the blocks inside a $SECTION in pixels.
Last edited: 2023-02-13 12:57:48