#[non_exhaustive]pub enum DEv {
Show 15 variants
Select,
Move {
keys: Vec<u64>,
d: [f32; 2],
total: [f32; 2],
done: bool,
},
Connect {
from: u64,
to: u64,
quick: bool,
},
ConnectDrag {
from: u64,
at: [f32; 2],
over: u64,
},
ConnectCancel,
Waypoint {
edge: u64,
idx: u32,
at: [f32; 2],
insert: bool,
done: bool,
},
WaypointDelete {
edge: u64,
idx: u32,
},
Activate(DHit),
Context(DHit, [i32; 2]),
Delete,
Click {
at: [f32; 2],
},
DoubleClick {
at: [f32; 2],
},
ViewChanged,
Toggle(u64),
Resize {
key: u64,
rect: [f32; 4],
done: bool,
},
}Expand description
what the user did (ui.diagram’s result, in order)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Select
st.sel changed
Move
move nodes keys by d (world units); the d of one gesture add up to total; done = the
gesture ended (released, a key nudge; Esc sends d = minus everything so far)
Connect
connect from -> to (port or node keys); quick = dragged out of a port with DG_SELECT
ConnectDrag
a connection is being drawn: the pointer at at, over port / node over (0 = none)
ConnectCancel
the connection ended without a target (released elsewhere, Esc)
Waypoint
waypoint idx of edge goes to at; insert = add it at idx first (the first event of a drag from a middle handle); done = released
WaypointDelete
remove waypoint idx of edge (double click on its handle, Esc after an insert)
Activate(DHit)
double click on a node / port / edge, Enter on the focused node
Context(DHit, [i32; 2])
right click, Shift+F10 or the menu key: at = window px (logical, for popups)
Delete
Del with a selection: delete st.sel
Click
a click on the background, or anywhere with DG_PLACE (snapped then); world units
DoubleClick
a double click on the background with DG_SELECT (no Shift, no Ctrl): the world point of the second press, not snapped; neither a Click nor a marquee follows it
ViewChanged
zoom or centre changed
Toggle(u64)
a click on the collapse button of a DN_TOGGLE node
Resize
the resize handle of a DN_RESIZE node was dragged: its new box x, y, w, h (world, the top left corner stays; at least 8 units); done = released (Esc: the box it had)