sifflet-2.3.0: Simple, visual, functional language for learning about recursion.

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Sifflet.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 Source

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 Source 

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 -> Bool Source

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 -> Node Source

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 -> Position Source

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 -> Ordering Source

Use levelOrder for sorting frames before drawing them