Event passing

This commit is contained in:
2026-01-24 17:31:58 +01:00
parent 9d55dacde2
commit 8f0712d4f8
+8
View File
@@ -93,6 +93,10 @@ impl Context {
(i.lock().unwrap())(self, event);
}
}
for (child, _) in self.children.lock().unwrap().iter() {
child.emit_event(event);
}
}
pub fn emit_event_threaded<E: Event + Send + Sync + Clone + 'static>(
@@ -109,6 +113,10 @@ impl Context {
});
}
}
for (child, _) in self.children.lock().unwrap().iter() {
child.emit_event_threaded(event);
}
}
pub fn child<F: Fn(&Arc<Context>) -> View + Send + Sync + 'static>(