pub enum Anchor {
TopLeft,
TopCenter,
TopRight,
CenterLeft,
Center,
CenterRight,
BottomLeft,
BottomCenter,
BottomRight,
}Expand description
Compass-rose anchor for Context::overlay_at / Context::modal_at.
Each variant maps to a (cross-axis Align, main-axis Justify) pair
that pins overlay content to the requested screen position. The _at
helpers expand to a full-screen wrapper (so flexbox has slack to push
against), then place the user’s content per the selected anchor.
ui.overlay_at(Anchor::BottomRight, |ui| {
ui.text("v0.19.3").dim();
});Variants§
TopLeft
Top-left corner.
TopCenter
Top edge, horizontally centered.
TopRight
Top-right corner.
CenterLeft
Left edge, vertically centered.
Center
Screen center.
CenterRight
Right edge, vertically centered.
BottomLeft
Bottom-left corner.
BottomCenter
Bottom edge, horizontally centered.
BottomRight
Bottom-right corner.
Trait Implementations§
impl Copy for Anchor
impl Eq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl Freeze for Anchor
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnsafeUnpin for Anchor
impl UnwindSafe for Anchor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more