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
impl Clone for OverlayProp
impl Copy for OverlayProp
Source§impl Debug for OverlayProp
impl Debug for OverlayProp
Source§impl HostProps for OverlayProp
impl HostProps for OverlayProp
Source§fn decode<I: HostInput>(
name: &str,
input: &I,
cx: &mut HostCx,
) -> Option<Option<Self>>
fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>
name sets with input: None for a name that is
not one of these props, Some(None) when nothing is to be set.