pub struct WindowDrag {
pub step: WindowEvent,
pub total_dx: i32,
pub total_dy: i32,
}Expand description
One step of a move or a resize with the whole drag so far, sent through Window::on_drag.
The steps of WindowEvent are what the pointer did since the last message, and adding them
up is right only while the application takes every one of them. Once it holds a window back,
at the edge of the screen or at a smallest size, the pointer runs on without it, and a sum of
steps turns the window around the moment the pointer does, well before the pointer is back
over it. The totals count from where the button went down, so the application places the
window at where it started plus the total, held back as it likes, and the window follows the
pointer again exactly when the pointer comes back to it.
Fields§
§step: WindowEventThis step: a WindowEvent::Move or a WindowEvent::Resize, exactly as
Window::on_event sends it without Window::on_drag.
total_dx: i32Columns the pointer has moved to the right since the button went down; negative is to the
left. 0 for a resize by the top or the bottom edge, as the step’s dx is.
total_dy: i32Rows the pointer has moved down since the button went down; negative is up. 0 for a
resize by the left or the right edge, as the step’s dy is.
Trait Implementations§
Source§impl Clone for WindowDrag
impl Clone for WindowDrag
impl Copy for WindowDrag
Source§impl Debug for WindowDrag
impl Debug for WindowDrag
impl Eq for WindowDrag
Source§impl PartialEq for WindowDrag
impl PartialEq for WindowDrag
impl StructuralPartialEq for WindowDrag
Auto Trait Implementations§
impl Freeze for WindowDrag
impl RefUnwindSafe for WindowDrag
impl Send for WindowDrag
impl Sync for WindowDrag
impl Unpin for WindowDrag
impl UnsafeUnpin for WindowDrag
impl UnwindSafe for WindowDrag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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