
Tree-4.1 - A Tree Widget for Tk4.1 based on C++ (and [incr Tk-2.1])
-----------------------------------------------------------------


Introduction
------------

This Directory contains the sources for a Tk-4.1 based widget for
displaying dynamic trees.

I've also added an [incr Tk] "Tree" class, based on the C++ "tree"
widget.  It makes working with trees a little easier by adding an
extra layer over the basic tree widget. See the man page Tree(n)
for a description of the [incr Tk] "Tree" widget.


Features of the Tree Widget
---------------------------

With the tree widget, you can display a tree in a Tk canvas. The nodes
can be made up of any number of canvas items or even other Tk widgets.
You create the objects that make up a node and the line that connects
it to its parent and pass them to the tree widget. After this the tree
widget manages the positions of the nodes and end points of the tree
lines.  Operations are available for inserting, moving and removing
nodes and subtrees and for querrying the position of a node in the
tree. The tree can be displayed horizontally or vertically.


Documentation
-------------

There is a postscript tutorial in ./doc directory which basically
takes you step by step through the dirtree demo.

There are also man pages in the ./man directory describing the tree
widget and an [incr Tk] wrapper for it.


Requirements
------------

The following software is required to compile this release:

    tk4.1       
    tcl7.5  

or:
    
    itcl-2.1    (optional, includes tk4.1 and tcl7.5)

Note: The basic C++ tree widget only requires Tcl and Tk. 
The "dirtree" demos use only plain Tcl/Tk plus the tree widget.
Some of the demos require itcl-2.1.

Compiling ---------

1. run ./configure from the top level directory.

   Note: To include itcl support: use "configure --with-itcl --with-itk".
   Also: To include BLT, add: "--with-blt", for tclX add: "--with-tclx".

2. Type: make

This creates a library "libTkTree.a" and a binary "tree_wish" for
running the demos.

3. Type: make install

This installs the library, binary and the tcl files.


Demos
------

There are some simple demos in the ./demos directory. To try them out,
cd to that directory and run one of these scripts:

dirtree -         directory browser demo.
                  This is a demo that doesn't use the [incr Tcl] 
                  interface. Clicking with mouse B2 on a directory opens up 
                  a file list in the tree. Double-Click with B1 shows or
                  hides the subdirectories.

dirtree[1..n] -   simple demos described in the tutorial in ./doc/tree.html
                  (builds up the dirtree demo step by step).


simple -          just demonstrates the tree widget by creating a static 
                  tree using the [incr Tk] interface.

Copyright:
----------

This is free software. See the Copyright file with this distribution
for details.
Please send bug fixes, comments etc. to:

=======================================================================
Allan Brighton (abrighto@eso.org)
=======================================================================
