add window::Id to view
This commit is contained in:
parent
01bad4f896
commit
2fe58e1261
2 changed files with 35 additions and 12 deletions
|
|
@ -88,7 +88,10 @@ pub trait Application: Sized {
|
|||
/// Returns the widgets to display in the [`Application`].
|
||||
///
|
||||
/// These widgets can produce __messages__ based on user interaction.
|
||||
fn view(&self) -> Element<'_, Self::Message, crate::Renderer<Self::Theme>>;
|
||||
fn view(
|
||||
&self,
|
||||
window: window::Id,
|
||||
) -> Element<'_, Self::Message, crate::Renderer<Self::Theme>>;
|
||||
|
||||
/// Returns the scale factor of the [`Application`].
|
||||
///
|
||||
|
|
@ -178,8 +181,11 @@ where
|
|||
self.0.update(message)
|
||||
}
|
||||
|
||||
fn view(&self) -> Element<'_, Self::Message, Self::Renderer> {
|
||||
self.0.view()
|
||||
fn view(
|
||||
&self,
|
||||
window: window::Id,
|
||||
) -> Element<'_, Self::Message, Self::Renderer> {
|
||||
self.0.view(window)
|
||||
}
|
||||
|
||||
fn theme(&self) -> A::Theme {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue