Skip to main content

Popover

Struct Popover 

Source
pub struct Popover<'a, T> {
Show 13 fields pub state: &'a mut PopoverState, pub parent: Id, pub target_anchor: Anchor, pub child_anchor: Anchor, pub x: T, pub y: T, pub width: Sizing<T>, pub height: Sizing<T>, pub hit: Sides<T>, pub flip: bool, pub clamp: bool, pub open_on_hover: bool, pub close: PopoverClose,
}

Fields§

§state: &'a mut PopoverState§parent: Id§target_anchor: Anchor§child_anchor: Anchor§x: T§y: T§width: Sizing<T>§height: Sizing<T>§hit: Sides<T>§flip: bool§clamp: bool§open_on_hover: bool§close: PopoverClose

Implementations§

Source§

impl<'a, T: Scalar> Popover<'a, T>

Source

pub fn new(state: &'a mut PopoverState) -> Self

creates a new Popover

Source

pub fn state(self, value: &'a mut PopoverState) -> Self

Source

pub fn parent(self, value: Id) -> Self

Source

pub fn target_anchor(self, value: Anchor) -> Self

Source

pub fn child_anchor(self, value: Anchor) -> Self

Source

pub fn x(self, value: T) -> Self

sets Self::x

Source

pub fn y(self, value: T) -> Self

sets Self::y

Source

pub fn width(self, value: impl Into<Sizing<T>>) -> Self

Source

pub fn height(self, value: impl Into<Sizing<T>>) -> Self

Source

pub fn hit(self, value: Sides<T>) -> Self

sets Self::hit

Source

pub fn flip(self, value: bool) -> Self

Source

pub fn clamp(self, value: bool) -> Self

Source

pub fn open_on_hover(self, value: bool) -> Self

Source

pub fn close(self, value: PopoverClose) -> Self

Source§

impl<T: Scalar> Popover<'_, T>

Source

pub fn begin<'a, C, S>(self, ui: Ui<'a, C, S>) -> PopoverTrigger<'a, C>
where C: Context<Scalar = T>, S: NoLayout,

Auto Trait Implementations§

§

impl<'a, T> !UnwindSafe for Popover<'a, T>

§

impl<'a, T> Forget for Popover<'a, T>

§

impl<'a, T> Freeze for Popover<'a, T>
where &'a mut PopoverState: Freeze, NonZero<u32>: Freeze, T: Freeze,

§

impl<'a, T> Move for Popover<'a, T>

§

impl<'a, T> RefUnwindSafe for Popover<'a, T>

§

impl<'a, T> Send for Popover<'a, T>
where T: Send, NonZero<u32>: Send,

§

impl<'a, T> Sync for Popover<'a, T>
where T: Sync, NonZero<u32>: Sync,

§

impl<'a, T> Unpin for Popover<'a, T>
where T: Unpin, &'a mut PopoverState: Unpin, NonZero<u32>: Unpin,

§

impl<'a, T> UnsafeUnpin for Popover<'a, T>
where &'a mut PopoverState: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, T: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.