summaryrefslogtreecommitdiffstats
path: root/widget/src/pane_grid/draggable.rs
blob: 9d31feb55c622dcf9fb6a477afa20a03f2371040 (plain) (blame)
1
2
3
4
5
6
7
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;
}