move event data out of widgetdata

This commit is contained in:
2025-12-23 15:42:04 -05:00
parent 54534c4c34
commit 462c0e6416
7 changed files with 24 additions and 29 deletions

View File

@@ -1,11 +1,8 @@
use std::any::TypeId;
use crate::{Widget, util::HashSet};
use crate::Widget;
pub struct WidgetData {
pub widget: Box<dyn Widget>,
pub label: String,
pub event_mgrs: HashSet<TypeId>,
/// dynamic borrow checking
pub borrowed: bool,
}
@@ -20,7 +17,6 @@ impl WidgetData {
widget: Box::new(widget),
label,
borrowed: false,
event_mgrs: Default::default(),
}
}
}