Layout
Overview
The layout of Screenbar panels is defined by a hierarchy of widgets, each of
which is identified by a string which is also the prefix of all its options.
Every element must have a type, given as (prefix)Type; this defines what the
element does and looks like and what other options are available, and it is an
error to use an element without defining its type. The following options are
available for all elements, regardless of type:
Element Types
The element types are
-
One of several children depending on a boolean expression
-
A series of elements arranged in sequence, optionally with copies
for each desk or each task within a desk
-
A set of elements named in (prefix)Elements drawn on top of
eachother.
-
The icon that belongs to the context task.
-
A text label with either a fixed string, the context desk's number,
or the context task's window title.
-
A minimap of the context desk with all its windows.
-
A child module
-
null
An empty placeholder for an element
-
A scaled screenshot of the window(s) of the context task
-
A start button
-
A button or decoration with an image or draw effect
Positioning
Flow, icon, minimap, module, start, and texture elements take options for
position. This can either be an X, Y, Width and Height, or an aspect ratio.
(prefix)UseAspectRatio [bool]
Default: false
(prefix)AspectRatio [float]
Default: 1.0
If (prefix)UseAspectRatio is true, this element is positioned with an
aspect ratio, which is its width divided by height. It will either be
full-height or full-width, depending on the context in which it appears,
and its aspect ratio will be as given in (prefix)AspectRatio.
(prefix)X [coord]
Default: 0
(prefix)Y [coord]
Default: 0
(prefix)Width [coord]
Default: -0
(prefix)Height [coord]
Default: -0
(prefix)MinLength [int]
(prefix)PreferredLength [int]
Default: 0, 0
Sets minimum and preffered lengths for this element, used to determine how
much space is allocated for it in a flow element. Note that if width or
height (depending on whether it's a horizontal or vertical flow) is greater
than MinLength, that is used instead.
Common Options
(prefix)Type
Mandatory setting
The element's type. See below for a listing of allowed types.
(prefix)On(Button)Press [command]
(prefix)On(Button)Release [command]
(prefix)On(Button)Click [command]
Default: none
Button is one of "Left", "Middle", or "Right". OnPress commands run when
the mouse is pressed, and OnRelease commands when it's released. OnPress
and OnRelease commands run independently of (and in addition to) drag and
drop. OnClick commands run when the button is released, but only if the
same thing is under the mouse as when the click started, and no drag/drop
has taken place. If the command given is a Screenbar bang command,
'clicked' is a valid desk/task description.
(prefix)Draggable [bool]
Default: false
Whether this element can be picked up and dragged around. In general, it is
best for draggable elements to be as close to the top of the hierarchy as
possible; in particular, draggable elements should not be the child of
branch elements, since if conditions change and the dragged element no
longer exists, the drag will be cancelled (possibly as soon as it begins!).
(prefix)DragPlaceholder [element]
Default: (prefix)
When this element is picked up and dragged, this is the element which stays
behind to fill its place.
(prefix)HoverGroup [bool]
Default: false
If set to true, hovering over this element causes all of its children to
count as being hovered.
(prefix)OnHover_(element) [command]
Default: none
What happens when a dragged (element) is hovered over this element. If this
is a Screenbar bang command, 'dragged' and 'hovered' are valid desk/task
descriptions.
(prefix)OnDrop_(element) [command]
Default: none
What happens when a dragged (element) is dropped on this element. If this
is a Screenbar bang command, 'dragged' and 'hovered' are valid desk/task
descriptions.
(prefix)IsMinimizeTarget [command]
Default: false
If this element corresponds to a task, it will be used as the target for
Windows' minimize/restore animation.
(prefix)ToolTip [element-name]
Default: ""
If set, hovering the mouse cursor over this element will cause the named
tooltip window to appear.