Allow applications to control the window title

`iced_winit` will change the window title dynamically at runtime!
This commit is contained in:
Héctor Ramón Jiménez 2019-11-09 05:06:04 +01:00
parent e66d38403d
commit e953b1828d
5 changed files with 64 additions and 18 deletions

View file

@ -7,6 +7,8 @@ pub use platform::*;
pub trait Application {
type Message: std::fmt::Debug;
fn title(&self) -> String;
fn update(&mut self, message: Self::Message);
fn view(&mut self) -> Element<Self::Message>;
@ -33,6 +35,10 @@ where
type Renderer = Renderer;
type Message = A::Message;
fn title(&self) -> String {
self.0.title()
}
fn update(&mut self, message: Self::Message) {
self.0.update(message);
}