Provide Renderer to Widget::on_event
This allows us to implement configurable event processing that adapts to different rendering strategies.
This commit is contained in:
parent
6602c1517c
commit
9dabbf7885
11 changed files with 45 additions and 14 deletions
|
|
@ -55,12 +55,17 @@ where
|
|||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
messages: &mut Vec<Message>,
|
||||
renderer: &Renderer,
|
||||
) {
|
||||
self.children.iter_mut().zip(layout.children()).for_each(
|
||||
|(child, layout)| {
|
||||
child
|
||||
.widget
|
||||
.on_event(event, layout, cursor_position, messages)
|
||||
child.widget.on_event(
|
||||
event,
|
||||
layout,
|
||||
cursor_position,
|
||||
messages,
|
||||
renderer,
|
||||
)
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue