* Storyboard Interpreter ** Fields of a Storyboard *** .title *** .synonyms *** .definition *** .contents ** Formatted text ** .commands * Page Formatter Files: fmt.c fmt.cps fmt.ps 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: *** Instantiation (create a stamp-pad) object body, class, name, instance ID *** Display (stamp a stamp-pad) instance ID or string, position, target size * Compiling Storyboards into Forth 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. * Objects 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. *** class An object's class defines its behavior. Currently, the class is the name of a PostScript class defined in the NeWS server. In the future, some classes may be totally or partially implemented in the HyperTIES client, in C or C++. *** name In the storyboard files, an author can refer to an object by its name. The master index maps from the object's name to its location in a .pn0 or .tn0 file. *** body The interpretation of an object's body, determining its characteristics, is up to its class. 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. * Data structures ** index 3 namespaces of index entries storyboard names (.st0) image names (.in0) target names (.tn0) ** entry name file, offset, length instance header instance ID class width, height NeWS ImageDict entry instance ID object ** window WinDict ** Page CanvasDict Canvas EventMgr DL Targets ** Target TargetDict TID Object Ref * Classes ** Image ** Touchable * Comments This documentation was written in the nude. (Nude text of course.)