GPS Manager User Manual -- The graphical interface for plug-in definitions

|  |  | The graphical interface for plug-in definitions

## The graphical interface for plug-in definitions

Plug-in definitions can be inspected or created from the `Definitions` menu-button. Each plug-in has:

- a name that must be unique
- a remark, for documentation purposes
- a Tcl expression that evaluates to non-zero if the plug-in cannot be used, for instance when a needed library or external program is missing;the evaluation is done at top level so that global variables can be used
- a sequence with alternating parameter names and Tcl expressions, used for setting up initial values needed by the plug-in code; parameter names must be valid Tcl variable names starting with "_" (underscore)
- the Tcl code to be evaluated in order to execute the plug-in; as the text box has only basic editing features it may be wise to edit the code in a separate editor and paste it in the box when finished
- a Tcl list with information on widgets to be created for launching the plug-in; each element is a list with
  - a Tcl glob pattern for paths of GPSMan toplevel windows; only some toplevel windows have support for plug-ins (cf. the array `PLGSWelcomed` in the GPSMan source file `plugins.tcl`)
  - a widget type: either `button` or `menu`
  - a widget path from the matching window path.

Care must be taken when defining a new plug-in as it is difficult or even impossible to automatically check the correctness of the given information. The best way to start writing plug-ins is to change an existing definition.

Information on user-defined plug-ins is kept on a file in the GPSMan user directory. Advanced users may wish to edit this file instead of using the graphical interface.

|  |  | The graphical interface for plug-in definitions