diff options
author | 2019-11-09 05:06:04 +0100 | |
---|---|---|
committer | 2019-11-09 05:10:10 +0100 | |
commit | e953b1828d5b8dbdd145829f47c4817137e37f0d (patch) | |
tree | 9c775128e047e4a141f2aefb691e7e31a801ba93 /src | |
parent | e66d38403d09b265f111d9e1b59af6143464d912 (diff) | |
download | iced-e953b1828d5b8dbdd145829f47c4817137e37f0d.tar.gz iced-e953b1828d5b8dbdd145829f47c4817137e37f0d.tar.bz2 iced-e953b1828d5b8dbdd145829f47c4817137e37f0d.zip |
Allow applications to control the window title
`iced_winit` will change the window title dynamically at runtime!
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); } |