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)
A button was pressed.
Release(MouseButton)
A button was released.
Hold(MouseButton)
A button is being held.
WheelUp
The wheel was moved up.
WheelDown
The wheel was moved down.
Implementations§
source§impl MouseEvent
impl MouseEvent
Returns the button used by this event, if any.
Returns None
if self
is WheelUp
or WheelDown
.
sourcepub fn grabs_focus(self) -> bool
pub fn grabs_focus(self) -> bool
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§
source§impl Clone for MouseEvent
impl Clone for MouseEvent
source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more