Skip to main content

OverlayProp

Enum OverlayProp 

Source
pub enum OverlayProp {
    Anchor(OverlayAnchor),
    Placement(Placement),
    Align(Align),
    Offset(Points),
    Margin(Points),
    Hint(Option<Duration>),
    Open(Option<bool>),
    Cover(Option<NodeId>),
}
Expand description

An overlay option (<Overlay …>, crate::overlay).

Variants§

§

Anchor(OverlayAnchor)

anchor: the view (a ref), the point ({ x, y } in the root view, as touches’ pageX / pageY) or the box ({ origin, size } in the root view, as an input’s caret pageBounds) it is placed against, following a view as it moves; without one it is laid out as a position: fixed box of its root view.

§

Placement(Placement)

placement: the side of the anchor it goes on (default "bottom"); the other side when only that one has room.

§

Align(Align)

align: how it lines up with the anchor along that side (default "center"; "start" / "end" follow the layout direction above and below).

§

Offset(Points)

offset: the gap between the anchor and the overlay (default 0).

§

Margin(Points)

margin: the distance it keeps from the edges of the root view’s safe area (default 0).

§

Hint(Option<Duration>)

A hint (a tooltip) shown after the pointer rested on the anchor this long (crate::overlay::OverlayConfig::hint); set by components (nsh-base’s Tooltip).

§

Open(Option<bool>)

A hint shown or hidden whatever the pointer does (crate::overlay::OverlayConfig::open); set by components.

§

Cover(Option<NodeId>)

A view inside it laid over the anchor (crate::overlay::OverlayConfig::cover); set by components (nsh-base’s Select: the selected item over the trigger).

Trait Implementations§

Source§

impl Clone for OverlayProp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OverlayProp

Source§

impl Debug for OverlayProp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HostProps for OverlayProp

Source§

fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>

The prop JS name name sets with input: None for a name that is not one of these props, Some(None) when nothing is to be set.
Source§

fn reset(&self) -> Option<Self>

This prop at its default (what clearing it from JS sets); None for the props the runtime sets once.
Source§

fn same_kind(&self, other: &Self) -> bool

Whether self and other set the same property.
Source§

fn specs(types: &mut TsTypes, out: &mut Vec<HostPropSpec>)

The props, for the generated TypeScript.
Source§

impl PartialEq for OverlayProp

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OverlayProp

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.