pub struct Overlay { /* private fields */ }
Implementations§
source§impl Overlay
impl Overlay
sourcepub fn anchor(self, anchor: AnchorCorner) -> Self
pub fn anchor(self, anchor: AnchorCorner) -> Self
Sets which corner of the overlay should be anchored to the current position.
sourcepub fn position(self, anchor: Point<Pixels>) -> Self
pub fn position(self, anchor: Point<Pixels>) -> Self
Sets the position in window co-ordinates (otherwise the location the overlay is rendered is used)
sourcepub fn snap_to_window(self) -> Self
pub fn snap_to_window(self) -> Self
Snap to window edge instead of switching anchor corner when an overflow would occur.
Trait Implementations§
source§impl ParentElement for Overlay
impl ParentElement for Overlay
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]>
fn child(self, child: impl RenderOnce) -> Selfwhere Self: Sized,
fn children(self, children: impl IntoIterator<Item = impl RenderOnce>) -> Selfwhere Self: Sized,
source§impl RenderOnce for Overlay
impl RenderOnce for Overlay
type Element = Overlay
fn element_id(&self) -> Option<ElementId>
fn render_once(self) -> Self::Element
fn render_into_any(self) -> AnyElement
fn draw<T, R>( self, origin: Point<Pixels>, available_space: Size<T>, cx: &mut WindowContext<'_>, f: impl FnOnce(&mut <Self::Element as Element>::State, &mut WindowContext<'_>) -> R ) -> Rwhere T: Clone + Default + Debug + Into<AvailableSpace>,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere Self: Sized, U: RenderOnce,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere Self: Sized,
fn when_some<T>( self, option: Option<T>, then: impl FnOnce(Self, T) -> Self ) -> Selfwhere Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for Overlay
impl !Send for Overlay
impl !Sync for Overlay
impl Unpin for Overlay
impl !UnwindSafe for Overlay
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more