Class NodeClipboard
An in-process clipboard for cut/copy/paste of nodes in the master tree.
public sealed class NodeClipboard
- Inheritance
-
NodeClipboard
- Inherited Members
Remarks
Pasting always creates new nodes with fresh IDs by replaying Create events at the destination; pasting a pending cut also deletes the source in the same event batch, so the whole operation lands on the undo stack as a single step. Node identity is never preserved - a cut-paste is a copy plus a delete, not a move.
Properties
IsCut
true while a cut is pending; pasting will then delete the source
public bool IsCut { get; }
Property Value
Node
the node most recently cut or copied, if any
public NodeModelBase? Node { get; }
Property Value
Methods
CanCopy(NodeModelBase)
public bool CanCopy(NodeModelBase node)
Parameters
nodeNodeModelBase
Returns
CanCut(NodeModelBase)
public bool CanCut(NodeModelBase node)
Parameters
nodeNodeModelBase
Returns
CanPaste(NodeModelBase)
public bool CanPaste(NodeModelBase target)
Parameters
targetNodeModelBase
Returns
Clear()
public void Clear()
Copy(NodeModelBase)
public void Copy(NodeModelBase node)
Parameters
nodeNodeModelBase
Cut(NodeModelBase)
public void Cut(NodeModelBase node)
Parameters
nodeNodeModelBase
Paste(NodeModelBase)
public void Paste(NodeModelBase target)
Parameters
targetNodeModelBase
Events
Changed
public event Action? Changed