Introduction

This document describes a Support Library (SL) of TCL procedures which can be used to create a graphical interface (GUI) for a TCL application.

The procedure interface is based very strongly on the Xview interface (xv) originally created by David Brightly and used for the creation of the GUI used by Eurogam. This support library was initially created with the view to ease the transition of the Eurogam GUI from use of Xview (and thus dependence on Sun MicroSystems) to the use of the platform independent package TK which generates a Motif compliant look and feel while requiring only X11 support from the Unix system it is running in. The use of the Support Library however makes generation of a GUI using TK very much quicker and easier than direct use of the “raw” TK commands and thus its use has many advantages other than in its original role of conversion of existing Eurogam applications.

Throughout this document the word widget is used to mean a graphical construction created by one of the SL procedures. A widget consists of a TK frame window holding a number of TK windows. The fact that a widget is a composite of elemental TK windows is one of the reasons why using the SL procedures makes generation of GUIs quicker and easier. In all cases several TK commands are required to implement the creation of a widget. By convention widget names are in upper case. While use of this convention is not essential when using most of the SL procedures it is assumed by the call- back mechanism and the click procedure.

The SL procedures require that a procedure named click is supplied to handled all call backs from the widgets created for which a TCL procedure to be invoked is not supplied when the widget is created. The click procedure has a single argument which is a TCL list. The list elements are

                index 0         frame name containing the widget
                index 1         command
                index 2         the widget name
                index 3         value
                index 4         index
The contents of command and value are dependent on the widget type. command is used mostly for special purposes - for example if a window is QUIT via the window manager then the application is informed by invoking the click procedure with command having the value :quit. The value and index elements are not present for all widget types. Where a TCL procedure to be invoked when an event occurs is supplied to the widget creation procedure then the procedure is invoked during the call back with a single list argument as above but omitting the first 3 items. This may mean (for example the button widget) that there is no argument .

The library contains a default version of the click procedure which is described later in this document.

widget creation procedures

All widget creation procedures have the same format:

procedure-name widget-name [argument keyword value]
There may be a variable number of keyword/value pairs (including none). For further details of argument values the man pages for TK should be consulted.