Safe Haskell | None |
---|---|
Language | Haskell2010 |
- atLeastSize :: Size -> VCanvas -> VCanvas
- cfContext :: CanvFrame -> ToolContext
- connect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvas
- defaultFileSaveClipBox :: VCanvas -> BBox
- disconnect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvas
- drawCanvas :: VCanvas -> Rectangle -> IO ()
- editFunction :: VCanvas -> CanvFrame -> IO VCanvas
- frameChanged :: VCanvas -> WGraph -> CanvFrame -> WGraph -> CanvFrame -> IO ()
- nodeContainerFrame :: VCanvas -> WGraph -> Node -> CanvFrame
- pointSelection :: WGraph -> CanvFrame -> Position -> Maybe Selection
- renderCanvas :: VCanvas -> BBox -> Bool -> Render ()
- vcAddFrame :: VCanvas -> Functoid -> Maybe [Value] -> FrameType -> Env -> Double -> Double -> Double -> Maybe Node -> IO VCanvas
- vcClearSelection :: VCanvas -> IO VCanvas
- vcClearFrame :: VCanvas -> CanvFrame -> IO VCanvas
- vcCloseFrame :: VCanvas -> CanvFrame -> IO VCanvas
- vcEvalDialog :: VCanvas -> CanvFrame -> IO VCanvas
- vcFrameAddFunctoidNode :: VCanvas -> CanvFrame -> Functoid -> Double -> Double -> IO VCanvas
- vcFrameAddNode :: VCanvas -> CanvFrame -> ExprNode -> [String] -> Double -> Double -> IO VCanvas
- vcFrameDeleteNode :: VCanvas -> CanvFrame -> Node -> IO VCanvas
- vcFrameDeleteTree :: VCanvas -> CanvFrame -> Node -> IO VCanvas
- vcFrameSubframes :: VCanvas -> CanvFrame -> [CanvFrame]
- vcGetFrame :: VCanvas -> WGraph -> Node -> CanvFrame
- vcInvalidateFrameWithParent :: VCanvas -> WGraph -> CanvFrame -> IO ()
- vcInvalidateBox :: VCanvas -> BBox -> IO ()
- vcUpdateFrameAndGraph :: VCanvas -> CanvFrame -> WGraph -> VCanvas
- vcanvasNew :: Style -> Double -> Double -> IO VCanvas
- vcanvasNodeAt :: VCanvas -> Position -> Maybe Node
- vcanvasNodeRect :: VCanvas -> Node -> Rectangle
- whichFrame :: VCanvas -> Double -> Double -> Maybe CanvFrame
- callFrames :: VCanvas -> String -> [CanvFrame]
Documentation
atLeastSize :: Size -> VCanvas -> VCanvas Source
Return a canvas of at least the specified size and otherwise like the given canvas.
cfContext :: CanvFrame -> ToolContext Source
connect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvas Source
Connect nodes. If parent and child are different, connect the i-th inlet of node parent to the o-th outlet of node child UNLESS doing so would create a cycle parent -> child -> ... -> parent AND UNLESS something is already connected to the ith inlet of the parent node.
disconnect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvas Source
Disconnect nodes. Disconnect wouldn't need to be in the IO monad, except that it needs the same type signature as connect.
drawCanvas :: VCanvas -> Rectangle -> IO () Source
Draw the canvas in its window, on screen
editFunction :: VCanvas -> CanvFrame -> IO VCanvas Source
editFunction: reverse of defineFunction: replace the call frame by an edit frame; does not change the VPUI (global env.), just the canvas..
pointSelection :: WGraph -> CanvFrame -> Position -> Maybe Selection Source
What is selected (if anything) at a point
renderCanvas :: VCanvas -> BBox -> Bool -> Render () Source
Render the canvas in Cairo (use with renderWith to provide an alternate surface, such as an SVG file).
vcAddFrame :: VCanvas -> Functoid -> Maybe [Value] -> FrameType -> Env -> Double -> Double -> Double -> Maybe Node -> IO VCanvas Source
Add a frame representing a functoid to the canvas.
Use mvalues = Nothing if you do not want the frame to be evaluated as a function call, otherwise mvalues = Just values.
prevEnv is *supposed* to be the previous environment, i.e., that of the "parent" frame or the canvas, not of the new frame, because vcAddFrame itself will extend the environment with the new (vars, values). But this is odd, because openNode calls vcAddFrame apparently with the *new* environment as prevEnv, and yet it works correctly.
Caution: I think it is necessary for the canvas to have been realized before calling this function!
vcClearSelection :: VCanvas -> IO VCanvas Source
Make nothing be selected
vcClearFrame :: VCanvas -> CanvFrame -> IO VCanvas Source
vcClearFrame - clear a frame in a canvas; not yet implemented What does this mean?
vcFrameAddNode :: VCanvas -> CanvFrame -> ExprNode -> [String] -> Double -> Double -> IO VCanvas Source
vcFrameDeleteTree :: VCanvas -> CanvFrame -> Node -> IO VCanvas Source
Remove the (sub)tree rooted at the given node. Removes it from the graph of the canvas and from the FunctoidParts of the frame.
vcFrameSubframes :: VCanvas -> CanvFrame -> [CanvFrame] Source
Find a frame's subframes, i.e., those that were expanded to trace the execution of a function call. Cannot be in an edit frame.
vcInvalidateBox :: VCanvas -> BBox -> IO () Source
vcUpdateFrameAndGraph :: VCanvas -> CanvFrame -> WGraph -> VCanvas Source
Ask the vcanvas to update the frame and install a new graph. Frames are identified by their frame nodes, so the new frame must have the same frame node as the old. It is an unreported error if there is not exactly one match.
vcanvasNodeAt :: VCanvas -> Position -> Maybe Node Source
Find the node, if any, at a given position on the canvas.
vcanvasNodeRect :: VCanvas -> Node -> Rectangle Source
callFrames :: VCanvas -> String -> [CanvFrame] Source
Find the frames that are calling the named function