Graph-Easy
==========

See Graph::Easy under LIMITATIONS for some hot topics.

In addition:

Important short-term TODO:

* layouter: 
  + honor flow on an edge
  + don't build chains across groups
  + when having edges with and without flow, track chains only for these with
    a flow (to stop non-flow edges taking the space first and blocking it)
  + route multiple edges to/from a node in the proper order (shortest first)
  + edges with no specific start/end port should not block ports that
    are reserved for edges with a start/end port number
  + placing a node with an origin/offset inside another node results in
    endless loops as this condition is not checked and the placement
    of the grandparent node will fail, always

* classnames: "Second" and "second" are the same class, but as_txt output
               should output the class as it was input.

* it seems not possible to set class-styles on anon nodes:
  node.anon { fill: red; } [ ] --> [ A ]

* v-- and --^ edges in HTML (mis-aligned arrows)
  (complete edge-arrow alignment in HTML)

* joints + labels on edges

* as_ascii: use custom text-wrap (Text::Wrap is well, buggy)

* as_html: 
  + handle multi-celled vertical edges with groups correctly
  + shift arrows on hor edge end/starts (non-short) left/right, too
  + output of node-clusters is slightly wrong
  + there is no space between two nodes placed next (with filler
    cell) to each other. Make filler cells output a &nbsp;?
  + bidir. self-loops are rendered with only one arrow: [A] <--> [A]
  + define missing HTML edge pieces: CROSS sections with end/start points
  + define JOINTs with start/end pieces (6 for each joints, making 24 types)
  + implement HTML nodes as triangles, house, etc. using slanted edges

* fix nesting with pod-formatted labels
* as_ascii: implement pod-formatted labels (*bold*, /italic/,
  _underline_, -l-i-n-e-t-h-r-o-u-g-h-, ~overline~, "code")

* edges between groups (ala "( 1 [A ]) -> ( 2 [B] )") or between a node
  and a group are missing in HTML, ASCII and SVG.

* It would be good if we could remove Node::Empty (it blocks a cell
  just to draw the right/bottom border pieces)
  (we might put these "invisible" nodes into a different "cells" field,
   which will be rendered, but not queried for path finding etc)

* as_txt(): the following are wrong as txt:
  + 3_autosplit_hang.txt

* use "shape: record" and label="{ { 00 | 01 | 02 } | { 10 | 112 | 12 } }" to
  implement auto-split nodes in graphviz (including <port>'s and rerouting
  edges to the ports), or use HTML labels

* joints in as_boxart() have problems with the joint character:
  "[ A ] --> { start: south, 0; } [ A1 ], [ A2 ]" produces
	┌───┐
	│ A │
	└───┘
	  │       ┌────┐
	  ┼─────> │ A1 │
	  │       └────┘
	  │       ┌────┐
	  └─────> │ A2 │
                  └────┘

Tests:

* test the new graphviz output (inter-group links and joints)

Parser:

* edge parsing " -- test \>-->" => "test >" as edge label
* be truly recursive: parse nested graphs/groups/nodes
* support for node splitting ala:

    "[ A ] | [ B | C ] || [ D | E ]"

* Nodes with both "|" and "\|" in their name are not parsed correctly
* handle RGB colors with percentages or fractions like: rgb(100%,50%,0.5)
* handle RGBA colors (with an alpha channel component, making transparency
  possible, especially important for animations)
* quoting of "[" and "{" inside edge labels ala:

  [ A ] -- label \[ 8 ] --> [ B ]

* graphviz parsing of lingering attributes:
  [ label="Berlin" ]
  "Bonn"	// should be shown as "Berlin"

Output:

* selfloop edges should counter the general flow:

                    Until not done
                  +----------------+
                  v                |
  +-------+     +--------------------+     +-----+
  | Start | --> | Main               | --> | End |
  +-------+     +--------------------+     +-----+

  versus (loop still going left):

                  Until not done
                +----------------+
                v                |
  +-----+     +--------------------+     +-------+
  | End | <-- | Main               | <-- | Start |
  +-----+     +--------------------+     +-------+

* support different edge starting point styles ala:

  ----->  |----->  o----->  +----->  *----->  >>---->

* as_txt(): 
  + output of node clusters and node chains is not optimal
* as_ascii()/as_boxart(): 
  + better support for different shapes (circle, box, polygon etc)
  + text-styles: underline, overline, strike-through, italic and bold
* as_graphviz(): (these things seem to be actually not possible in Graphviz)
  + border-styles: wave, dot-dot-dash and dot-dash
  + edge-styles: wave, dot-dot-dash and dot-dash
  + text-styles: underline, overline, strike-through, italic and bold
* as_ascii() and others: grow cells around point-shaped nodes to intrude:

	...........................
        :      :  |   :     :     :
	:      :  |   :     :     :
	:      :  v   :     :     :
	...........................
        :       :   :       :     :
	:-----> : * : <---- :     :
        :       :   :       :     :
	...........................
  (at least the edge pieces could omit their left/right spacer in ASCII)

* as_boxart has some incorrect corner pieces:
   echo "[A|B|C||D]" | perl examples/as_boxart
   ┌───┬───┬───┐
   │ A │ B │ C │
   └───┼───┴───┘
   │ D │
   └───┘
   echo "[A| |C||D| |E]" |perl examples/as_boxart
   ┌───┬  │───┐
   │ A │  │ C │
   └───┼   ───┤
   │   │  │   │
   │ D │  │ E │
   └───┘   ───┘

Layout:

* allow user to specify max graph width (in cells) to avoid overly wide graphs
* auto-grow nodes to be multicelled depending on the dimensions of their label
  ("main page" gets 2x1, while "a \nb \nc \nd \ne \n" gets 1x2 cells)
  This currently causes problems and wierd layouts.
* Use the seed to generate randomized layouts

Rendering/Layout:

* allow "align: center, middle|top|bottom" for vertical alignment of labels.
* add padding attributes (especially usefull for HTML/SVG output)
* add "shape" for groups:
  + rect
  + compact (the default, what it is now)
  + none (no background, no border, no label)

General:

* allow multiple subclasses ala CSS:

	node.red { color: red; }
	node.green { color: green; }

	[ Red ] { class: red green; } -> [ Green ] { class: green red; }

* add pseudo-class "any { color: red; }"? Better allow class selectors.
  + .cities (all objects of class cities)
  + #id (object with ID id)

* implement pseudo-class "step" for animations (see POD)

Optimizing:

* put framebuffer related routines into own package (Graph::Easy::As_ascii)
  to avoid the dilemma that we need them from both Node and Graph.
  Likewise, some routines used by objects (e.g. graph, node etc) should
  be in a super-package and inherited)
* improve the after-layout optimizer
* less memory: store border and edge styles as ints instead of "solid" etc
* use AUTOLOAD for accessors in Node.pm: most are never used by normal code

