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

@ -6,8 +6,8 @@
//! [`State`]: struct.State.html
use crate::{
input::{mouse, ButtonState},
layout, Background, Element, Event, Hasher, Layout, Length, Point,
Rectangle, Widget,
layout, Background, Clipboard, Element, Event, Hasher, Layout, Length,
Point, Rectangle, Widget,
};
use std::hash::Hash;
@ -192,6 +192,7 @@ where
cursor_position: Point,
messages: &mut Vec<Message>,
_renderer: &Renderer,
_clipboard: Option<&dyn Clipboard>,
) {
match event {
Event::Mouse(mouse::Event::Input {