Enum cursive_core::event::MouseEvent
source ·
[−]pub enum MouseEvent {
Press(MouseButton),
Release(MouseButton),
Hold(MouseButton),
WheelUp,
WheelDown,
}
Expand description
Represents a possible event sent by the mouse.
Variants
Press(MouseButton)
Tuple Fields
0: MouseButton
A button was pressed.
Release(MouseButton)
Tuple Fields
0: MouseButton
A button was released.
Hold(MouseButton)
Tuple Fields
0: MouseButton
A button is being held.
WheelUp
The wheel was moved up.
WheelDown
The wheel was moved down.
Implementations
Returns the button used by this event, if any.
Returns None
if self
is WheelUp
or WheelDown
.
Returns true
if self
is an event that can grab focus.
This includes Press
, WheelUp
and WheelDown
.
It does not include Release
or Hold
.
It means you should be able to grab a scroll bar, and move the mouse away from the view, without actually changing the focus.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnwindSafe for MouseEvent
Blanket Implementations
Mutably borrows from an owned value. Read more