Introduction

		The OO-Browser Graphical Interface

	This program demonstrates a dynamic tree-drawing 
	algorithm developed by Sven Moen.  The algorithm is 
	published in "IEEE Software", July 1990, pp. 21-28.
	If you desire more information than the description
	given below, see the above-referenced article. 

	A number of the features mentioned herein are not
	included in this version of the program.

Algorithm

	Unlike other algorithms, Moen's algorithm uses an 
	explicit representation of node and subtree contours
	and it stores each contour as a polygon. 

	Trees with nodes of any polygonal shape can be drawn
	compactly, and the data structure supports insert and
	delete operations on subtrees.  The results are tidy
	trees and efficient relayouts when the tree changes.

	In the Layout step, the tree is traversed in depth-first
	fashion until the leaf nodes are reached.  The contour
	of each leaf node is formed by creating a linked list of
	lines that wrap around the node's shape.  This is the 
	LayoutLeaf step.  As the return trip is made back to the
	root, the contour of each interior node is formed by
	joining the individual contours of each child. This Join
	step involves a Merge step where the offset between
	two neighboring contours is computed to avoid overlap. 
	Since the width of each subtree contour is known at
	each step, each interior node is centered over its
	children, and the subtree contour is extended to include
	the interior node.  This is the AttachParent step.

	In a dynamic update operation (insert or delete), the
	algorithm reuses the contours not influenced by the
	change and updates them efficiently. When a given 
	node changes, subtree contours at higher levels must
	be disassembled before the change. This is called
	the Unzip step, which call RuboutLeaf, Split, and
	DetachParent, all inverses of LayoutLeaf, Join, and
	AttachParent, respectively.  After the change is made,
	the Zip step reassembles the contours by again calling
	Layout, Join, and AttachParent.

User Interface
	
	This program offers an interactive environment for 
	creating and updating trees of arbitrary size. Trees
	can be loaded from a file or created on-the-fly.  You
	can also save trees, and specify various layout and
	animation options.  Each feature is associated with 
	a menu item which is explained in the next section.

	When invoking the program, you may specify a single
	argument indicating the name of a tree file. This file
	will be loaded upon startup. If you start the program
	without arguments, the canvas will be blank.

Tree Menu

	New Tree...	Create a new tree. You specify 
			a new root, and the existing tree, 
			if any, is deleted.

	Load Tree...	Load a tree specification file.
			(see the File Format section)

	Save Tree...	Save a tree specification file.
			(see the File Format section)

	Quit		Exits the program.

Layout Menu

	Layout Spacing...
			Displays a dialog that allows you
			to change the spacing between nodes
			on the same level and the spacing
			between levels. 

	Align Nodes on Level
			Adds a constraint to the layout
			algorithm that forces all nodes
			on the same level to have the same
			x-position. This leads to truncation
			of nodes if necessary. The maximum
			node width is controlled by the
			Level Spacing. By default, this is
			disabled.

Node Menu

	This popup menu is invoked by pressing and holding
	the left mouse button on a node. This menu offers
	several actions that can be performed on nodes.

	Add Child	Add a child to the node. The new child
			is added after the bottommost child.

	Add Sibling Before
			Add a sibling before this node.

	Add Sibling After
			Add a sibling after this node.

	Collapse Node	Collapses or expands the subtree
	Expand Node	beginning at the specified node.
			This operation is similar to a
			Delete operation, except that the
			subtree is preserved so that you
			can display it again. Collapsed
			nodes are marked with a gray box.

	Delete Node	Delete the subtree beginning at the
			specified node.

Tree File Format

	If you wish to load a file, you can load a file created
	by the OO-Browser with the {C-c d}, (br-xbr) command.

	Node labels are sequences of characters delimited by
	newlines or end-of-file. 

	Files must begin with an OO-Browser Environment path
	name.  The next line must be a label, which indicates the
	root node.  Optionally, lists containing labels may
	follow. Each child label is indented two spaces more 
	its parent. Lists of labels are nested to produce trees. 

	For example, a three-level binary tree is as follows:

		^^c++-^^~/OOBR
		root node level1
		  level2-1
		    level3-1
		    level3-2
		  level2-2
		    level3-3
		    level3-4

Help

	If you are reading this, chances are that you found the
	Help button on the menubar. 

Author
	
	This program was written by Mark L. Stern during
	the summer of 1990.  It was redone by Bob Weiner for
	use with the OO-Browser.

	Stephan Zachwieja contributed the double-buffering
	code used for smooth animations in this program.

	The other authors have permitted Bob Weiner to distribute
	the code freely as part of the OO-Browser.