pub enum CanvasEvent {
Hover {
pointer: Pointer,
shift: bool,
},
Leave,
Click {
pointer: Pointer,
double: bool,
shift: bool,
},
Cancel,
Confirm,
Delete,
Move {
key: String,
from: Vector3,
to: Vector3,
pointer: Pointer,
done: bool,
shift: bool,
},
Stroke {
from: Pointer,
to: Pointer,
done: bool,
shift: bool,
},
Gizmo {
drag: GizmoDrag,
from: Gizmo,
done: bool,
},
SelectBox {
corners: [Pointer; 4],
crossing: bool,
add: bool,
},
Key {
key: String,
},
View {
up: Vector3,
},
}Expand description
A pointer or key event the editor passes on to an operation, having
taken what is its own: picks, selecting, dragging handles (see
the step editor, crate::step_editor).
Variants§
Hover
The pointer moved over the viewport with no button held, shift
held or not.
Leave
The pointer left the viewport.
Click
A primary click that selected nothing: a double one, one while the operation has a tool in hand, one on nothing selectable.
Cancel
What Escape does: end what is in progress — a chain being drawn, the points picked for a tool — and, with nothing in progress, put the tool in hand down. The selection is cleared already.
Confirm
What Enter does: finish what is in progress, a chain being drawn, a constraint to apply; the tool stays in hand.
Delete
What Delete and Backspace do: delete the selection.
Move
The draggable visual key dragged in the plane worked in, from
where it was grabbed to where the pointer is now — pointer, with
shift held or not. done on release.
Stroke
A drag of the tool in hand, where it strokes (see
super::InHand::Strokes): the ray where it went down and the ray
where the pointer is now. done on release.
Gizmo
A drag of the form’s gizmo (see super::Gizmo): what it did
since it started, to apply to the step’s arguments as they were
then — which they are again whenever this is sent. done on
release.
from is the gizmo as the step asked for it when the drag started:
where it stood, along what it stands on’s own axes.
SelectBox
A selection box, with nothing in hand (see
StepEditEvent::SelectBox): what it takes of the selectable
visuals is the operation’s to decide, from what they stand for, and
to select — added to the selection, if add.
Key
Any other key, as the browser names it, a letter lowercased: a tool’s shortcut.
View
The view settled, up pointing up the screen (see
StepEditEvent::View).
Trait Implementations§
Source§impl Clone for CanvasEvent
impl Clone for CanvasEvent
Source§fn clone(&self) -> CanvasEvent
fn clone(&self) -> CanvasEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more