pub enum Placement {
Below,
Center,
Tooltip,
Left,
Right,
Bottom,
Selection,
Beside,
}Expand description
Where to place the overlay relative to its anchor, or to the window.
Variants§
Below
Just below the anchor (a dropdown menu).
Center
Centred in the window, with a scrim (a modal).
Tooltip
Above the anchor, only while the anchor is hovered (a tooltip).
Left
A full-height panel against the left edge of the window, with a
scrim (a side drawer). See crate::Drawer.
Right
A full-height panel against the right edge of the window, with a
scrim (a side drawer). See crate::Drawer.
Bottom
A full-width panel against the bottom edge of the window, sliding up,
with a scrim (a modal sheet). See crate::BottomSheet.
Selection
Centred on the anchor and above it, or below it — clear of the handles that hang
there — when there is no room above; held inside the window. The bar over a text
selection (see crate::ToolbarItem), whose anchor is the selection’s box rather
than a widget’s.
Beside
Beside the anchor, on its end side, tops level: a submenu opening from its row (milestone 603). Where the window has no room there, it opens on the start side.