pub struct PopoverScope<'a> { /* private fields */ }Expand description
A Popover and its builder.
Implementations§
Source§impl<'a> PopoverScope<'a>
impl<'a> PopoverScope<'a>
Sourcepub fn on_dismiss(self, handler: impl FnMut() + 'static) -> Self
pub fn on_dismiss(self, handler: impl FnMut() + 'static) -> Self
Called once when the user presses outside the box or presses Escape.
Sourcepub fn placement(self, placement: PopoverPlacement) -> Self
pub fn placement(self, placement: PopoverPlacement) -> Self
The side of the anchor the box opens on. Bottom when it is not said.
Sourcepub fn align(self, align: PopoverAlign) -> Self
pub fn align(self, align: PopoverAlign) -> Self
The edge of the anchor the box lines up with. Start when it is not said.
Sourcepub fn offset(self, dp: f32) -> Self
pub fn offset(self, dp: f32) -> Self
The gap between the anchor and the box, in dp. The design system’s gap when it is not said.
Sourcepub fn scrim(self, scrim: bool) -> Self
pub fn scrim(self, scrim: bool) -> Self
Whether the window behind the box is dimmed while it is open. It is not, unless asked.
Sourcepub fn scrim_color(self, paint: impl Into<Paint>) -> Self
pub fn scrim_color(self, paint: impl Into<Paint>) -> Self
Dims the window behind the box with this colour instead of the design system’s.
Source§impl<'a> PopoverScope<'a>
impl<'a> PopoverScope<'a>
Trait Implementations§
Source§impl<'a> Drop for PopoverScope<'a>
impl<'a> Drop for PopoverScope<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PopoverScope<'a>
impl<'a> !Send for PopoverScope<'a>
impl<'a> !Sync for PopoverScope<'a>
impl<'a> !UnwindSafe for PopoverScope<'a>
impl<'a> Forget for PopoverScope<'a>
impl<'a> Freeze for PopoverScope<'a>
impl<'a> Move for PopoverScope<'a>
impl<'a> Unpin for PopoverScope<'a>
impl<'a> UnsafeUnpin for PopoverScope<'a>
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