Enum cursive_core::event::Event
source ·
[−]pub enum Event {
}
Expand description
Represents an event as seen by the application.
Variants
WindowResize
Event fired when the window is resized.
FocusLost
Event fired when the view is about to lose focus.
Refresh
Event fired regularly when a auto-refresh is set.
Char(char)
Tuple Fields
0: char
A character was entered (includes numbers, punctuation, …).
CtrlChar(char)
Tuple Fields
0: char
A character was entered with the Ctrl key pressed.
AltChar(char)
Tuple Fields
0: char
A character was entered with the Alt key pressed.
Key(Key)
Tuple Fields
0: Key
A non-character key was pressed.
Shift(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Shift key pressed.
Alt(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Alt key pressed.
AltShift(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Shift and Alt keys pressed.
Ctrl(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Ctrl key pressed.
CtrlShift(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Ctrl and Shift keys pressed.
CtrlAlt(Key)
Tuple Fields
0: Key
A non-character key was pressed with the Ctrl and Alt keys pressed.
Mouse
Fields
offset: Vec2
Position of the top-left corner of the view receiving this event.
position: Vec2
Position of the mouse when this event was fired.
event: MouseEvent
The mouse event itself.
A mouse event was sent.
Unknown(Vec<u8>)
An unknown event was received.
Implementations
Returns the position of the mouse, if self
is a mouse event.
Returns a mutable reference to the position of the mouse/
Returns None
if self
is not a mouse event.
Update self
with the given offset.
If self
is a mouse event, adds top_left
to its offset.
Otherwise, do nothing.
Returns a cloned, relativized event.
If self
is a mouse event, adds top_left
to its offset.
Otherwise, returns a simple clone.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more