Table of Contents

Class NodeClipboard

Namespace
The.Model.Editor
Assembly
Instagile.Model.dll

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

bool

Node

the node most recently cut or copied, if any

public NodeModelBase? Node { get; }

Property Value

NodeModelBase

Methods

CanCopy(NodeModelBase)

public bool CanCopy(NodeModelBase node)

Parameters

node NodeModelBase

Returns

bool

CanCut(NodeModelBase)

public bool CanCut(NodeModelBase node)

Parameters

node NodeModelBase

Returns

bool

CanPaste(NodeModelBase)

public bool CanPaste(NodeModelBase target)

Parameters

target NodeModelBase

Returns

bool

Clear()

public void Clear()

Copy(NodeModelBase)

public void Copy(NodeModelBase node)

Parameters

node NodeModelBase

Cut(NodeModelBase)

public void Cut(NodeModelBase node)

Parameters

node NodeModelBase

Paste(NodeModelBase)

public void Paste(NodeModelBase target)

Parameters

target NodeModelBase

Events

Changed

public event Action? Changed

Event Type

Action