sifflet-lib-1.0: Library of modules shared by sifflet and its tests and its exporters.Source codeContentsIndex
Sifflet.UI.Canvas
Synopsis
atLeastSize :: Size -> VCanvas -> VCanvas
cfContext :: CanvFrame -> ToolContext
connect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvas
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
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 -> VCanvasSource
Return a canvas of at least the specified size and otherwise like the given canvas.
cfContext :: CanvFrame -> ToolContextSource
connect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvasSource
Connect nodes
disconnect :: VCanvas -> Node -> WEdge -> Node -> WEdge -> IO VCanvasSource
Disconnect nodes
drawCanvas :: VCanvas -> Rectangle -> IO ()Source
editFunction :: VCanvas -> CanvFrame -> IO VCanvasSource
editFunction: reverse of defineFunction: replace the call frame by an edit frame; does not change the VPUI (global env.), just the canvas..
frameChanged :: VCanvas -> WGraph -> CanvFrame -> WGraph -> CanvFrame -> IO ()Source
nodeContainerFrame :: VCanvas -> WGraph -> Node -> CanvFrameSource
pointSelection :: WGraph -> CanvFrame -> Position -> Maybe SelectionSource
What is selected (if anything) at a point
vcAddFrame :: VCanvas -> Functoid -> Maybe [Value] -> FrameType -> Env -> Double -> Double -> Double -> Maybe Node -> IO VCanvasSource

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 VCanvasSource
Make nothing be selected
vcClearFrame :: VCanvas -> CanvFrame -> IO VCanvasSource
vcClearFrame - clear a frame in a canvas; not yet implemented What does this mean?
vcCloseFrame :: VCanvas -> CanvFrame -> IO VCanvasSource
Close a frame and any subframes of it
vcEvalDialog :: VCanvas -> CanvFrame -> IO VCanvasSource
vcFrameAddFunctoidNode :: VCanvas -> CanvFrame -> Functoid -> Double -> Double -> IO VCanvasSource
vcFrameAddNode :: VCanvas -> CanvFrame -> ExprNode -> [String] -> Double -> Double -> IO VCanvasSource
vcFrameDeleteNode :: VCanvas -> CanvFrame -> Node -> IO VCanvasSource
vcFrameDeleteTree :: VCanvas -> CanvFrame -> Node -> IO VCanvasSource
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.
vcGetFrame :: VCanvas -> WGraph -> Node -> CanvFrameSource
vcInvalidateFrameWithParent :: VCanvas -> WGraph -> CanvFrame -> IO ()Source
vcInvalidateBox :: VCanvas -> BBox -> IO ()Source
vcUpdateFrameAndGraph :: VCanvas -> CanvFrame -> WGraph -> VCanvasSource
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.
vcanvasNew :: Style -> Double -> Double -> IO VCanvasSource
vcanvasNodeAt :: VCanvas -> Position -> Maybe NodeSource
Find the node, if any, at a given position on the canvas.
vcanvasNodeRect :: VCanvas -> Node -> RectangleSource
whichFrame :: VCanvas -> Double -> Double -> Maybe CanvFrameSource
callFrames :: VCanvas -> String -> [CanvFrame]Source
Find the frames that are calling the named function
Produced by Haddock version 2.6.1