Search                        Top                                  Index
HELP SEETREE                                         R.Evans, March 1984

    lib seetree;
    seetree(tree);

LIB SEETREE provides an interface to showtree (see *SHOWTREE) which
    a) protects you from corrupting the tree
    b) makes it easy to explore the tree
    c) doesn't require knowledge of VED

To display a tree just do

            seetree(tree);

The tree will be displayed, as in showtree, but then the keyboard will
be redefined. Most of the keys produce a BEEP (meaning 'this key doesn't
do anything'), but some of them provide functions for exploring the
tree:

        cursor up             UP to parent node
        cursor down left      DOWN to leftmost daughter
        cursor down           DOWN to middle daughter
        cursor down right     DOWN to rightmost daughter
        cursor left           LEFT to sister
        cursor right          RIGHT to sister
        end-of-file           EXIT from seetree
        refresh-window        REFRESH WINDOW

After the EXIT command has been given, the call of seetree exits and
control returns to wherever it was called from as usual.

-- Defining new keys ---------------------------------------------------

The keyboard is redefined in such a way that adding new key functions is
particularly easy. VED's normal keyboard decoder is used to read the
keyboard and produce a procedure that would normally be run (by VED).
This procedure is given to the property SEETREE_COMMAND for translation
to the actual procedure to run - the default is VEDSCREENBELL. The
system sets up the keys given above, but these may be overridden/added
to by modifying the property SEETREE_COMMAND (which is given a procedure
(normally) and MUST return a procedure).

For example, to define the <ENTER> key to produce the message 'DONT
TOUCH THAT!' on the status line, we can proceed as follows:

    vedputmessage(%'DONT TOUCH THAT!'%) -> seetree_command(vedenter);

(vedenter is the procedure VED calls when the <ENTER> key is hit - to
find this out we could have used <ENTER> HK).


--- C.all/help/seetree
--- Copyright University of Sussex 1992. All rights reserved. ----------