A number of Tk procedures can be found in /star/lib/startcl that may be useful when using gwm widgets either directly or as examples that can be modified to suit particular purposes. To use them directly, append /star/lib/startcl to the global variable auto_path, e.g.:
lappend auto_path /star/lib/startcl
These procedures make use of a global array called gwm_priv.
gwm_colourDialog w gwm exit
Creates a modeless dialog box with controls for modifying the colours of a gwm widget.
- w
- A name to be used for the top level widget of the dialog box.
- gwm
- The name of the gwm widget to be manipulated.
- c
- The control used to pop up the dialog box. This control will be disabled when the dialog box is popped up and re-enabled when it is dismissed.
gwm_gwmWithScroll w args
Returns a gwm widget with scroll bars for scrolling the window (and overlay plane if there is one).
- w
- A name to be used for the frame widget that contains the gwm widget and the scroll bars.
- args
- Additional arguments to the gwm widget creation command.
gwm_printDialog w gwm
Creates a modal dialog box containing controls for printing a gwm widget.
- w
- A name to be used for the top level widget of the dialog box.
- gwm
- The name of the gwm widget to be printed.
- c
- The control used to pop up the dialog box. This control will be disabled when the print starts and re-enabled when it completes.
An gwm server that uses these procedures can be found in
/star/bin/startcl/gwm. This is the default server for Starlink
systems. It creates a server with buttons for changing the colours,
printing the gwm window and clearing the picture and overlay planes.
The coordinates of the mouse pointer are also displayed whenever it is
over the gwm window. A listing of this script can be found in
appendix
.
Arguments for the gwm widget creation command can be supplied on the command line (except -name which is interpreted as an awish option; use -gwmname instead).
To use your own gwm server by default whenever a gwm server
is created (either with the xmake command or automatically by a
graphics program), copy /star/bin/startcl/gwmXrefresh to a
directory in your PATH that is positioned before
/star/bin/startcl and edit line 13 so that the variable gwmscript is set to the location of suitable script that creates a gwm
widget.
STARTCL --- Starlink Extensions to Tcl & Tk