Allow clipboard access in Widget::on_event

This commit is contained in:
Héctor Ramón Jiménez 2019-12-18 07:45:49 +01:00
parent 0f2e20f5e5
commit a14b39555e
20 changed files with 89 additions and 26 deletions

View file

@ -2,7 +2,8 @@
use std::hash::Hash;
use crate::{
layout, Align, Element, Event, Hasher, Layout, Length, Point, Widget,
layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Point,
Widget,
};
use std::u32;
@ -153,6 +154,7 @@ where
cursor_position: Point,
messages: &mut Vec<Message>,
renderer: &Renderer,
clipboard: Option<&dyn Clipboard>,
) {
self.children.iter_mut().zip(layout.children()).for_each(
|(child, layout)| {
@ -162,6 +164,7 @@ where
cursor_position,
messages,
renderer,
clipboard,
)
},
);