Allow creating application menus with submenus

This commit is contained in:
Max Brunsfeld 2022-06-16 17:47:39 -07:00
parent 619c874984
commit a3b17ffd15
2 changed files with 119 additions and 69 deletions

View file

@ -133,11 +133,12 @@ pub struct Menu<'a> {
}
pub enum MenuItem<'a> {
Separator,
Submenu(Menu<'a>),
Action {
name: &'a str,
action: Box<dyn Action>,
},
Separator,
}
#[derive(Clone)]