Skip to main content

PopoverModifiers

Trait PopoverModifiers 

Source
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>(self, size: impl Res<U> + 'static) -> Self
       where U: Into<Length> + Clone + 'static;
    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§

Source

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.

Source

fn show_arrow(self, show_arrow: impl Res<bool> + 'static) -> Self

Sets whether the popup should include an arrow. Defaults to true.

Source

fn arrow_size<U>(self, size: impl Res<U> + 'static) -> Self
where U: Into<Length> + Clone + 'static,

Sets the size of the popup arrow, or gap if the arrow is hidden.

Source

fn should_reposition(self, should_reposition: impl Res<bool> + 'static) -> Self

Set to whether the popup should reposition to always be visible.

Source

fn on_blur<F>(self, f: F) -> Self
where 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.

Implementors§