2023-03-04 05:37:11 +01:00
|
|
|
use crate::core::{Layout, Point};
|
2022-03-10 19:25:57 +07:00
|
|
|
|
|
|
|
|
/// 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.
|
2023-06-08 20:11:59 +02:00
|
|
|
fn can_be_dragged_at(&self, layout: Layout<'_>, cursor: Point) -> bool;
|
2022-03-10 19:25:57 +07:00
|
|
|
}
|