Event passing
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user