summaryrefslogtreecommitdiffstats
path: root/native/src/overlay.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/overlay.rs')
-rw-r--r--native/src/overlay.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/native/src/overlay.rs b/native/src/overlay.rs
index 25b49adf..70e3305b 100644
--- a/native/src/overlay.rs
+++ b/native/src/overlay.rs
@@ -8,8 +8,9 @@ pub use menu::Menu;
use crate::event::{self, Event};
use crate::layout;
+use crate::mouse;
use crate::renderer;
-use crate::{Clipboard, Hasher, Layout, Point, Size};
+use crate::{Clipboard, Hasher, Layout, Point, Rectangle, Size};
/// An interactive component that can be displayed on top of other widgets.
pub trait Overlay<Message, Renderer>
@@ -74,4 +75,16 @@ where
) -> event::Status {
event::Status::Ignored
}
+
+ /// Returns the current [`mouse::Interaction`] of the [`Widget`].
+ ///
+ /// By default, it returns [`mouse::Interaction::Idle`].
+ fn mouse_interaction(
+ &self,
+ _layout: Layout<'_>,
+ _viewport: &Rectangle,
+ _cursor_position: Point,
+ ) -> mouse::Interaction {
+ mouse::Interaction::Idle
+ }
}