Table of Contents

Class ClipboardManager

Namespace
FlowGraph.Avalonia
Assembly
FlowGraph.Avalonia.dll

Manages clipboard operations for nodes and edges.

public class ClipboardManager
Inheritance
ClipboardManager
Inherited Members

Properties

HasContent

Gets whether there is content on the clipboard.

public bool HasContent { get; }

Property Value

bool

Methods

Clear()

Clears the clipboard.

public void Clear()

Copy(IEnumerable<Node>, IEnumerable<Edge>)

Copies the specified nodes and their connecting edges to the clipboard.

public void Copy(IEnumerable<Node> nodes, IEnumerable<Edge> allEdges)

Parameters

nodes IEnumerable<Node>
allEdges IEnumerable<Edge>

Duplicate(Graph, IEnumerable<Node>, IEnumerable<Edge>, Point)

Duplicates the specified nodes in place with an offset.

public (List<Node> nodes, List<Edge> edges) Duplicate(Graph graph, IEnumerable<Node> nodes, IEnumerable<Edge> allEdges, Point offset)

Parameters

graph Graph

The target graph.

nodes IEnumerable<Node>

The nodes to duplicate.

allEdges IEnumerable<Edge>

All edges in the graph.

offset Point

The offset for duplicated nodes.

Returns

(List<Node> nodes, List<Edge> edges)

The duplicated nodes and edges.

Paste(Graph, Point)

Pastes clipboard content into the graph at the specified position.

public (List<Node> nodes, List<Edge> edges) Paste(Graph graph, Point pastePosition)

Parameters

graph Graph

The target graph.

pastePosition Point

The canvas position to paste at (center of pasted nodes).

Returns

(List<Node> nodes, List<Edge> edges)

The pasted nodes and edges.