pub enum LayerPosition {
Absolute(Point),
Centered,
BottomAnchored,
BottomCenter,
AboveCentered(Rect),
Fill,
}Expand description
Where the overlay widget is placed in window-pixel space.
Variants§
Absolute(Point)
Top-left corner at this point. Widget chooses its own size.
Centered
Centered in the window. Widget chooses its own size.
BottomAnchored
Anchored to the bottom edge, full-width. Widget chooses height.
BottomCenter
Horizontally centered, floating 24px above the bottom edge (toasts).
AboveCentered(Rect)
Centered horizontally over the anchor rect, floating just above it (tooltips). The anchor is in the ATTACHING widget’s coordinate space — the engine remaps it to window space and clamps on-screen.
Fill
Fills the entire window.
Trait Implementations§
Source§impl Clone for LayerPosition
impl Clone for LayerPosition
Source§fn clone(&self) -> LayerPosition
fn clone(&self) -> LayerPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayerPosition
impl RefUnwindSafe for LayerPosition
impl Send for LayerPosition
impl Sync for LayerPosition
impl Unpin for LayerPosition
impl UnsafeUnpin for LayerPosition
impl UnwindSafe for LayerPosition
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