Initial menu implementation

This commit is contained in:
Richard 2021-07-05 16:23:44 -03:00
parent 4994d34aba
commit 9fc5ad23ed
14 changed files with 487 additions and 8 deletions

View file

@ -14,6 +14,7 @@ use iced_futures::futures;
use iced_futures::futures::channel::mpsc;
use iced_graphics::window;
use iced_native::program::Program;
use iced_native::Menu;
use iced_native::{Cache, UserInterface};
use std::mem::ManuallyDrop;
@ -98,6 +99,11 @@ pub trait Application: Program<Clipboard = Clipboard> {
fn should_exit(&self) -> bool {
false
}
/// TODO
fn menu(&self) -> Menu<Self::Message> {
Menu::new()
}
}
/// Runs an [`Application`] with an executor, compositor, and the provided