Allow creating application menus with submenus
This commit is contained in:
parent
619c874984
commit
a3b17ffd15
2 changed files with 119 additions and 69 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue