iced-yoda/native/src/widget/pane_grid/draggable.rs
2022-03-14 17:44:25 +07:00

12 lines
324 B
Rust

use crate::{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;
}