Tools are designed for major extensions in DrScheme's functionality. To extend DrScheme to extend the appearance or the functionality the DrScheme window (say, to annotate programs in certain ways, or to add buttons on the frame) use a tool. The Static Debugger and the Syntax Checker are implemented as tools.
Libraries are for extensions of DrScheme that only want to add new functions and other values bound in the users namespace. See the DrScheme manual for more information on constructing libraries.
Tools rely heavily on MzScheme's units. See units for information on how to construct units. They also require understanding of libraries and collections
When DrScheme starts up, it looks in the tools subdirectory of the
drscheme collection directory to determine which tools are installed.
For each subdirectory of the tools directory, it looks for two files:
unit.ss and sig.ss. If sig.ss exists it is loaded when all of the
signatures of DrScheme are loaded. The file unit.ss is required to exist.
It must evaluate to a unit that imports 6 units matching the signatures:
mred^ (all of the names in the mred manual)
mzlib:core^ and mzlib:print-convert^ (defined in the
MzLib), drscheme:export^ (defined below),
and zodiac:system^. The
zodiac:system^ signature contains all of the names in
section
.
The drscheme:export^ signature contains the parameters defined in the parameters section, and the other classes described in the next subsections.
For example,
(unit/sig ()
(import mred^
mzlib:core^
framework^
[print-convert : mzlib:print-convert^]
[drscheme : drscheme:export^]
[zodiac : zodiac:system^])
(message-box "tool example" "tool loaded"))
is a simple tool that opens a dialog as drscheme is started up.