pub struct PreparedRoots {
pub root: AnyElement,
pub prompt: Option<AnyElement>,
pub tooltip: Option<AnyElement>,
pub drag: Option<(AnyElement, Point<Pixels>)>,
pub inspector: Option<AnyElement>,
}Expand description
The roots a frame draws, assembled before they are laid out.
A frame draws the window’s own view tree, plus at most one overlay: a prompt,
a drag image, or a tooltip. Roots are gathered by Window::evaluate_roots,
laid out and prepainted by Window::layout_roots, and drawn by
Window::paint_roots, so a FramePipeline can sit between the passes.
Only root is laid out like the window’s view tree, filling it
unless the view sizes itself. The others are placed as their own conventions
require, which is why the carrier records what each one is rather than letting
callers guess from the element.
Fields§
§root: AnyElementThe window’s own view tree.
prompt: Option<AnyElement>A prompt, laid out like the root: it covers the window.
tooltip: Option<AnyElement>A tooltip, already laid out where the request that asked for it wanted it.
drag: Option<(AnyElement, Point<Pixels>)>A drag image, and the point it hangs from: the pointer, less the offset recorded when the drag started.
inspector: Option<AnyElement>The inspector’s root, when the inspector is open.
Auto Trait Implementations§
impl !RefUnwindSafe for PreparedRoots
impl !Send for PreparedRoots
impl !Sync for PreparedRoots
impl !UnwindSafe for PreparedRoots
impl Freeze for PreparedRoots
impl Unpin for PreparedRoots
impl UnsafeUnpin for PreparedRoots
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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