pub struct Scene { /* private fields */ }Expand description
An owned root view plus ordered overlays.
A scene is itself a View, so a host can pass it directly to
paint. Overlays are rendered in insertion order and only
the topmost one receives a focused render context.
Use ScopedScene when the root view borrows host-owned data that should
not be cloned into this scene’s owned Element.

Implementations§
Source§impl Scene
impl Scene
Sourcepub fn overlay(self, overlay: SceneOverlay) -> Self
pub fn overlay(self, overlay: SceneOverlay) -> Self
Add an owned overlay.
Sourcepub fn layer(self, view: Element, spec: OverlaySpec) -> Self
pub fn layer(self, view: Element, spec: OverlaySpec) -> Self
Add an owned view with a placement specification.
Sourcepub fn overlay_count(&self) -> usize
pub fn overlay_count(&self) -> usize
The number of overlay layers.
Sourcepub fn sync_focus(&self, focus: &mut FocusRegistry)
pub fn sync_focus(&self, focus: &mut FocusRegistry)
Synchronize exclusive input ownership with the topmost overlay.
Call this after constructing the frame’s scene. A scene without an owner-bearing overlay releases overlay ownership.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scene
impl !Send for Scene
impl !Sync for Scene
impl !UnwindSafe for Scene
impl Freeze for Scene
impl Unpin for Scene
impl UnsafeUnpin for Scene
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more