Dock menu

This commit is contained in:
Conrad Irwin 2023-11-17 12:14:06 -07:00
parent 9d742b90c3
commit eb04160d2d
3 changed files with 44 additions and 13 deletions

View file

@ -69,6 +69,11 @@ impl<V: Render> ContextMenu<V> {
self
}
pub fn action(self, view: ListEntry<Self>, action: Box<dyn Action>) -> Self {
// todo: add the keybindings to the list entry
self.entry(view, move |_, cx| cx.dispatch_action(action.boxed_clone()))
}
pub fn confirm(&mut self, _: &menu::Confirm, cx: &mut ViewContext<Self>) {
// todo!()
cx.emit(Dismiss);