Layout
A layout is a descriptive way to arrange the screen with multiple widgets.
It is based on a custom YAML language.
It is compound by components
, containers
, and hardware
components.
Layout language
A layout is a tree of component
.
Each component
have it's own JavaScript description, and the list of available
components can be extended.
Depending on the type of the component
, a set of key can be defined
to custom its display or behavour.
A container
is a special component which contain sub components
in a key children
.
Another common component is the hardware
or hardwaregroup
. It contains
an id
or ids
to define the object name to display.
Example
A simple layout definition is shown below:
name: Simple Layout
description: A simple layout
children:
- type: row
children:
- type: col
children:
- type: scantable
title: Scans
- type: col
children:
- type: hardware
title: Diffractometer2
id: omega
step: 90
steps: [45, 90, 180]
It describe a table with a single row and 2 columns.
The first cell contain a scantable
and the second cell display the omega
hardware.
step
and steps
custom the behavour of the widget.
List of containers
For informative purpose.
List of components
For informative purpose.