HyperTIES is written in a combination of C, Forth, NeWS PostScript, Emacs Mocklisp, and HyperTIES Markup Language.
The storyboard interpreter reads in and parses the fields in a storyboard file, and drives the HyperText machinery based on the commands and text therein.
Fields of a Storyboard:
The storyboard interpreter drives a page formatter, whose job it is to decide where things go on the page, and to describe the pages by calling remote PostScript procedures in the NeWS server.
These PostScript procedures describe and manipulate windows and pages.
A HyperTIES window is comprised of a page for the control panel, a page for the definition window, and zero or more pages for the storyboard contents.
The formatter describes a page by building a display list of PostScript code associated with the page in the NeWS server. NeWS executes the display list to draw the page's image.
It puts code to change fonts and show lines of text into the display list. It also creates stamp-pad objects, used to put picture drawing code into the display list, and to render buttons and targets onto the page.
Arguments passed to important functions:
Instantiation (create a stamp-pad):
Instantiate Stamp: object body, class, name, instance ID, filepos
Instantiate Target: object body (args, init), class, name, instance ID, filepos
Display (put down a stamp):
Displlay Stamp: instance ID, position
Display Target: instance ID, position, size
Display String: string, position
The storyboard interpreter is capable of compiling storyboards into Forth programs that call low level formatting commands to describe pages to the NeWS server.
The interpreter compiles storyboards by formatting them, and printing Forth words to a text output file, capturing the execution of the low level formatting commands in forth function definitions.
HyperTIES can subsequently read in the resulting Forth functions, and compile them into memory. Then they can be efficiently executed, to produce identical pages as the storyboards interpreted from disk, without the overhead of the formatter reading the storyboards and laying out the page.
The memory image of the HyperTIES Forth system, loaded with all the compiled storyboards of a database, can be saved out to disk, so that later sessions can restore the environment. This signifigantly improves the response time for displaying definitions and contents, without noticably increasing the startup time.
In addition to the storyboard files (with .st0 suffixes), there exist picture files (with .pn0 suffixes) and targets files (with .pn0 suffixes), describing the objects refered to by the author in the storyboard files.
You can think of the objects described in the .pn0 and .tn0 files as stamp pads. When an object is refered to in a storyboard, it is used to stamp a picture or a target down at some location on the page.
The .pn0 and .tn0 files contain an object's class, name, and body.
For all the currently implemented classes, the object's body contains PostScript code to be interpreted by the NeWS server. The server executes the body, which pushes onto the stack the parameters for the /new message, sent to the class implemented in the NeWS server, to instantiate the stamp-pad object the first time it is referenced.