Start work on a command palette

This commit is contained in:
Max Brunsfeld 2022-04-13 13:20:59 -07:00
parent 99f8466cb5
commit 4630071f58
11 changed files with 487 additions and 26 deletions

View file

@ -1340,6 +1340,17 @@ impl MutableAppContext {
.collect()
}
pub fn dispatch_action_at(&mut self, window_id: usize, view_id: usize, action: &dyn Action) {
let presenter = self
.presenters_and_platform_windows
.get(&window_id)
.unwrap()
.0
.clone();
let dispatch_path = presenter.borrow().dispatch_path_from(view_id);
self.dispatch_action_any(window_id, &dispatch_path, action);
}
pub fn dispatch_action<A: Action>(
&mut self,
window_id: usize,