Invalidate widget tree from Responsive widget

... by introducing a new `invalidate_widgets` method to `Shell`
This commit is contained in:
Héctor Ramón Jiménez 2022-01-11 13:47:43 +07:00
parent 90c20ac46b
commit 6ab4611a6e
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
8 changed files with 85 additions and 33 deletions

View file

@ -1,8 +1,6 @@
use crate::mouse;
use crate::{
Cache, Clipboard, Command, Debug, Event, Point, Program, Size,
UserInterface,
};
use crate::user_interface::{self, UserInterface};
use crate::{Clipboard, Command, Debug, Event, Point, Program, Size};
/// The execution state of a [`Program`]. It leverages caching, event
/// processing, and rendering primitive storage.
@ -12,7 +10,7 @@ where
P: Program + 'static,
{
program: P,
cache: Option<Cache>,
cache: Option<user_interface::Cache>,
queued_events: Vec<Event>,
queued_messages: Vec<P::Message>,
mouse_interaction: mouse::Interaction,
@ -32,7 +30,7 @@ where
) -> Self {
let user_interface = build_user_interface(
&mut program,
Cache::default(),
user_interface::Cache::default(),
renderer,
bounds,
debug,
@ -161,7 +159,7 @@ where
fn build_user_interface<'a, P: Program>(
program: &'a mut P,
cache: Cache,
cache: user_interface::Cache,
renderer: &mut P::Renderer,
size: Size,
debug: &mut Debug,