pub struct FloatingBuilder { /* private fields */ }Expand description
Builder for configuring floating element properties using a closure.
Implementations§
Source§impl FloatingBuilder
impl FloatingBuilder
Sourcepub fn anchor(
&mut self,
element: (AlignX, AlignY),
parent: (AlignX, AlignY),
) -> &mut Self
pub fn anchor( &mut self, element: (AlignX, AlignY), parent: (AlignX, AlignY), ) -> &mut Self
Sets the attachment points of the floating element and its parent.
Each tuple is (AlignX, AlignY) — the first for the element, the second for the parent.
ⓘ
.floating(|f| f.anchor((CenterX, Bottom), (CenterX, Top)))Sourcepub fn attach_parent(&mut self) -> &mut Self
pub fn attach_parent(&mut self) -> &mut Self
Attaches this floating element to its parent element (default behavior).
Sourcepub fn attach_root(&mut self) -> &mut Self
pub fn attach_root(&mut self) -> &mut Self
Attaches this floating element to the root of the layout.
Sourcepub fn attach_id(&mut self, id: impl Into<Id>) -> &mut Self
pub fn attach_id(&mut self, id: impl Into<Id>) -> &mut Self
Attaches this floating element to a specific element by ID.
Sourcepub fn clip_by_parent(&mut self) -> &mut Self
pub fn clip_by_parent(&mut self) -> &mut Self
Clips this floating element to its parent’s bounds.
Sourcepub fn passthrough(&mut self) -> &mut Self
pub fn passthrough(&mut self) -> &mut Self
Sets pointer capture mode to Passthrough.
Auto Trait Implementations§
impl Freeze for FloatingBuilder
impl RefUnwindSafe for FloatingBuilder
impl Send for FloatingBuilder
impl Sync for FloatingBuilder
impl Unpin for FloatingBuilder
impl UnsafeUnpin for FloatingBuilder
impl UnwindSafe for FloatingBuilder
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