sifflet-lib-1.2.5: Library of modules shared by sifflet and its tests and its exporters.

Safe HaskellSafe-Infered

Sifflet.UI.Frame

Synopsis

Documentation

data CanvFrame Source

A CanvFrame represents (indirectly, through cfRoot, and we access to the graph which is provided by the VCanvas) a subgraph such as the expression tree of a function which is being edited or called.

Constructors

CanvFrame 

Fields

cfHeader :: TextBox

top area of the frame

cfFooter :: TextBox

bottom area

cfVarNames :: [String]

variable (parameter) names

cfParent :: Maybe Node

the node opened to make this frame

cfFrameNode :: Node

this frame as a node in the graph; also serves as the ID of the frame.

cfEnv :: Env

environment for evaluation

cfBox :: BBox

box of the whole frame (header, tree, and footer)

cfLevel :: Double

0 = bottom level, 1 = next higher, etc.

cfFunctoid :: Functoid

includes tlo for an edit frame

frameType :: FrameType

edit or call frame

Instances

Eq CanvFrame

CanvFrame needs to be Eq in order to be Ord, but maybe the Eq and Ord definitions should be more in the same spirit?

Show CanvFrame 

argIoletCounter :: [String] -> ExprNode -> (Int, Int)Source

argIoletCounter returns (no. of inlets, no. of outlets) derived from the argument list of a function still being defined

cfEvalReady :: CanvFrame -> BoolSource

A frame is eval ready -- that is, okay to run the Eval Frame dialog -- if it is a call frame with no parent

cfRoot :: CanvFrame -> NodeSource

The root of the tree displayed in the frame

frameNewWithLayout :: Style -> Position -> Double -> Functoid -> Maybe [Value] -> FrameType -> Node -> Env -> Maybe Node -> (CanvFrame, FunctoidLayout)Source

Figure out the frame layout for a function. Returns the layout and frame. Currently, the frame is marked as a call frame; if you want to edit it, call (editFrame? editFunction?)

frameOffset :: Style -> CanvFrame -> PositionSource

Where to position a new frame that is grown out of an old frame? This is a very rough draft of frameOffset

levelOrder :: CanvFrame -> CanvFrame -> OrderingSource

Use levelOrder for sorting frames before drawing them