pub enum ControllerEvent {
Show 13 variants
ClickPressed,
ClickArmed(bool),
Clicked {
button: MouseButton,
count: u8,
},
ClickCancelled,
DragStarted {
start: Point,
},
DragUpdated {
start: Point,
offset: Point,
},
DragEnded {
start: Point,
offset: Point,
},
Scrolled {
delta: Point,
},
HoverEntered,
HoverExited,
LongPressed {
position: Point,
},
KeyPressed {
key: Key,
modifiers: Modifiers,
repeat: bool,
},
KeyReleased {
key: Key,
modifiers: Modifiers,
},
}Expand description
A high-level result reported by a controller.
Variants§
ClickPressed
ClickController: the button went down on the Widget.
ClickArmed(bool)
ClickController: while pressed, the pointer re-entered (true) or left (false) the
Widget. A release is a click only while armed.
Clicked
ClickController: the button was released inside the Widget it was pressed on.
ClickCancelled
ClickController: the button was released outside the Widget; no click.
DragStarted
DragController: the pointer moved past the threshold while pressed.
DragUpdated
DragController: the pointer moved while dragging.
Fields
DragEnded
DragController: the button was released after a drag.
Scrolled
ScrollController: the wheel or trackpad scrolled.
HoverEntered
HoverController: the pointer entered the Widget.
HoverExited
HoverController: the pointer left the Widget.
LongPressed
LongPressController: the button was held, without moving, for the delay.
KeyPressed
KeyController: a key went down (or repeated).
Fields
KeyReleased
KeyController: a key went up.