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

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

In addition:

Important short-term TODO:

* as_txt(): the following are wrong as txt:
  + 4_autosplit_offset.txt
  + 3_autosplit_hangt.txt
* 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 queryied for path finding etc)
* missing edges sometimes do not result in an error message
* unplacing edge-crossings does not work properly, leaving stray crossings
* implement HTML nodes as triangles, house, etc. using slanted edges
* define missing HTML edge cells (selfloops, and CROSS w. end/start points)
* as_html(): output of node-clusters is slightly wrong
* as_html(): there is no space between two nodes placed next (with filler
	     cell) to each other. Make filler cells output a &nbsp;
* 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)
* as_html(): attributes "fill" and "border-XXX" on a group are not put on
             the individual group cells, making these only work when defined
	     as part of a group-class
* as_txt: output of autosplit nodes is broken when no label gets set
  "[A|B]" results in "[ A|B ] { label: A; }"
* 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)

Parser:

* edge parsing " -- test \>-->" => "test >" as edge label
* deal with " -> [ node ], [node2], [node3]"
* parse nested graphs
* support for node splitting ala:

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

* use "{}" to nest blocks?
* Nodes with both "|" and "\|" in their name are not parsed correctly
* handle RGB colors with percentages or fractions like: rgb(100%,50%,0.5)
* quoting of "[" and "{" inside edge labels ala:

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

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----->  +----->  *----->  >>---->

* support egde "style: invisible"
* as_txt(): output of node clusters is not optimal
* as_txt(): output of node chains is not optimal
* as_ascii(): output group borders and group labels
* better support for different shapes (circle, box, rounded, polygon etc)
  in ASCII
* as_graphviz(): support "border-style: double" together with fill colors
  (Needs postscript code in the style argument, and I have not yet an
   idea how to write this)
* need better support for different edge styles in Graphviz
* as_ascii() and others: grow cells around point-shaped nodes to intrude:

	...........................
        :      :  |   :     :     :
	:      :  |   :     :     :
	:      :  v   :     :     :
	...........................
        :       :   :       :     :
	:-----> : * : <---- :     :
        :       :   :       :     :
	...........................

* 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:

* the longest-chain code (walk recursively children of startig node) needs
  some tuning, especially when it encounters loops in the graph.
  (rewrite it to always work from front-to-back and make it skipp self-loops,
   multi-edges and back-loops, then combine longest chain from subchains)
* 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
* allow user to specify on an edge:
    direction: (up|down|left|right|north|south|west|east|0|90|180|270|360);
    flow: (up|down|left|right|north|south|west|east|0|90|180|270|360);
  to force or suggest direction of edges leaving a node
* the A* algorithm needs fine-tuning to generate less bendy paths

Rendering/Layout:

* allow user to specifiy "align: left, top;" or "align: center, middle" to
  specify alignment of labels. (left|right|center|middle|top|bottom)
* add margin/padding attributes (especially usefull for HTML output)

Optimizer:

* write an optimizer for already laid out graphs to optimize layout
* 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
* when in a run-away situation, A* becomes the single largest CPU eater

Manual:

* finish the POD to HTML conversion (Graph::Easy::Pod2HTML)

