pub struct DragState { /* private fields */ }Expand description
State for tracking a popup drag or resize operation.
Implementations§
Source§impl DragState
impl DragState
pub fn new() -> Self
Sourcepub fn begin(&mut self, popup: Rect, col: u16, row: u16, zone: Zone)
pub fn begin(&mut self, popup: Rect, col: u16, row: u16, zone: Zone)
Start a drag based on the zone at the click position.
Sourcepub fn update(&self, area: Rect, col: u16, row: u16) -> DragUpdate
pub fn update(&self, area: Rect, col: u16, row: u16) -> DragUpdate
Update the drag and return the new popup state.
Returns None/DragUpdate::None if no drag is in progress.
Sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Whether a drag is in progress.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DragState
impl RefUnwindSafe for DragState
impl Send for DragState
impl Sync for DragState
impl Unpin for DragState
impl UnsafeUnpin for DragState
impl UnwindSafe for DragState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more