Skip to main content

Module bar

Module bar 

Source
Expand description

The selection overlay’s own policy: which verbs it carries, in what order, where the row ends and the overflow begins, and where the bar stands over the diagram.

None of it is a drawing. Two front ends that decided any of this themselves would offer two different bars over one selection, so it is decided once, here, and each of them only paints the answer.

Enums§

Bar
What the bar shows for one selection: the one list, in the order the row, the overflow and the right-click menu all read.

Constants§

CLEAR
The air between the selection’s bounding box and the bar.
INLINE_CONTROLS
How many controls the bar’s row holds. A selection offering more shows this many and puts the rest behind the ellipsis; one offering this many or fewer has no ellipsis at all.

Functions§

clamp
rect moved — never resized — until it lies inside region. A rect too big for the region aligns to the region’s top left, so what overflows is the far edge rather than the near one.
nothing_to_say
What a selection with no commands says, rather than raising no bar at all.
place
Where a bar of size stands over a selection of sel, inside region — the part of the viewport the front end’s chrome leaves clear.