Context Menu — rataflow

rataflow

GitHubdocs.rscrates.io
examples/context_menu.rs ↗

A context menu per target: node, edge, and empty canvas.

A right-click reports what was under it — NodeContextMenu, EdgeContextMenu or PaneContextMenu — and the menu is built from that. The event arrives on release, and only if the press never turned into a drag, so the same button can also carry a drag gesture (see the multi_select example).

Some terminals keep the right button for themselves — Warp opens its own menu and never forwards the event. Space is the keyboard path, and also what a real app would offer: ask Flow::pick what is under the cursor and open the same menu.