Enum cursive::event::Event [−][src]
pub enum Event {
Show 15 variants
WindowResize,
FocusLost,
Refresh,
Char(char),
CtrlChar(char),
AltChar(char),
Key(Key),
Shift(Key),
Alt(Key),
AltShift(Key),
Ctrl(Key),
CtrlShift(Key),
CtrlAlt(Key),
Mouse {
offset: XY<usize>,
position: XY<usize>,
event: MouseEvent,
},
Unknown(Vec<u8, Global>),
// some variants omitted
}
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
event: MouseEvent
The mouse event itself.
A mouse event was sent.
Unknown(Vec<u8, Global>)
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.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more
Calls the given closure and return the result. Read more
Calls the given closure on self
.