data Drawing b a = AtomicD a | LabelD b (Drawing b a) | AttribD GCSpec (Drawing b a) | SpacedD Spacer (Drawing b a) | PlacedD Placer (Drawing b a) | ComposedD Int [Drawing b a] instance (Graphic b) => Graphic (Drawing a b) type DPath = [Int] atomicD :: a -> Drawing b a labelD :: a -> Drawing a b -> Drawing a b up :: DPath -> DPath
Drawing label leafare compositions of simple graphical objects into a tree structure using layout combinators.
atomicD constructs atomic drawings (leaves).
The leaves can be of arbitrary type, but are required to be in the class
Graphic by fudgets that display drawings. By using the type Gfx
you can mix different types of leaves in the same drawing.
Nodes in the tree can be labelled with values of an arbitrary type
label using the function
A node in a drawing can specify drawing attributes that are inherited by the children of that node. Drawing attributes can be specified in various ways.
Values of type
DPath are used as references to parts of drawings. The
up returns the path of the parent of a node.
vhboxD [atomicD "Yes",atomicD "No"]
Composing drawings: hboxD, vboxD et al.
Specifying drawing attributes: attribD et al.
Functions on parts of drawings: drawingPart, replacePart et al.
The class Graphic, the type Gfx.
Fudgets that display graphics: hyperGraphicsF, graphicsF, graphicsDispF, graphicsLabelF, ...
Drawingwill probably be made abstract. Don't use the constructors directly when constructing drawings.
This page documents work progress. Information on this page is subject to change without notice and does not represent a commitment on the part of the Fudgets corporation.