Expand description
Open-state and close-behavior controller for anchored popups.
Popup is a small, content-agnostic controller: it owns the open flag,
the anchor rectangle, the RectAlign placement, the pixel gap, and the
PopupCloseBehavior. A host widget drives it — feeds the anchor and the
measured content size, asks for the placed rect to paint, and forwards mouse
events so the controller can apply the close behavior.
This deliberately does not re-implement overlay painting, hit testing,
keyboard navigation, or submenu cascades — the menu system
(super::super::menu) already owns all of that. When a popup needs rich
nested-menu content, host it with a PopupMenu,
which reuses the whole menu machinery. Popup adds the one thing the menu
system can’t express on its own: arbitrary RectAlign placement plus a
selectable close behavior.
Structs§
- Popup
- Controller for a single anchored popup surface.
- Popup
Click Outcome - What a forwarded mouse-down did to a popup.
Enums§
- Popup
Close Behavior - When a popup should dismiss itself in response to clicks. Mirrors egui’s
PopupCloseBehavior.