diff options
Diffstat (limited to 'widget/src/pane_grid/draggable.rs')
-rw-r--r-- | widget/src/pane_grid/draggable.rs | 12 |
1 files changed, 12 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..a9274dad --- /dev/null +++ b/widget/src/pane_grid/draggable.rs @@ -0,0 +1,12 @@ +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_position: Point, + ) -> bool; +} |