pub trait PopoverModifiers: Sized {
// Required methods
fn placement(self, placement: impl Res<Placement> + 'static) -> Self;
fn show_arrow(self, show_arrow: impl Res<bool> + 'static) -> Self;
fn arrow_size<U: Into<Length> + Clone + 'static>(
self,
size: impl Res<U> + 'static,
) -> Self;
fn should_reposition(
self,
should_reposition: impl Res<bool> + 'static,
) -> Self;
fn on_blur<F>(self, f: F) -> Self
where F: 'static + Fn(&mut EventContext<'_>);
}Expand description
Modifiers for configuring Popover behavior and positioning.
Required Methods§
Sourcefn placement(self, placement: impl Res<Placement> + 'static) -> Self
fn placement(self, placement: impl Res<Placement> + 'static) -> Self
Sets the position where the popup should appear relative to its parent element.
Defaults to Placement::Bottom.
Sourcefn show_arrow(self, show_arrow: impl Res<bool> + 'static) -> Self
fn show_arrow(self, show_arrow: impl Res<bool> + 'static) -> Self
Sets whether the popup should include an arrow. Defaults to true.
Sourcefn arrow_size<U: Into<Length> + Clone + 'static>(
self,
size: impl Res<U> + 'static,
) -> Self
fn arrow_size<U: Into<Length> + Clone + 'static>( self, size: impl Res<U> + 'static, ) -> Self
Sets the size of the popup arrow, or gap if the arrow is hidden.
Sourcefn should_reposition(self, should_reposition: impl Res<bool> + 'static) -> Self
fn should_reposition(self, should_reposition: impl Res<bool> + 'static) -> Self
Set to whether the popup should reposition to always be visible.
Sourcefn on_blur<F>(self, f: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
fn on_blur<F>(self, f: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
Registers a callback for when the user clicks off of the popup, usually with the intent of closing it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.