Introduction

No one likes to read manuals to find out how to use a system. This is especially true of programming interactive applications which are both exciting and complex. Certainly good examples are helpful and here we try to collect some simple but illustrative examples of Trestle. Trestle is a library written in the Modula-3 programming language that provides access to the routines of the X window system.

Applications with graphical user interfaces get input events and display output by communicating with an underlying window system which manages the appearance of the display device. Window systems built for particular platforms are necessarily limited to those applications that are build especially for them. Several vendors joined together in 1987 to standardize the interface to the window system so that software could be developed independent from specific input and output devises. The standard that emerged from the consortium is known as the X Window System. Many vendors support the standard on various platforms by implementing the low-level C function calls that comprise the standard for the particular hardware.

Trestle is a Modula-3 library for access to the X Window System. Trestle is a collection of interfaces structured around a central abstract type: a virtual bitmap terminal VBT, which represents a share of the workstation's screen, keyboard, and mouse. This abstraction makes Trestle unique and removes it from the low-level abstraction of the X Window System. The programmer can learn the Trestle abstracts and ignore the underlying reliance on X windows. Indeed, it does not matter if the X Window System is running underneath or not.

Modula-3 is a strongly-typed systems language distributed by the Digital Equipment Corporation (DEC). The language designers were Luca Cardelli, Jim Donahue, Mick Jordan, Bill Kalsow, and Greg Nelson. It is described in a 50-page reference manual published in:

Greg Nelson, editor. Systems Programming with Modula-3. Prentice Hall, Englewood Cliffs, New Jersey, 1991.
Modula-3 has well-defined notion of an object based on the record data-type. Objects are used extensively in implementing the Trestle library. In fact, this sort of application, large libraries of user customizable building blocks, seems ideally suited for this kind of object-oriented programming.

The reference manual for Trestle is a DEC technical report:

Mark Manasse and Greg Nelson. Trestle Reference Manual. SRC Report 68, DEC Systems Research Center, Palo Alto, California, December 1991.
Another technical report documents VBTKit. VBTKit is another set of modules and a library that extends Trestle.
Mark Brown and James Meehan. VBTKit Reference Manual: A toolkit for Trestle. DEC Systems Research Center, Palo Alto, California, March 1993.