# Introduction

FormsVBT is a system for building graphical user interfaces (GUIs). It consists of a language for describing an application's user interface, a stand-alone application for constructing the user interface, and a runtime library for communicating between an application's code and its user interface.

A user interface in FormsVBT is a hierarchical arrangement of components. Components include passive visual elements, basic interactors, modifiers that add interactive behavior to other components, and layout operators that take groups of low-level components and organize them geometrically. In the FormsVBT language, the arrangement is written as a symbolic expression (S-expression). The outermost expression is the form or top-level component, and subexpressions are either properties that modify a component or other, subordinate components.

The FormsVBT interface builder, `formsedit`, in action. The Text View is on the right and the Result View is on the left.

The FormsVBT interface builder, formsedit, provides a text editor and a result view of the user interface, as shown in Fig. [fig:formsedit] . The text editor displays the S-expression underlying the user interface, while the result view shows the user interface as it will look at runtime, with proper reaction to mouse and keyboard activity, as well as proper sizing and stretching. Of course, the result view cannot reveal exactly how an application's user interface will look and behave, since there is no application code running, but it's usually pretty close. The result view is updated as the user edits in the text view. Interacting in the result view does not update the text view or change the underlying S-expression.

The runtime library provides the communication between an application and its user interface. There are procedures to convert an S-expression into a window object, procedures to register event-handlers that will be invoked in response to user actions, procedures to retrieve and modify the values of the components, procedures to change the appearance (and even the hierarchy) of the components, and so on.

Each component in FormsVBT is implemented by a window class (i.e., a VBT) provided by VBTkit or Trestle. Most of the things that you'd want to do with a component can be done via FormsVBT. However, there may be occasions when you would like direct access to the underlying VBT. FormsVBT provides such access. (You'll probably find it helpful to have a copy of the reference manuals for VBTkit [VBTkitRefman] and Trestle [TrestleRefman] , as well as the Trestle Tutorial [TrestleTutorial] .)

The FormsVBT system is implemented in Modula-3 [M3] [SPwM3] . It is based on an earlier system implemented in Modula-2+ [formsvbt:siggraph] . That version was unique among user interface development environments for its multi-view editor, and noteworthy for its extensibility and simplicity. In this implementation, the editor is not multi-view; there is no graphical, direct-manipulation editor integrated with the text view. Also, this implementation is not extensible by clients.

Indeed, one of the primary themes shaping the development of the system has been to deliver a ``95% solution.'' By that, we mean that 95% of what clients do should be trivial to do; of the remaining 5%, 95% of that should be pretty easy to do; and the remaining things should be possible and no harder to do than without FormsVBT.