Copyright (c) 2000-2003, JYL Software Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE, EVEN IF
JYL SOFTWARE INC. IS MADE AWARE OF THE POSSIBILITY OF SUCH DAMAGE.

TGED - TGraph EDitor
====================

The tged package is an experimental e4Graph editor written in pure
Tcl/Tk. It uses BWidgets to manage the display and tgraph as the Tcl
binding for e4Graph, to access the contents of storages.

TGED is said out loud "too good" :) I hope it's going to be true,
eventually. Right now, it's pretty lame. But I'm working on it.

Visually, the tged package provides a display of a storage's contents
in a two paned window. The left pane contains a tree displaying the
node structure of the underlying storage, and the right pane shows the
contents of the currently selected node.

The tged display is editable if desired, so that visual modifications
through the GUI result in changes in the storage's structure. Also,
the display reacts in real time to changes in the storage's structure
made by a running program.

Requirements
============

The tged package requires:

* A Tk version with the "font" command. Probably 8.3 or later.
* BWidgets 1.3 or later.
* e4Graph 1.0a8 or later, with the Tcl binding installed (package tgraph).

The package should run fine wherever e4Graph works. The package will not
load if Tk is absent.

Installation
============

To install the tged package, simply make a subdirectory named
"tged1.0" inside one of the directories mentioned in the value of
::auto_path, and move all the files there. This will enable programs
that want to use the tged package to issue a "package require tged".

Usage
=====

To load the "tged" package (and if required, the "tgraph" package), invoke:

% package require tged
1.0.0

The package provides the following commands:

tged::tged ?win? ?storage? ?args...?

	Creates a tged display inside the given window, or creates a
	new toplevel window if win == "". If storage is present it
	is assumed to be a storage and its contents are displayed. The
	arguments are used to configure the widget, so they should be
	alternating option name and option value pairs.

	The name of the window is returned.

tged::editor ?win? ?storage? ?args...?			NOT YET IMPLEMENTED

	Creates a full-blown editor with a menu bar, status bar etc.,
	with a tged display, inside the given window. The other
	arguments are the same as for tged::tged.

	The name of the window is returned.

tged::view ?win? ?storage? ?args...?

	Creates a read-only but reactive tged display of the given
	storage within the named window. Other arguments are as for
	tged::tged. The display can not be edited but is reactive to
	changes in the underlying storage made by a running program.

	The name of the window is returned.

Bindings
========

The usual tree bindings apply in all configuration.

The following bindings are in effect for the tged::tged and tged::editor
commands:

Widget	Key		Meaning
------	---		-------

tree	c			Commit the displayed storage.
tree	d			Delete the selected node.
tree	n			Insert a new node in the selected node.
tree	a			Insert a new attribute in the selected node.
tree	<Mouse-1>		Select a node.
tree	Left-arrow		Collapse selected node.
tree	Rigth-arrow		Expand selected node.
tree	Up-arrow		Select previous node.
tree	Down-arrow		Select next node.

text	c			Commit the displayed storage.
text	d			Delete the selected attribute.
text	n			Insert a new attribute in the displayed node.
text	e			Edit the selected attribute.
text	<Double-Mouse-1>	Edit the selected attribute.
text	<Return>		Edit the selected attribute.
text	<Mouse-1>		Select an attribute.
text	Up-arrow		Select the previous attribute.
text	Down-arrow		Select next attribute.

Bugs
====

Sure! There probably are many.. If you find one let me know by email,
mailto:jyl@mod3.net

