Derive application menu key equivalents from the keymap

This commit is contained in:
Max Brunsfeld 2022-05-19 10:04:01 -07:00
parent 8dd6ad3116
commit 7445197f4d
6 changed files with 23 additions and 34 deletions

View file

@ -14,6 +14,7 @@ use crate::{
rect::{RectF, RectI},
vector::Vector2F,
},
keymap,
text_layout::{LineLayout, RunStyle},
Action, ClipboardItem, Menu, Scene,
};
@ -72,7 +73,7 @@ pub(crate) trait ForegroundPlatform {
fn run(&self, on_finish_launching: Box<dyn FnOnce() -> ()>);
fn on_menu_command(&self, callback: Box<dyn FnMut(&dyn Action)>);
fn set_menus(&self, menus: Vec<Menu>);
fn set_menus(&self, menus: Vec<Menu>, matcher: &keymap::Matcher);
fn prompt_for_paths(
&self,
options: PathPromptOptions,