Allow applications to control the window title
`iced_winit` will change the window title dynamically at runtime!
This commit is contained in:
parent
e66d38403d
commit
e953b1828d
5 changed files with 64 additions and 18 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue