Expand description
The single overlay primitive: a generic popup driver plus the dimming backdrop shared by every modal, picker and overlay.
popup runs one blocking overlay. It dims the screen behind a centered
box (the underlying view stays visible but darkened), draws a caller-owned
box, and routes keys until the caller’s handler resolves. Every blocking
widget in this toolkit is a thin wrapper over it, so the loop/Clear/
centering scaffolding lives here once (SSOT) instead of in each widget.
Enums§
- Popup
Flow - What a popup key handler decides after each key.
Functions§
- dim
- Dims every cell currently in the frame toward black by
factor, preserving the drawn content.Rgbcells are darkened; cells with a non-Rgbforeground (which has no RGB base to scale) get the terminalDIMattribute. - framed
- Draws the shared rounded modal frame into
rectand returns the inner area for the caller’s content. Wrapsmodal_blockso the box chrome stays a single source of truth. - popup
- Runs one blocking popup and returns its outcome.