Expand description
The selection overlay, anchored to what is selected, and the two pickers
it opens (docs/cad-ui-spec.md §3).
The most important component in the application, and the most
input-agnostic: identical with mouse, trackpad, touch and pen. Which verbs
it carries, in what order, where the row ends and the overflow begins, and
where the bar stands are all [blockworx_kernel::bar]’s — so this bar and
the desktop’s are one bar drawn twice.
It is glass floating over the middle of the diagram, so it takes nothing off the safe region: a framing may pass under it, since glass is not a wall.
Re-exports§
pub use SelectionOverlay_completions::Component::SelectionOverlay;
Structs§
- Control
Props 🔒 - Properties for the
Controlcomponent. - Overflow
Props 🔒 - Properties for the
Overflowcomponent. - Pickers
Props 🔒 - Properties for the
Pickerscomponent. - Selection
Overlay Props - Properties for the
SelectionOverlaycomponent. - Sheet
Props 🔒 - Properties for the
Sheetcomponent.
Constants§
- BAR 🔒
- What the bar measures out to before it has measured itself. The DOM tells us the real size on the frame after, and the placement re-runs; this only decides where the first paint lands, so it is the bar’s own metrics rather than a guess: a 44 px row with 5 px of margin either side.
- CELL 🔒
- One cell of the bar.
- GAP 🔒
- The air between the bar’s top edge and the picker above it.
- GLASS 🔒
- The bar’s own shell: floating chrome, so a shadow and a large radius.
- SHEET 🔒
- How big a picker’s sheet is: three swatches and their gaps, plus the sheet’s own padding. Both pickers fit inside it — the I/O row is three cells wide and one tall.
- TAKEN 🔒
- The direction the pins already face, which is the one cell drawn filled.
Functions§
- Control 🔒
- One verb. The two that open a picker wear the reading the picker will show — the accent’s own colour, the pins’ shared direction — so what a press leads to is legible before it is pressed.
- Overflow 🔒
- The verbs past the row’s fill, behind one control that opens them as a menu. Order stays stable regardless of which verbs overflowed.
- Pickers 🔒
- Whichever picker the bar’s controls opened, anchored to the bar’s own top right and clamped into the same room the bar is, so a bar near the top of the diagram does not push its picker off the page.
- Selection
Overlay - Props
- Sheet 🔒
- A picker’s own sheet: the grid, and the backdrop that dismisses it. The backdrop is what makes a click away a cancel without a frame’s delay — the press that opened the picker is over by the time it exists.
- pin_
dir_ 🔒hover - What the I/O control says, which is where the state lives: one glyph in every state, so the cell is the same shape whatever the pins are facing.
- sized 🔒