Module Simantics/Clipboard

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

copyNode :: Resource -> <Proc> ()

Copies the given resource to the Simantics clipboard, as the copy command of the model browser does. A failure is logged rather than raised.

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

Copies the given resources to the Simantics clipboard, as the copy command of the model browser does. A failure is logged rather than raised.

copyPasteDiagramContents :: ICanvasContext -> ICanvasContext -> [Resource] -> Boolean

copyPasteDiagramContents source target elements copies the given elements from the diagram of the source canvas context and pastes them onto the diagram of the target canvas context, by selecting them in source and sending the copy and paste commands. The elements must be on the diagram of source; the call fails if one of them is not. Always returns True.

copyPasteNode :: Resource -> Resource -> <Proc> ()

copyPasteNode node target copies node to the clipboard and pastes it under target, leaving the clipboard holding node.

cutNode :: Resource -> <Proc> ()

Cuts the given resource to the Simantics clipboard, as the cut command of the model browser does. A failure is logged rather than raised.

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

Cuts the given resources to the Simantics clipboard, as the cut command of the model browser does. A failure is logged rather than raised.

delete :: ICanvasContext -> [Resource] -> <Proc> Boolean

delete ctx elements removes the given diagram elements by selecting them in the given canvas context and sending it the delete command. The elements must be on the diagram of the context; the call fails if one of them is not. Always returns True.

pasteNode :: Resource -> <Proc> ()

Pastes the contents of the Simantics clipboard under the given target resource, using the paste handler the target adapts to.