#[non_exhaustive]pub enum InputEvent {
PointerDown {
id: u64,
pos: PointCss,
button: Button,
mods: Modifiers,
time_ms: f64,
},
PointerMove {
id: u64,
pos: PointCss,
mods: Modifiers,
time_ms: f64,
},
PointerUp {
id: u64,
pos: PointCss,
button: Button,
mods: Modifiers,
time_ms: f64,
},
PointerLeave,
Wheel {
pos: PointCss,
delta: WheelDelta,
mods: Modifiers,
},
Pinch {
phase: GesturePhase,
center: PointCss,
scale: f32,
},
Key {
key: Key,
pressed: bool,
mods: Modifiers,
},
DoubleClick {
pos: PointCss,
button: Button,
},
}Expand description
A platform-independent input event. Positions are in CSS pixels relative to the chart’s top-left corner.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PointerDown
A button was pressed or a touch began.
Fields
Button.
PointerMove
The pointer moved.
Fields
PointerUp
A button was released or a touch ended.
Fields
Button.
PointerLeave
The pointer left the chart.
Wheel
Wheel or touchpad scroll.
Pinch
Touchpad or touch-screen pinch. scale is relative to the previous event.
Fields
§
phase: GesturePhasePhase.
Key
A key was pressed or released.
DoubleClick
Double click / double tap.
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
impl Copy for InputEvent
Source§impl Debug for InputEvent
impl Debug for InputEvent
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Forget for InputEvent
impl Freeze for InputEvent
impl Move for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more