drawingPart :: Drawing lbl leaf -> DPath -> Drawing lbl leaf type DPath = [Int] up :: DPath -> DPath maybeDrawingPart :: Drawing lbl leaf -> DPath -> Maybe (Drawing lbl leaf) replacePart :: Drawing lbl leaf -> DPath -> Drawing lbl leaf -> Drawing lbl leaf updatePart :: Drawing lbl leaf -> DPath -> (Drawing lbl leaf -> Drawing lbl leaf) -> Drawing lbl leaf mapLabelDrawing :: (t -> lbl) -> Drawing t leaf -> Drawing lbl leaf deletePart :: Drawing lbl leaf -> [Int] -> Drawing lbl leaf drawingAnnots :: Drawing a leaf -> [(DPath, a)]
These are functions that operate on parts of drawings.
Values of type
DPath are used as references to parts of drawings. The
up returns the path of the parent of a node.
There are two functions for extracting a part with a given path.
drawingPart fails if the path refers to a non-existing
Just part if the part exists,
updatePart replace parts of
drawings. They fail if the path refers to a non-existing part.
mapLabelDrawing applies a function to all the labels in a drawing.
deletePart deletes a part of a drawing.
drawingAnnots returns the paths and labels of the labelled nodes of
replacePart drawing path newpart = updatePart drawing path (const newpart)