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>
Source§impl<'a> PopoverScope<'a>
impl<'a> PopoverScope<'a>
Source§impl<'a> PopoverScope<'a>
impl<'a> PopoverScope<'a>
Sourcepub fn on_motion_finished(
self,
handler: impl FnMut(MotionFinished) + 'static,
) -> Self
pub fn on_motion_finished( self, handler: impl FnMut(MotionFinished) + 'static, ) -> Self
Runs once when this node’s size motion comes to rest, with the size it settled
at in dp. The node needs Modifier::motion for its size to move; without it
nothing is reported. A run interrupted by a newer size is not reported, only
the one that settles, and under reduced motion it arrives in the frame the
size changes in.