pub struct WidgetTreeCache { /* private fields */ }Expand description
Previous/current frame cache for widget tree nodes.
Layout and interaction are stored in separate generations so pass 1 can read only previous-frame geometry while pass 3 writes the next frame’s geometry and interaction outputs independently.
Implementations§
Source§impl WidgetTreeCache
impl WidgetTreeCache
Sourcepub fn begin_frame(&mut self)
pub fn begin_frame(&mut self)
Clears the in-progress frame cache while preserving the committed frame.
Sourcepub fn finish_frame(&mut self)
pub fn finish_frame(&mut self)
Publishes the current frame cache as the previous frame for the next run.
Sourcepub fn prev_layout(&self, node_id: NodeId) -> Option<&NodeLayout>
pub fn prev_layout(&self, node_id: NodeId) -> Option<&NodeLayout>
Returns the previous frame layout for node_id.
Sourcepub fn current_layout(&self, node_id: NodeId) -> Option<&NodeLayout>
pub fn current_layout(&self, node_id: NodeId) -> Option<&NodeLayout>
Returns the current frame layout for node_id.
Sourcepub fn prev_interaction(&self, node_id: NodeId) -> Option<&NodeInteraction>
pub fn prev_interaction(&self, node_id: NodeId) -> Option<&NodeInteraction>
Returns the previous frame interaction for node_id.
Sourcepub fn current_interaction(&self, node_id: NodeId) -> Option<&NodeInteraction>
pub fn current_interaction(&self, node_id: NodeId) -> Option<&NodeInteraction>
Returns the current frame interaction for node_id.
Sourcepub fn prev_state(&self, node_id: NodeId) -> Option<NodeFrameState>
pub fn prev_state(&self, node_id: NodeId) -> Option<NodeFrameState>
Returns the previous combined frame state for node_id.
Sourcepub fn current_state(&self, node_id: NodeId) -> Option<NodeFrameState>
pub fn current_state(&self, node_id: NodeId) -> Option<NodeFrameState>
Returns the current combined frame state for node_id.
Sourcepub fn record_layout(&mut self, node_id: NodeId, layout: NodeLayout)
pub fn record_layout(&mut self, node_id: NodeId, layout: NodeLayout)
Records the current frame layout for node_id.
Sourcepub fn record_interaction(
&mut self,
node_id: NodeId,
interaction: NodeInteraction,
)
pub fn record_interaction( &mut self, node_id: NodeId, interaction: NodeInteraction, )
Records the current frame interaction for node_id.