pub struct Tree<C: Context> { /* private fields */ }Implementations§
Source§impl<C: Context> Tree<C>
impl<C: Context> Tree<C>
Sourcepub fn build<W: Widget<C>>(
&mut self,
context: &mut C,
info: FrameInfo<C::Scalar>,
time: Duration,
input: Input<C::Scalar>,
widget: W,
) -> W::Response
pub fn build<W: Widget<C>>( &mut self, context: &mut C, info: FrameInfo<C::Scalar>, time: Duration, input: Input<C::Scalar>, widget: W, ) -> W::Response
rebuilds the tree for one input
call Self::layout after every build, as the next build reads that layout
Sourcepub fn layout(&mut self, context: &mut C)
pub fn layout(&mut self, context: &mut C)
resolves layout, positioning, clipping and interaction for the built tree
Sourcepub fn paint(
&mut self,
context: &mut C,
push_clip: impl FnMut(&mut C, Rect<C::Scalar>, Corners<C::Scalar>),
pop_clip: impl FnMut(&mut C),
)
pub fn paint( &mut self, context: &mut C, push_clip: impl FnMut(&mut C, Rect<C::Scalar>, Corners<C::Scalar>), pop_clip: impl FnMut(&mut C), )
paints the resolved tree and releases its retained values
pub fn has_pending_redraw(&self) -> bool
pub fn next_timer_deadline(&self) -> Option<Duration>
pub fn request_frame(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<C> !Freeze for Tree<C>
impl<C> !RefUnwindSafe for Tree<C>
impl<C> !Send for Tree<C>
impl<C> !Sync for Tree<C>
impl<C> Forget for Tree<C>
impl<C> Move for Tree<C>
impl<C> Unpin for Tree<C>
impl<C> UnsafeUnpin for Tree<C>where
*const u8 is !null: UnsafeUnpin,
PhantomData<StoredNode>: UnsafeUnpin,
PhantomData<Mark>: UnsafeUnpin,
PhantomData<Rect<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<i16>: UnsafeUnpin,
PhantomData<Index<ResolvedClip<()>>>: UnsafeUnpin,
PhantomData<StoredMeasure<C>>: UnsafeUnpin,
PhantomData<StoredPaint<C>>: UnsafeUnpin,
PhantomData<Aux<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<StoredPlace<C>>: UnsafeUnpin,
PhantomData<NodeMotion>: UnsafeUnpin,
PhantomData<NodeId>: UnsafeUnpin,
PhantomData<Site>: UnsafeUnpin,
PhantomData<Block>: UnsafeUnpin,
PhantomData<(u32, fn(*mut u8))>: UnsafeUnpin,
PhantomData<*mut ()>: UnsafeUnpin,
PhantomData<Slot>: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<ResolvedClip<<C as Context>::Scalar>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
<C as Context>::Scalar: UnsafeUnpin,
PhantomData<TrackedContact<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<HitItem<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<Slot>: UnsafeUnpin,
PhantomData<Kind<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<AnimationState>: UnsafeUnpin,
PhantomData<CallScope>: UnsafeUnpin,
PhantomData<MotionState<<C as Context>::Scalar>>: UnsafeUnpin,
PhantomData<TimerState>: UnsafeUnpin,
PhantomData<LayoutKind<C>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl<C> UnwindSafe for Tree<C>where
RawVecInner: UnwindSafe,
NonZero<u32>: UnwindSafe,
&'static Location<'static>: UnwindSafe,
<C as Context>::Scalar: UnwindSafe,
*mut (): UnwindSafe,
*const (): UnwindSafe,
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