pub enum WindowEvent {
Show 25 variants
WindowClose,
WindowResize(f32, f32),
MouseDoubleClick(MouseButton),
MouseDown(MouseButton),
MouseUp(MouseButton),
MouseMove(f32, f32),
MouseScroll(f32, f32),
MouseOver,
MouseOut,
MouseEnter,
MouseLeave,
FocusIn,
FocusOut,
CharInput(char),
KeyDown(Code, Option<Key>),
KeyUp(Code, Option<Key>),
SetCursor(CursorIcon),
MouseCaptureEvent,
MouseCaptureOutEvent,
GeometryChanged(GeometryChanged),
Redraw,
Restyle,
Relayout,
Debug(String),
ChildAdded(Entity),
}Variants§
WindowClose
Emitted when a window is closed
WindowResize(f32, f32)
Emitted when a window is opened
MouseDoubleClick(MouseButton)
Emitted when a mouse button is double clicked
MouseDown(MouseButton)
Emitted when a mouse button is pressed
MouseUp(MouseButton)
Emitted when a mouse button is released
MouseMove(f32, f32)
Emitted when the mouse cursor is moved
MouseScroll(f32, f32)
Emitted when the mouse scroll wheel is scrolled
MouseOver
Emitted when the mouse cursor enters the bounding box of an entity
MouseOut
Emitted when the mouse cursor leaves the bounding box of an entity
MouseEnter
Emitted when the mouse cursor enters an entity or one of its decendants
MouseLeave
Emitted when the mouse cursor leaves an entity or one of its decendants
FocusIn
FocusOut
CharInput(char)
Emitted when a character is typed
KeyDown(Code, Option<Key>)
Emitted when a keyboard key is pressed
KeyUp(Code, Option<Key>)
Emitted when a keyboard key is released
SetCursor(CursorIcon)
Sets the mouse cursor
MouseCaptureEvent
Emitted when mouse events have been captured
MouseCaptureOutEvent
Emitted when mouse events have been released
GeometryChanged(GeometryChanged)
Emitted when an entity changes position or size (TODO: check if this includes margins + borders)
Redraw
Requests a redraw of the window contents
Restyle
Request a restyle
Relayout
Requests a relayout
Debug(String)
Prints the debug message to the console
ChildAdded(Entity)
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 more