summaryrefslogtreecommitdiffstats
path: root/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Richard <richardsoncusto@gmail.com>2021-07-05 16:23:44 -0300
committerLibravatar Richard <richardsoncusto@gmail.com>2021-07-05 16:24:10 -0300
commit9fc5ad23edca93553137100d167de7b69e88f785 (patch)
treeb9244861c70ff0f1718aabd5fa6e9b835b3857d9 /src/application.rs
parent4994d34abab3222f9a8fd7a9a3e63f969ca97ffc (diff)
downloadiced-9fc5ad23edca93553137100d167de7b69e88f785.tar.gz
iced-9fc5ad23edca93553137100d167de7b69e88f785.tar.bz2
iced-9fc5ad23edca93553137100d167de7b69e88f785.zip
Initial menu implementation
Diffstat (limited to 'src/application.rs')
-rw-r--r--src/application.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/application.rs b/src/application.rs
index bda8558c..b3dae1b3 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -1,6 +1,6 @@
use crate::window;
use crate::{
- Clipboard, Color, Command, Element, Executor, Settings, Subscription,
+ Clipboard, Color, Command, Element, Executor, Menu, Settings, Subscription,
};
/// An interactive cross-platform application.
@@ -191,6 +191,11 @@ pub trait Application: Sized {
false
}
+ /// TODO
+ fn menu(&self) -> Menu<Self::Message> {
+ Menu::new()
+ }
+
/// Runs the [`Application`].
///
/// On native platforms, this method will take control of the current thread
@@ -296,6 +301,10 @@ where
fn should_exit(&self) -> bool {
self.0.should_exit()
}
+
+ fn menu(&self) -> Menu<Self::Message> {
+ self.0.menu()
+ }
}
#[cfg(target_arch = "wasm32")]