Enum let_engine::prelude::WindowEvent
source · pub enum WindowEvent {
Resized(PhysicalSize<u32>),
CloseRequested,
Destroyed,
HoveredFile(PathBuf),
DroppedFile(PathBuf),
HoveredFileCancelled,
Focused(bool),
CursorEntered,
CursorLeft,
CursorMoved(PhysicalPosition<f64>),
MouseWheel(ScrollDelta),
}
Expand description
An event coming with window context.
Variants§
Resized(PhysicalSize<u32>)
In case the window has been resized the new size is given here.
CloseRequested
The window has been requested to close. Happens when the X button gets pressed on the title bar, the X gets pressed in the task bar, the Alt f4 combination gets pressed or any other ways to request a close to the window.
Destroyed
The window no more.
HoveredFile(PathBuf)
A file is getting hovered over the window.
This event happens separately for every file in case a multitude of files have been dragged in.
DroppedFile(PathBuf)
The file has been dropped inside the window.
This event happens separately for every file in case a multitude of files have been dragged in.
HoveredFileCancelled
In case files have been hovered over the window but have left the window without getting dropped in.
This event gets called once, no matter how many files were hovered over the window.
Focused(bool)
True
if the window was focused.
False
if it lost focus.
CursorEntered
The cursor has entered the window.
CursorLeft
The cursor has left the window.
CursorMoved(PhysicalPosition<f64>)
THe cursor has moved on the window.
Cursor position in pixels relative the the top left corner of the screen.
MouseWheel(ScrollDelta)
Mouse scroll event on the window.
Trait Implementations§
source§impl Clone for WindowEvent
impl Clone for WindowEvent
source§fn clone(&self) -> WindowEvent
fn clone(&self) -> WindowEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.