Blobs

a diagram editor in Haskell

Blobs is a diagram editor for directed graphs. It is written in
Haskell, using the platform-independent GUI toolkit wxHaskell. It is a
community project at a fairly early stage of development - you are
encouraged to get involved and improve it!

Blobs is a front-end for drawing and editing graph diagrams.
You must add your own back-end engine if you want it to
do some analysis or processing of the graph. There are
various analysis engines that use Blobs as a front-end, e.g.

On Windows you may also need to install
mingw in order to have the GNU make
utility etc.

In the toplevel Blobs directory, there is a Makefile. You may need to
edit it slightly, e.g. for a different version of ghc, or to
enable/disable building a MacOS application bundle (symbol MAC=yes).

Just type 'make' and Blobs should build. If you change or add any
imports in the code itself, you may need to 'make depend' to update the
Makefile.

Usage instructions

Right click on the canvas, nodes, and edges for context menus.

To create a node, shift click on some blank canvas.

To create an edge, select (click) the source node then shift-click
the target node.

To delete a node or edge, select it and press backspace.

To rearrange the diagram, click and drag nodes to where you want them.

To make an edge look tidier, add a control-point from its context menu,
and drag the point to where you want it.

You can add multiple items into the current selection by meta-clicking
the extra nodes and control points. (Meta = Apple key, or Alt key.)
A multiple selection can be dragged just like a single selection.

Discussion about features is encouraged before you implement them.
Patches to create or improve documentation (including this webpage) are
just as welcome as actual code.

To Do list

More than one analysis method. Currently, there is a class
Analysis with the methods analysis and
revert. But this means there can only ever be one
implementation of analysis for a given graph type. The class
should be replaced with a concrete datatype containing a lookup
table of analysis methods. Then the Edit menu can show as many or
as few analyses as are available.
Done, MW, 2005-11-16. The GraphOps datatype
(in module Operations) replaces the Analysis class. There is a new
"Operations" menu.

Multiple selection. The ability to group multiple nodes
together, by selecting a rectangular area of the diagram. They can
then be dragged or deleted together. (Should also select any edge
control-points within the area.)
Partially done, MW, 2005-11-16. Implemented
multiple selection with meta-click. But dragging a rectangular
area (to select everything within it) remains to be done.Nearly complete, MW, 2005-11-17.
Dragging a rectangular area now selects everything within it.
The rectangular area itself is not yet highlighted, just the
contained items.Complete, MW, 2005-11-18.
Multiple selection by dragging out a rectangle now displays the
rectangle as well as the selected items.

Positioning guides. Apple Keynote has the best diagram
layout editor I have ever come across. When one object lines up
horizontally or vertically with any other object on the diagram a
yellow line appears connecting up their centres. (It disappears
again once you drop the object). This simple idea makes it
incredibly easy to get things looking just right, without any need
for absolute coords or grids etc. I think the objects also "snap"
to the line when the mouse is within one or two pixels of the
alignment.

Visible palette. At the moment, if you load a palette from file,
you get the palette on the right-click context menu of nodes. But this
is a bit nasty, because (a) you have to create the node first, then
change its shape; (b) you can't see pictures of the palette. So
there should be a separate window with a table of all the node
shapes in the palette. Selecting a shape from the palette will make
that the default shape for all subsequent node-creation until another
shape is selected from the palette.

Palette editor. How do you create a palette? At the moment,
by hand in a text editor. Much better to have a graphical way of
creating shapes, cutting-n-pasting shapes into palette sets, etc.

Edge palette. Do we need a palette of different edge shapes
as well as node shapes?

Ports. A node may need some specific connection ports, where
edges may attach to. For instance, this might be because the
information stored at a node is an expression to be applied to
inputs from edges, generating output on other edges. The expression
would need to distinguish different input sources and output channels.