Module Experimental/Simantics/Diagram/Clipboard

This module is undocumented. This is a list of its definitions.

copyElements :: [Resource] -> <Proc> ()

Copies the given diagram elements onto the clipboard, as the diagram editor does. The elements must all belong to the same diagram; the diagram is taken from the first of them. An empty list clears what was copied.

The copying itself is done on a background thread, so this returns before the clipboard has been filled.

cutElements :: [Resource] -> <Proc> ()

Cuts the given diagram elements onto the clipboard: the same as copyElements, except that the elements are removed from their diagram.

pasteElements :: Resource -> Double -> Double -> <Proc> ()

Pastes what was last copied or cut onto the given diagram, placing it at the given point in diagram coordinates. Fails if nothing has been copied or cut.