hierarch_tcl
============

Tcl/Tk commands to build graphical display of hierarchical data.

src/hierach_utils.tcl	: core viewer code
icons/*.xbm		: associated icons used in the display

Execute the "install.sh" script to copy the files to the current
$CCP4/ccp4i/ subdirectories.
NB this will overwrite any existing versions of the same files!

There are also two applications of the hierarchical viewer code,
both operating on MTZ data:

1. MTZ Viewer

This is a development MTZ viewer and editing tool:

mtzviewer/mtzviewer
mtzviewer/mtzviewer.tcl

It is also installed into the CCP4i area when install.sh is run.
The viewer can then be run using the command:

> mtzviewer [file.mtz]

This is under development and doesn't implement any useful
functionality at present.

2. Demo Task

There is also a demo CCP4i task "phaker", which illustrated some
applications of the code:

phaker/phaker.tcl
phaker/phaker.def

These should be manually copied to the $CCP4/ccp4i/task/
subdirectory and then started using "ccp4i -t phaker".

--

Known problems with hierarch_tcl:

 * Deleting nodes leaves dangling connecting lines and uncollapsed
   spaces in the display

--

Known problems with MTZViewer:

 * Can't handle batch MTZ files
 * Can't handle MTZ files where all columns are assigned to HKL_base

--

Significant changes for version 1.4:

 * Added a new hidden widget for nodes, to store arbitraty data items as
   key-value pairs. Use the -data argument of hierarch_add_node to
   associate data when creating a node; use the new functions
   hierarch_get_node_data, hierarch_get_node_data_item,
   hierarch_append_node_data and hierarch_set_node_data_item to manipulate
   and retrieve data items.
 * Implemented new options -mouse_enter and -mouse_leave to
   hierarch_add_node for additional bindings.
 * Extended MTZViewer by adding a message bar that displays information
   about the crystal and dataset when the cursor moves over them.
 * Implemented functionality to allow user editing of the node name
   (i.e. label): this is hidden widget *.editname plus new functions
   hierarch_edit_node_name, hierarch_edit_node_finish,
   hierarch_hide_editname and hierarch_set_node_name.
 * Added crystal-name-editing functionality in MTZViewer.
 * Added initial dataset manipulation functionality in MTZViewer.

Significant changes for version 1.3:

 * Implemented functionality for "hierarch_delete_node", and added new
   function "hierarch_delete_all_nodes". Fix to "hierarch_get_children",
   which now only returns widgets belonging to nodes.
 * Added initial attempt at HTML documentation, which includes graphical
   view of widget construction for nodes.
 * Added code for MTZViewer.
 * New functions "hierarch_find_node" (returns widget name(s) corresponding
   to a specified name) and "hierarch_node_level" (returns the "depth" of
   a given node relative to the root node).
 * Added "-callback" option to "hierarch_add_node", which allows the
   calling application to specify a callback to be invoked on right mouse
   click.

Significant changes at version 1.2:

 * Reimplemented "return_selection" command in hierarch_utils.tcl - this
   now returns a list of names of the selected nodes
 * Updated phaker.tcl to use the GetMtzXtals etc commands that are in CCP4
   v5.0 (rather than build the hierarchy explicitly).
   New procedure "phaker_process_select" gives an example of processing
   the output from "return_selection".
