diff options
Diffstat (limited to '')
| -rw-r--r-- | src/multi_window/application.rs | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/src/multi_window/application.rs b/src/multi_window/application.rs index fa0c15b1..6b3f4676 100644 --- a/src/multi_window/application.rs +++ b/src/multi_window/application.rs @@ -1,3 +1,4 @@ +use crate::window;  use crate::{Command, Element, Executor, Settings, Subscription};  pub use iced_native::application::{Appearance, StyleSheet}; @@ -45,6 +46,9 @@ pub trait Application: Sized {      /// title of your application when necessary.      fn title(&self) -> String; +    /// TODO(derezzedex) +    fn windows(&self) -> Vec<(window::Id, window::Settings)>; +      /// Handles a __message__ and updates the state of the [`Application`].      ///      /// This is where you define your __update logic__. All the __messages__, @@ -160,6 +164,16 @@ where          self.0.title()      } +    fn windows(&self) -> Vec<(window::Id, iced_winit::settings::Window)> { +        self.0 +            .windows() +            .into_iter() +            .map(|(id, settings)| { +                (id, iced_winit::settings::Window::from(settings)) +            }) +            .collect() +    } +      fn update(&mut self, message: Self::Message) -> Command<Self::Message> {          self.0.update(message)      } | 
