Get app menus basically working

- Everything is still disabled when there is no active window.

Co-Authored-By: Marshall <marshall@zed.dev>
This commit is contained in:
Nathan Sobo 2023-12-05 16:37:01 -07:00
parent 79567d1c87
commit 82534b6612
13 changed files with 437 additions and 229 deletions

View file

@ -1,6 +1,7 @@
use crate::{
AnyWindowHandle, BackgroundExecutor, ClipboardItem, CursorStyle, DisplayId, ForegroundExecutor,
Platform, PlatformDisplay, PlatformTextSystem, TestDisplay, TestWindow, WindowOptions,
AnyWindowHandle, BackgroundExecutor, ClipboardItem, CursorStyle, DispatchTree, DisplayId,
ForegroundExecutor, Platform, PlatformDisplay, PlatformTextSystem, TestDisplay, TestWindow,
WindowOptions,
};
use anyhow::{anyhow, Result};
use collections::VecDeque;
@ -205,6 +206,10 @@ impl Platform for TestPlatform {
unimplemented!()
}
fn set_menus(&self, _menus: Vec<crate::Menu>, _dispatch_tree: Option<&DispatchTree>) {
unimplemented!()
}
fn on_app_menu_action(&self, _callback: Box<dyn FnMut(&dyn crate::Action)>) {
unimplemented!()
}