pub enum WindowEvent {
Focus,
Move {
dx: i32,
dy: i32,
},
Resize {
edge: WindowEdge,
dx: i32,
dy: i32,
},
Minimize,
ToggleMaximize,
Close,
Dropped,
}Expand description
What the pointer did to a Window, sent through Window::on_event.
Deltas count cells since the last message of the same drag, so an application adds them to the window’s rectangle as they come. What it allows (a smallest size, staying on screen) is its own decision; the window reports the pointer, not a new rectangle.
Variants§
Focus
A press anywhere in a window that is not focused, sent before whatever else the press does: raise the window and give it focus.
Move
The window was dragged by its title, or with alt and the left button anywhere, by dx
columns and dy rows.
Resize
An edge or a corner was dragged: the right column or bottom row of the body, their corner, or with alt and the right button the edge or corner nearest to the press.
Fields
edge: WindowEdgeThe edge or corner that moves.
Minimize
The minimize mark was clicked.
ToggleMaximize
The maximize mark was clicked, or the title double-clicked.
Close
The close mark was clicked.
Dropped
A move or a resize ended: the button came up after at least one WindowEvent::Move or
WindowEvent::Resize. This is where snapping to an edge and a ghost drag land, and
where a size is saved.
Trait Implementations§
Source§impl Clone for WindowEvent
impl Clone for WindowEvent
Source§fn clone(&self) -> WindowEvent
fn clone(&self) -> WindowEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WindowEvent
Source§impl Debug for WindowEvent
impl Debug for WindowEvent
impl Eq for WindowEvent
Source§impl PartialEq for WindowEvent
impl PartialEq for WindowEvent
impl StructuralPartialEq for WindowEvent
Auto Trait Implementations§
impl Freeze for WindowEvent
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin for WindowEvent
impl UnsafeUnpin for WindowEvent
impl UnwindSafe for WindowEvent
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