Add per-node ContextMenuStrip support
Brought to you by:
agaman
This patch adds per-Node context menu support via a
scheme very similar to existing the tooltip support.
Because it replaces the ContextMenuStrip during every
MouseMove, it could be inefficient depending on the
Provider implementation; perhaps popping up the
ContextMenu on a right-mouse-click would be more
efficient -- but since the ContextMenuProvider can
cache ContextMenuStrips (especially if it's permitted
to assume only the latest ContextMenuStrip returned
from GetContextMenu needs to be valid, and so can
recycle small numbers of ContextMenuStrips or even a
single one), that need not be a concern. Hence I left
it this way for both clarity and to allow a best-case
implementation.
Logged In: YES
user_id=1115413
Changed the patch to modify the context menu only on a right
click instead of each mouse move. This removes the need to
cache the ContextMenuStrips in the Provider, which was
really more cumbersome than I'd thought. It actually ended
up a bit cleaner too.
Logged In: YES
user_id=1115413
Fixed malformed patch