"""Returns all diagrams of the given model."""
diagramsOf :: Model -> <ReadGraph> [Diagram]
-diagramsOf model = recurse
- DIA.Diagram
- (configurationOf model)
+diagramsOf model = diagramsUnder $ configurationOf model
+
+"""
+Returns all diagrams under the specified diagram folder.
+The parameter can also be the configuration root `configurationOf`
+in which case this function returns the same as `diagramsOf model`.
+"""
+diagramsUnder :: DiagramFolder -> <ReadGraph> [Resource]
+diagramsUnder folder = recurse DIA.Diagram folder
where
recurse t r = do
cs = children r
importJava "org.simantics.modeling.svg.CreateSVGElement" where
createSVGElement :: Resource -> String -> ByteArray -> Double -> Double -> <WriteGraph> ()
+ createSVGElementR :: Resource -> String -> ByteArray -> Double -> Double -> <WriteGraph> Resource
importSVGElement :: Resource -> File -> Double -> Double -> <WriteGraph> ()
+ importSVGElementR :: Resource -> File -> Double -> Double -> <WriteGraph> Resource
importJava "org.simantics.diagram.synchronization.graph.RemoveElement" where
removeElement :: Resource -> Resource -> <WriteGraph> ()