Implement default macOS menu items
- `Zed -> Hide`, bound to `cmd-h` - `Zed -> Hide Others`, bound to `alt-cmd-h` - `Zed -> Show All` - `Window -> Minimize`, bound to `cmd-m` - `Window -> Zoom`
This commit is contained in:
parent
dc9df64078
commit
7cbf76ce80
8 changed files with 124 additions and 1 deletions
|
@ -46,6 +46,9 @@ pub trait Platform: Send + Sync {
|
|||
executor: Rc<executor::Foreground>,
|
||||
) -> Box<dyn Window>;
|
||||
fn key_window_id(&self) -> Option<usize>;
|
||||
fn hide(&self);
|
||||
fn hide_other_apps(&self);
|
||||
fn unhide_other_apps(&self);
|
||||
fn quit(&self);
|
||||
|
||||
fn write_to_clipboard(&self, item: ClipboardItem);
|
||||
|
@ -117,6 +120,8 @@ pub trait Window: WindowContext {
|
|||
fn set_title(&mut self, title: &str);
|
||||
fn set_edited(&mut self, edited: bool);
|
||||
fn show_character_palette(&self);
|
||||
fn minimize(&self);
|
||||
fn zoom(&self);
|
||||
}
|
||||
|
||||
pub trait WindowContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue