summaryrefslogtreecommitdiffstats
path: root/widget/src/pane_grid/draggable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/pane_grid/draggable.rs')
-rw-r--r--widget/src/pane_grid/draggable.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/widget/src/pane_grid/draggable.rs b/widget/src/pane_grid/draggable.rs
new file mode 100644
index 00000000..9d31feb5
--- /dev/null
+++ b/widget/src/pane_grid/draggable.rs
@@ -0,0 +1,8 @@
+use crate::core::{Layout, Point};
+
+/// A pane that can be dragged.
+pub trait Draggable {
+ /// Returns whether the [`Draggable`] with the given [`Layout`] can be picked
+ /// at the provided cursor position.
+ fn can_be_dragged_at(&self, layout: Layout<'_>, cursor: Point) -> bool;
+}