Rename Overlay::on_event to update
This commit is contained in:
parent
03bffe3db6
commit
e5f1e31a5c
14 changed files with 25 additions and 26 deletions
|
|
@ -56,7 +56,7 @@ where
|
|||
/// * a [`Clipboard`], if available
|
||||
///
|
||||
/// By default, it does nothing.
|
||||
fn on_event(
|
||||
fn update(
|
||||
&mut self,
|
||||
_event: Event,
|
||||
_layout: Layout<'_>,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ where
|
|||
}
|
||||
|
||||
/// Processes a runtime [`Event`].
|
||||
pub fn on_event(
|
||||
pub fn update(
|
||||
&mut self,
|
||||
event: Event,
|
||||
layout: Layout<'_>,
|
||||
|
|
@ -59,7 +59,7 @@ where
|
|||
shell: &mut Shell<'_, Message>,
|
||||
) {
|
||||
self.overlay
|
||||
.on_event(event, layout, cursor, renderer, clipboard, shell);
|
||||
.update(event, layout, cursor, renderer, clipboard, shell);
|
||||
}
|
||||
|
||||
/// Returns the current [`mouse::Interaction`] of the [`Element`].
|
||||
|
|
@ -148,7 +148,7 @@ where
|
|||
self.content.operate(layout, renderer, operation);
|
||||
}
|
||||
|
||||
fn on_event(
|
||||
fn update(
|
||||
&mut self,
|
||||
event: Event,
|
||||
layout: Layout<'_>,
|
||||
|
|
@ -160,7 +160,7 @@ where
|
|||
let mut local_messages = Vec::new();
|
||||
let mut local_shell = Shell::new(&mut local_messages);
|
||||
|
||||
self.content.on_event(
|
||||
self.content.update(
|
||||
event,
|
||||
layout,
|
||||
cursor,
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ where
|
|||
)
|
||||
}
|
||||
|
||||
fn on_event(
|
||||
fn update(
|
||||
&mut self,
|
||||
event: Event,
|
||||
layout: Layout<'_>,
|
||||
|
|
@ -82,7 +82,7 @@ where
|
|||
shell: &mut Shell<'_, Message>,
|
||||
) {
|
||||
for (child, layout) in self.children.iter_mut().zip(layout.children()) {
|
||||
child.on_event(
|
||||
child.update(
|
||||
event.clone(),
|
||||
layout,
|
||||
cursor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue