(FILECREATED "14-Jan-85 12:47:24" {PHYLUM}<TRILLIUM>BIRTHDAY84>INTERFACES>PUBLIC-ITEMTYPES.;3 122892 

      changes to:  (ITEMTYPES CASCADE HORIZONTAL.BUTTONS)
		   (VARS PUBLIC-ITEMTYPESCOMS)

      previous date: "11-Jan-85 19:22:39" {PHYLUM}<TRILLIUM>BIRTHDAY84>INTERFACES>PUBLIC-ITEMTYPES.;1
)


(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT PUBLIC-ITEMTYPESCOMS)

(RPAQQ PUBLIC-ITEMTYPESCOMS ((ITEMTYPES ARROW BACKLIT.BUTTON BITMAP BLOCK.OF.TEXT BORDER CAPTION 
					CASCADE CASCADE.BUTTON CASCADE.INDICATOR CHANGE.FRAME.BUTTON 
					CIRCLE COLOR COMPUTER ELLIPSE EXTERNAL.BUTTON 
					FLASHING.SENSITIVE.REGION GENERAL.BUTTON GROUP 
					HORIZONTAL.BUTTONS IMPLICATION INDICATOR INHIBITOR INIT.CELL 
					INITIALIZATION INVERTING.CASCADE INVERTING.CASCADE.LIGHT 
					INVERTING.SENSITIVE.REGION LIGHT LIGHT.BAR LINE.OF.TEXT 
					NUMBER.BUTTON NUMBER.BUTTON.NEXT.DIGIT NUMBER.PAD 
					NUMERIC.CHECKER PICTURE PRINT.REGION REGULAR.POLYGON 
					SEGMENT.LINE SENSITIVE.REGION SET.OF.LABELLED.BACKLIT.BUTTONS 
					SET.OF.NUMBER.BUTTONS SIMPLE.PROPOGATOR STRAIGHT.LINE 
					TEXT.BULLETS TIMEOUT UP.DOWN.BUTTONS VALUE.BAR 
					VERTICAL.BUTTONS)))
(READ.ITEMTYPE ARROW 5)
(\TYPE ITEM.TYPE NAME ARROW COMMENT  "An arrow between two locations" KIND ARTWORK PARAMETERS  ((\TYPE
 PARAMETER NAME TAIL TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  "The tail of the arrow")  (\TYPE 
PARAMETER NAME HEAD TYPE  (POSITION) DEFAULT  (200 . 200) COMMENT  "The head of the arrow")  (\TYPE 
PARAMETER NAME HEAD.ANGLE TYPE  (INTEGER) DEFAULT 20 COMMENT  "Angle between safter and edges of head"
)  (\TYPE PARAMETER NAME HEAD.LENGTH TYPE  (INTEGER) DEFAULT 20 COMMENT  
"Length of the edge of the head")  (\TYPE PARAMETER NAME WIDTH TYPE  (INTEGER) DEFAULT 2 COMMENT  
"Widths of the lines")) OTHER  (FNS  ((ANALYZE ANALYZE.ARROW)  (BOUNDING.BOX BOUNDING.BOX.ARROW)  (
SHOW SHOW.ARROW)  (RESET RESET.ARROW)  (NIL ARROW.HEAD.POSITIONS))) CLASSES  (ARTWORK))
(DEFINEQ

(ANALYZE.ARROW
  [LAMBDA (ITEM)                                             (* HaKo "17-Aug-84 13:18")
                                                             (* DAHJr "16-MAR-83 13:24")
    (PROG ((TAIL (GET.PARAMQ ITEM TAIL ARROW))
	   (HEAD (GET.PARAMQ ITEM HEAD ARROW))
	   (HEAD.ANGLE (GET.PARAMQ ITEM HEAD.ANGLE ARROW))
	   (HEAD.LENGTH (GET.PARAMQ ITEM HEAD.LENGTH ARROW)))
          (SET.FIELDQ ITEM HEADS (ARROW.HEAD.POSITIONS TAIL HEAD HEAD.ANGLE HEAD.LENGTH])

(BOUNDING.BOX.ARROW
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:16")
                                                             (* DAHJr "10-NOV-83 20:44")
    (PROG ((TAIL (GET.PARAMQ ITEM TAIL ARROW))
	   (HEAD (GET.PARAMQ ITEM HEAD))
	   (HEADS (GET.FIELDQ ITEM HEADS))
	   LEFT BOTTOM RIGHT TOP)
          [SETQ LEFT (MIN (fetch (POSITION XCOORD) of TAIL)
			  (fetch (POSITION XCOORD) of HEAD)
			  (fetch (POSITION XCOORD) of (CAR HEADS))
			  (fetch (POSITION XCOORD) of (CDR HEADS]
          [SETQ BOTTOM (MIN (fetch (POSITION YCOORD) of TAIL)
			    (fetch (POSITION YCOORD) of HEAD)
			    (fetch (POSITION YCOORD) of (CAR HEADS))
			    (fetch (POSITION YCOORD) of (CDR HEADS]
          [SETQ RIGHT (MAX (fetch (POSITION XCOORD) of TAIL)
			   (fetch (POSITION XCOORD) of HEAD)
			   (fetch (POSITION XCOORD) of (CAR HEADS))
			   (fetch (POSITION XCOORD) of (CDR HEADS]
          [SETQ TOP (MAX (fetch (POSITION YCOORD) of TAIL)
			 (fetch (POSITION YCOORD) of HEAD)
			 (fetch (POSITION YCOORD) of (CAR HEADS))
			 (fetch (POSITION YCOORD) of (CDR HEADS]
          (RETURN (create REGION
			  LEFT ← LEFT
			  BOTTOM ← BOTTOM
			  WIDTH ←(MAX (IDIFFERENCE RIGHT LEFT)
				      4)
			  HEIGHT ←(MAX (IDIFFERENCE TOP BOTTOM)
				       4])

(SHOW.ARROW
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:18")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((TAIL (GET.PARAMQ ITEM TAIL ARROW))
	   (HEAD (GET.PARAMQ ITEM HEAD ARROW))
	   (HEAD.ANGLE (GET.PARAMQ ITEM HEAD.ANGLE ARROW))
	   (HEAD.LENGTH (GET.PARAMQ ITEM HEAD.LENGTH ARROW))
	   (WIDTH (GET.PARAMQ ITEM WIDTH ARROW))
	   (HEADS (GET.FIELDQ ITEM HEADS)))
          (MOVETO (fetch (POSITION XCOORD) of TAIL)
		  (fetch (POSITION YCOORD) of TAIL)
		  CURRENT.DSP)
          (DRAWTO (fetch (POSITION XCOORD) of HEAD)
		  (fetch (POSITION YCOORD) of HEAD)
		  WIDTH NIL CURRENT.DSP)
          (DRAWTO (fetch (POSITION XCOORD) of (CAR HEADS))
		  (fetch (POSITION YCOORD) of (CAR HEADS))
		  WIDTH NIL CURRENT.DSP)
          (DRAWTO (fetch (POSITION XCOORD) of (CDR HEADS))
		  (fetch (POSITION YCOORD) of (CDR HEADS))
		  WIDTH NIL CURRENT.DSP)
          (DRAWTO (fetch (POSITION XCOORD) of HEAD)
		  (fetch (POSITION YCOORD) of HEAD)
		  WIDTH NIL CURRENT.DSP])

(RESET.ARROW
  [LAMBDA (ITEM)                                             (* DAHJr "16-MAR-83 13:24")
    (SET.FIELDQ ITEM HEADS NIL])

(ARROW.HEAD.POSITIONS
  [LAMBDA (TAIL.POSITION HEAD.POSITION HEAD.ANGLE HEAD.LENGTH)
                                                             (* edited: "16-MAR-83 11:56")
    (PROG (X0 Y0 X1 Y1 DX DY COS.THETA LL SIN.THETA COS.RHO SIN.RHO XP1 YP1 XP2 YP2)
          (SETQ X0 (fetch (POSITION XCOORD) of TAIL.POSITION))
          (SETQ Y0 (fetch (POSITION YCOORD) of TAIL.POSITION))
          (SETQ X1 (fetch (POSITION XCOORD) of HEAD.POSITION))
          (SETQ Y1 (fetch (POSITION YCOORD) of HEAD.POSITION))
          (SETQ DX (IDIFFERENCE X1 X0))
          (SETQ DY (IDIFFERENCE Y1 Y0))
          [SETQ LL (SQRT (PLUS (TIMES DX DX)
			       (TIMES DY DY]
          (SETQ COS.RHO (QUOTIENT DX LL))
          (SETQ SIN.RHO (QUOTIENT DY LL))
          (SETQ COS.THETA (COS HEAD.ANGLE))
          (SETQ SIN.THETA (SIN HEAD.ANGLE))
          [SETQ XP1 (TIMES HEAD.LENGTH (DIFFERENCE (TIMES COS.RHO COS.THETA)
						   (TIMES SIN.RHO SIN.THETA]
          [SETQ YP1 (TIMES HEAD.LENGTH (PLUS (TIMES SIN.RHO COS.THETA)
					     (TIMES SIN.THETA COS.RHO]
          [SETQ XP2 (TIMES HEAD.LENGTH (PLUS (TIMES COS.RHO COS.THETA)
					     (TIMES SIN.RHO SIN.THETA]
          [SETQ YP2 (TIMES HEAD.LENGTH (DIFFERENCE (TIMES SIN.RHO COS.THETA)
						   (TIMES SIN.THETA COS.RHO]
          (RETURN (CONS (create POSITION
				XCOORD ←(IDIFFERENCE X1 (FIX XP1))
				YCOORD ←(IDIFFERENCE Y1 (FIX YP1)))
			(create POSITION
				XCOORD ←(IDIFFERENCE X1 (FIX XP2))
				YCOORD ←(IDIFFERENCE Y1 (FIX YP2])
)
(READ.ITEMTYPE BACKLIT.BUTTON 5)
(\TYPE ITEM.TYPE NAME BACKLIT.BUTTON COMMENT  "A general button" KIND COMPOSITE PARAMETERS  ((\TYPE 
PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The artwork for the button")  
(\TYPE PARAMETER NAME TEXT TYPE  (LIST  (STRING)) DEFAULT  (Button Label) COMMENT  
"The words associated with the button")  (\TYPE PARAMETER NAME TEXT.OFFSET TYPE  (OFFSET.VECTOR  (
PLACEMENT)) DEFAULT  (17 . 17) COMMENT  
"The offset of the words form the lower left corner of the button")  (\TYPE PARAMETER NAME 
HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  
"Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT
 NIL COMMENT  "Font in which to print the label")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT TYPE  (
ONEOF  (TOP CENTER BOTTOM)) DEFAULT CENTER COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) 
DEFAULT CELL.1 COMMENT  "The cell to affect and display")  (\TYPE PARAMETER NAME VALUE TYPE  (CONSTANT
) DEFAULT VALUE.1 COMMENT  "The value to be set and reflected")) SUBITEM.SPECS  ((LABEL BUTTON  (ITEM 
PICTURE  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION  (MINUS BUTTON.BITMAP.EXTRA) 0)))  (BITMAP 
PICTURE)))  (ITEM SENSITIVE.REGION  (PLACEMENT  (BOUNDING.BOX BUTTON))  (ACTION.FORM  (LIST  (QUOTE 
CHANGE.CELL) CELL  (KWOTE VALUE))))  (ITEM BLOCK.OF.TEXT  (PLACEMENT  (PTRANSLATE PLACEMENT 
TEXT.OFFSET))  (LIST.OF.LINES TEXT)  (XALIGNMENT HORIZONTAL.ALIGNMENT)  (YALIGNMENT VERTICAL.ALIGNMENT
)  (FONT FONT)  (OPERATION  (QUOTE INVERT)))  (ITEM LIGHT  (PLACEMENT  (BOUNDING.BOX BUTTON))  (CELL 
CELL)  (REFERENCE.VALUE VALUE))) OTHER  (FNS  ((1 CONVERT.BACKLIT.BUTTON.OFFSETS))) CLASSES  (BUTTON 
COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.BACKLIT.BUTTON.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE BITMAP 5)
(\TYPE ITEM.TYPE NAME BITMAP COMMENT  "A bitmap for use in other frames" KIND ARTWORK PARAMETERS  ((
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The lower left corner of the bitmap")  (\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT 
EXAMPLE.BITMAP COMMENT  "The bits")  (\TYPE PARAMETER NAME BITMAP TYPE  (BITMAP) DEFAULT  {(
READBITMAP)(100 100
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@")} COMMENT  "The bits")) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.BITMAP)  (SHOW SHOW.BITMAP)) BITMAPS
  ((EXAMPLE.BITMAP  {(READBITMAP)(100 100
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AOOOOOOH@@@OOOOOOON@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@GN@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AOOOOOOH@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@@@@@@@C@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@COOOONC@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AO@@@@@@@@@OL@@@@CO@@C@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@AOOOOOOHOL@OOOOOOOOAOK@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"L@@@@@@@@@@@@@@@@@@@@@@@C@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOO@@@")}))) CLASSES  (ARTWORK SERVICE))
(DEFINEQ

(BOUNDING.BOX.BITMAP
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 16:27")
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT BITMAP))
	   (BITMAP (GET.PARAMQ ITEM BITMAP BITMAP)))
          (RETURN (LIST (fetch (POSITION XCOORD) of POS)
			(fetch (POSITION YCOORD) of POS)
			(fetch (BITMAP BITMAPWIDTH) of BITMAP)
			(fetch (BITMAP BITMAPHEIGHT) of BITMAP])

(SHOW.BITMAP
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 16:27")
                                                             (* edited: "24-MAR-82 17:11")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((BITMAP (GET.PARAMQ ITEM BITMAP BITMAP))
	   (POSITION (GET.PARAMQ ITEM PLACEMENT BITMAP)))
          (BITBLT BITMAP 0 0 CURRENT.DSP (fetch (POSITION XCOORD) of POSITION)
		  (fetch (POSITION YCOORD) of POSITION)
		  (fetch (BITMAP BITMAPWIDTH) of BITMAP)
		  (fetch (BITMAP BITMAPHEIGHT) of BITMAP)
		  (QUOTE INPUT)
		  (QUOTE REPLACE])
)
(READ.ITEMTYPE BLOCK.OF.TEXT 5)
(\TYPE ITEM.TYPE NAME BLOCK.OF.TEXT COMMENT  "A bunch of related lines of text, with alignment" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The reference point of the block")  (\TYPE PARAMETER NAME LIST.OF.LINES TYPE  (LIST  (STRING)) 
DEFAULT  ("Lines of text"  "in a BLOCK.OF.TEXT") COMMENT  "The text lines")  (\TYPE PARAMETER NAME 
XALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT LEFT COMMENT  "Horizontal alignment")  (\TYPE 
PARAMETER NAME YALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT TOP COMMENT  "Vertical alignment"
)  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (HELVETICA 10) COMMENT  
"The font in which to print the information")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (INPUT 
INVERT MERGE TEXTURE)) DEFAULT INPUT COMMENT  "Source for BITBLT")  (\TYPE PARAMETER NAME OPERATION 
TYPE  (ONEOF  (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  "Operation for BITBLT")  (\TYPE 
PARAMETER NAME TEXTURE TYPE  (SHADE) DEFAULT 65535 COMMENT  "Texture for BITBLT")  (\TYPE PARAMETER 
NAME FIGURE-COLOR TYPE  (COLOR.NAME) DEFAULT BLACK COMMENT  "The color corresponding to the figure")  
(\TYPE PARAMETER NAME GROUND-COLOR TYPE  (COLOR.NAME) DEFAULT WHITE COMMENT  
"The color corresponding to ground")) SUBITEM.SPECS  ((SELECT YALIGNMENT  (TOP  (FOREACH  (LINE IN 
LIST.OF.LINES)  (I FROM 0) DO  (ITEM LINE.OF.TEXT  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION 0 
 (MINUS  (ITIMES I  (FONT.HEIGHT FONT))))))  (LINE LINE)  (XALIGNMENT XALIGNMENT)  (FONT FONT)  (
SOURCE SOURCE)  (OPERATION OPERATION)  (TEXTURE TEXTURE)  (FIGURE-COLOR FIGURE-COLOR)  (GROUND-COLOR 
GROUND-COLOR))))  (CENTER  (FOREACH  (LINE IN LIST.OF.LINES)  (I FROM 1) DO  (ITEM LINE.OF.TEXT  (
PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION 0  (IDIFFERENCE  (IQUOTIENT  (ITIMES  (LENGTH 
LIST.OF.LINES)  (FONTPROP FONT  (QUOTE HEIGHT))) 2)  (ITIMES I  (FONTPROP FONT  (QUOTE HEIGHT)))))))  
(LINE LINE)  (XALIGNMENT XALIGNMENT)  (FONT FONT)  (SOURCE SOURCE)  (OPERATION OPERATION)  (TEXTURE 
TEXTURE))))  (BOTTOM  (FOREACH  (LINE IN LIST.OF.LINES)  (I FROM 1) DO  (ITEM LINE.OF.TEXT  (PLACEMENT
  (PTRANSLATE PLACEMENT  (NEW.POSITION 0  (ITIMES  (IDIFFERENCE  (LENGTH LIST.OF.LINES) I)  (FONTPROP 
FONT  (QUOTE HEIGHT))))))  (LINE LINE)  (XALIGNMENT XALIGNMENT)  (FONT FONT)  (SOURCE SOURCE)  (
OPERATION OPERATION)  (TEXTURE TEXTURE)))))) CLASSES  (COMPOSITE))
(READ.ITEMTYPE BORDER 5)
(\TYPE ITEM.TYPE NAME BORDER COMMENT  "A border with color at the edge" KIND ARTWORK PARAMETERS  ((
\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 50 50) COMMENT  
"The outside area of the border")  (\TYPE PARAMETER NAME THICKNESS TYPE  (INTEGER) DEFAULT 10 COMMENT 
 "The number of points in the colored edge")  (\TYPE PARAMETER NAME OPERATION TYPE  (ONEOF  (REPLACE 
PAINT INVERT ERASE)) DEFAULT PAINT COMMENT  "The operation for BITBLT")  (\TYPE PARAMETER NAME COLOR 
TYPE  (SHADE) DEFAULT 33345 COMMENT  "The color of the edge")) OTHER  (FNS  ((SHOW SHOW.BORDER))) 
CLASSES  (ARTWORK))
(DEFINEQ

(SHOW.BORDER
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:29")
                                                             (* rao: "22-JUN-82 16:12")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((THICKNESS (GET.PARAMQ ITEM THICKNESS BORDER))
	   (COLOR (GET.PARAMQ ITEM COLOR BORDER))
	   (OPERATION (GET.PARAMQ ITEM OPERATION BORDER))
	   (REGION (GET.PARAMQ ITEM PLACEMENT BORDER))
	   L1 R1 L2 R2 B1 T1 B2 T2)
          (SETQ L1 (fetch (REGION LEFT) of REGION))
          (SETQ R1 (IPLUS L1 THICKNESS))
          (SETQ R2 (IPLUS L1 (fetch (REGION WIDTH) of REGION)))
          (SETQ L2 (IDIFFERENCE R2 THICKNESS))
          (SETQ B1 (fetch (REGION BOTTOM) of REGION))
          (SETQ T1 (IPLUS B1 THICKNESS))
          (SETQ T2 (IPLUS B1 (fetch (REGION HEIGHT) of REGION)))
          (SETQ B2 (IDIFFERENCE T2 THICKNESS))
          (COND
	    ((AND (ILESSP R1 L2)
		  (ILESSP T1 B2))
	      (BITBLT NIL NIL NIL CURRENT.DSP L1 B1 THICKNESS (IDIFFERENCE T2 B1)
		      (QUOTE TEXTURE)
		      OPERATION COLOR)
	      (BITBLT NIL NIL NIL CURRENT.DSP L2 B1 THICKNESS (IDIFFERENCE T2 B1)
		      (QUOTE TEXTURE)
		      OPERATION COLOR)
	      (BITBLT NIL NIL NIL CURRENT.DSP R1 B1 (IDIFFERENCE L2 R1)
		      THICKNESS
		      (QUOTE TEXTURE)
		      OPERATION COLOR)
	      (BITBLT NIL NIL NIL CURRENT.DSP R1 B2 (IDIFFERENCE L2 R1)
		      THICKNESS
		      (QUOTE TEXTURE)
		      OPERATION COLOR))
	    (T (BITBLT NIL NIL NIL CURRENT.DSP L1 B1 (IDIFFERENCE R2 L1)
		       (IDIFFERENCE T2 B1)
		       (QUOTE TEXTURE)
		       OPERATION COLOR])
)
(READ.ITEMTYPE CAPTION 5)
(\TYPE ITEM.TYPE NAME CAPTION COMMENT  
"A block of text, positioned (on the grid) at its top left corner" KIND COMPOSITE PARAMETERS  ((\TYPE 
PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"Top left corner of block of text" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME LIST.OF.LINES TYPE  (
LIST  (STRING)) DEFAULT  ("List of lines"  "in a CAPTION") COMMENT  "The text of the block")  (\TYPE 
PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (HELVETICA 12) COMMENT  
"The font in which the caption is printed")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (INPUT INVERT 
MERGE TEXTURE)) DEFAULT INPUT COMMENT  "Source for BITBLT")  (\TYPE PARAMETER NAME OPERATION TYPE  (
ONEOF  (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  "Operation for BITBLT")  (\TYPE 
PARAMETER NAME TEXTURE TYPE  (SHADE) DEFAULT 65535 COMMENT  "Texture for BITBLT")) SUBITEM.SPECS  ((
ITEM BLOCK.OF.TEXT  (PLACEMENT PLACEMENT)  (LIST.OF.LINES LIST.OF.LINES)  (XALIGNMENT  (QUOTE LEFT))  
(YALIGNMENT  (QUOTE TOP))  (FONT FONT)  (SOURCE SOURCE)  (OPERATION OPERATION)  (TEXTURE TEXTURE))) 
CLASSES  (COMPOSITE))
(READ.ITEMTYPE CASCADE 5)
(\TYPE ITEM.TYPE NAME CASCADE COMMENT  
"A set of backlit buttons which all affect the same cell, thus interacting" KIND COMPOSITE PARAMETERS 
 ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) COMMENT  
"Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BUTTONS TYPE  (LIST  (
STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  ((("LABEL 1") VALUE.1)  ((
"LABEL 2") VALUE2)) COMMENT  "The buttons themselves")  (\TYPE PARAMETER NAME BUTTON.PICTURE TYPE  (
BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")  (\TYPE PARAMETER 
NAME INDICATOR.PICTURE TYPE  (BITMAP.NAME) DEFAULT SMALL.SPOT.BITMAP COMMENT  
"The graphic for the indicators")  (\TYPE PARAMETER NAME BUTTON/INDICATOR.SPACING TYPE  (OFFSET.VECTOR
) DEFAULT  (0 . 51) COMMENT  "Spacing between button and bottom indicator")  (\TYPE PARAMETER NAME 
INDICATOR.SPACING TYPE  (OFFSET.VECTOR) DEFAULT  (0 . 34) COMMENT  "Spacing between the indicators")  
(\TYPE PARAMETER NAME TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR) DEFAULT  (-34 . 17) COMMENT  
"Offset for the text from the indicators")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (
HELVETICA 10) COMMENT  "The font for the text")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (
ONEOF  (LEFT CENTER RIGHT)) DEFAULT LEFT COMMENT  "Horizontal alignment of the text")  (\TYPE 
PARAMETER NAME VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT TOP COMMENT  
"Vertical alignment of the text")  (\TYPE PARAMETER NAME CONTINUOUS? TYPE  (ONEOF  (YES NO)) DEFAULT 
NO COMMENT  "Whether or not to keep going if the button is held down")  (\TYPE PARAMETER NAME RATE 
TYPE  (INTEGER) DEFAULT 300 COMMENT  "Rate it changes (in milliseconds) if continuous")  (\TYPE 
PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The affected cell")  (\TYPE PARAMETER NAME 
INITIAL.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "An initial value for the cell")  (\TYPE 
PARAMETER NAME SHOW.INITIAL.VALUE? TYPE  (ONEOF  (YES NO)) DEFAULT YES COMMENT  
"Whether or not the default is visible - ala 1075")) SUBITEM.SPECS  ((ITEM CASCADE.BUTTON  (PLACEMENT 
PLACEMENT)  (BUTTONS BUTTONS)  (CELL CELL)  (PICTURE BUTTON.PICTURE)  (CONTINUOUS? CONTINUOUS?)  (RATE
 RATE)  (AT.LIMIT  (QUOTE WRAP.AROUND))  (DIRECTION  (QUOTE UP)))  (FOREACH  (BUTTON IN  (COND  ((EQ 
SHOW.INITIAL.VALUE?  (QUOTE YES)) BUTTONS)  (T  (for B in BUTTONS collect B when  (NOT  (EQUAL  (CADR 
B) INITIAL.VALUE))))))  (I FROM 0)  (J FROM 0) DO  (ITEM CASCADE.INDICATOR  (PLACEMENT  (PTRANSLATE 
PLACEMENT  (IPLUS  (ITIMES J  (CAR INDICATOR.SPACING))  (CAR BUTTON/INDICATOR.SPACING))  (IPLUS  (
ITIMES I  (CDR INDICATOR.SPACING))  (CDR BUTTON/INDICATOR.SPACING))))  (BITMAP INDICATOR.PICTURE)  (
TEXT  (CAR BUTTON))  (FONT FONT)  (TEXT.OFFSET TEXT.DISPLACEMENT)  (HORIZONTAL.ALIGNMENT 
HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT VERTICAL.ALIGNMENT)  (CELL CELL)  (VALUE  (CADR BUTTON)))) 
 (ITEM INITIALIZATION  (PLACEMENT PLACEMENT)  (ACTION.FORM  (LIST  (QUOTE SET.CELL) CELL INITIAL.VALUE
)))) OTHER  (FNS  ((1 CONVERT.CASCADE.OFFSETS)) BITMAPS  ((SMALL.SPOT.BITMAP  {(READBITMAP)(21 22
"@AOL@@@@"
"@GOO@@@@"
"@OOOH@@@"
"AOOOL@@@"
"COOON@@@"
"GOOOO@@@"
"GOOOO@@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"GOOOO@@@"
"GOOOO@@@"
"COOON@@@"
"AOOOL@@@"
"@OOOH@@@"
"@GOO@@@@"
"@AOL@@@@")}))) CLASSES  (COMPOSITE BUTTON) VERSION 1)
(DEFINEQ

(CONVERT.CASCADE.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:27")
    (PROG NIL
          (CONVERT.GRIDDED.OFFSETSQ ITEM BUTTON/INDICATOR.HORIZONTAL.SPACING BUTTON/INDICATOR.SPACING 
				    BUTTON/INDICATOR.SPACING)
          (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.SPACING VERTICAL.SPACING INDICATOR.SPACING)
          (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(READ.ITEMTYPE CASCADE.BUTTON 5)
(\TYPE ITEM.TYPE NAME CASCADE.BUTTON COMMENT  
"A small button, with a label on it, which flashes when pushed, and does internal action" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME BUTTONS TYPE  (LIST  (STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  (((
"LABEL 1") VALUE.1)  (("LABEL 2") VALUE2)) COMMENT  "The buttons themselves")  (\TYPE PARAMETER NAME 
PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")  (
\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell changed by the button")  (
\TYPE PARAMETER NAME CONTINUOUS? TYPE  (ONEOF  (YES NO)) DEFAULT NO COMMENT  
"Whether or not to keep going if the button is held down")  (\TYPE PARAMETER NAME RATE TYPE  (INTEGER)
 DEFAULT 300 COMMENT  "Rate it changes (in milliseconds) if continuous")  (\TYPE PARAMETER NAME 
AT.LIMIT TYPE  (ONEOF  (WRAP.AROUND STICK.AT.LIMIT)) DEFAULT WRAP.AROUND COMMENT  
"What to do when it reaches the limit")  (\TYPE PARAMETER NAME DIRECTION TYPE  (ONEOF  (UP DOWN)) 
DEFAULT UP COMMENT  "The direction in which to walk through the BUTTONS list")) SUBITEM.SPECS  ((LABEL
 BUTTON  (ITEM PICTURE  (PLACEMENT  (PTRANSLATE PLACEMENT  (MINUS BUTTON.BITMAP.EXTRA) 0))  (BITMAP 
PICTURE)))  (ITEM FLASHING.SENSITIVE.REGION  (PLACEMENT  (BOUNDING.BOX BUTTON))  (ACTION.FORM  (LIST  
(QUOTE ACTON.CASCADE.BUTTON) BUTTONS CELL  (AND  (EQ CONTINUOUS?  (QUOTE YES)) RATE)  (EQ DIRECTION  (
QUOTE DOWN))  (EQ AT.LIMIT  (QUOTE WRAP.AROUND)))))) OTHER  (FNS  ((ACTON ACTON.CASCADE.BUTTON)  (NIL 
INCREMENT.CASCADE.BUTTON))) CLASSES  (BUTTON COMPOSITE))
(DEFINEQ

(ACTON.CASCADE.BUTTON
  [NLAMBDA (BUTTONS CELL RATE DOWN WRAP.AROUND)              (* edited: "15-Aug-84 15:04")
    (INCREMENT.CASCADE.BUTTON BUTTONS CELL DOWN WRAP.AROUND)
    (COND
      (RATE (do (TRILLIUM.DISMISS RATE)
		(COND
		  ((MOUSESTATE UP)
		    (RETURN)))
		(INCREMENT.CASCADE.BUTTON BUTTONS CELL DOWN WRAP.AROUND])

(INCREMENT.CASCADE.BUTTON
  [LAMBDA (BUTTONS CELL DOWN WRAP.AROUND)                    (* edited: "15-Aug-84 15:08")
    (PROG (CURRENT.VALUE N NEW.VALUE)
          (SETQ N (LENGTH BUTTONS))
          (SETQ CURRENT.VALUE (GET.CURRENT.VALUE CELL))
          [COND
	    [DOWN (for I from 1 to (SUB1 N) as ELEM on BUTTONS when (EQ (CADADR ELEM)
									CURRENT.VALUE)
		     do (SETQ NEW.VALUE (CADAR ELEM))
			(RETURN)
		     finally (SETQ NEW.VALUE (COND
				 (WRAP.AROUND (CADAR (NTH BUTTONS N)))
				 (T CURRENT.VALUE]
	    (T (for I from 1 to (SUB1 N) as ELEM on BUTTONS when (EQ (CADAR ELEM)
								     CURRENT.VALUE)
		  do (SETQ NEW.VALUE (CADADR ELEM))
		     (RETURN)
		  finally (SETQ NEW.VALUE (COND
			      (WRAP.AROUND (CADAR BUTTONS))
			      (T CURRENT.VALUE]
          (CHANGE.CURRENT.VALUE CELL NEW.VALUE])
)
(READ.ITEMTYPE CASCADE.INDICATOR 5)
(\TYPE ITEM.TYPE NAME CASCADE.INDICATOR COMMENT  "An indicator with associated text" KIND COMPOSITE 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the light" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME BITMAP TYPE  (BITMAP.NAME) DEFAULT SMALL.SPOT.BITMAP COMMENT  "The graphics for the indicator")  
(\TYPE PARAMETER NAME TEXT TYPE  (LIST  (STRING)) DEFAULT  (Label for Light) COMMENT  
"The text associated with the light")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (HELVETICA 10)
 COMMENT  "Font for the label")  (\TYPE PARAMETER NAME TEXT.OFFSET TYPE  (OFFSET.VECTOR  (PLACEMENT)) 
DEFAULT  (51 . 17) COMMENT  "The offset of the words form the lower left corner of the button")  (
\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT  (QUOTE LEFT) 
COMMENT  "Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME 
VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT  (QUOTE CENTER) COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) 
DEFAULT CELL.1 COMMENT  "The cell to affect and display")  (\TYPE PARAMETER NAME VALUE TYPE  (CONSTANT
) DEFAULT VALUE.1 COMMENT  "The value to be set and reflected")) SUBITEM.SPECS  ((ITEM INDICATOR  (
PLACEMENT PLACEMENT)  (BITMAP BITMAP)  (CELL CELL)  (REFERENCE.VALUE VALUE))  (ITEM BLOCK.OF.TEXT  (
PLACEMENT  (PTRANSLATE PLACEMENT TEXT.OFFSET))  (LIST.OF.LINES TEXT)  (FONT FONT)  (XALIGNMENT 
HORIZONTAL.ALIGNMENT)  (YALIGNMENT VERTICAL.ALIGNMENT))) CLASSES  (COMPOSITE) VERSION 1 OTHER  (FNS  (
(1 CONVERT.CASCADE.INDICATOR.OFFSETS))))
(DEFINEQ

(CONVERT.CASCADE.INDICATOR.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE CHANGE.FRAME.BUTTON 5)
(\TYPE ITEM.TYPE NAME CHANGE.FRAME.BUTTON COMMENT  "A general button" KIND COMPOSITE PARAMETERS  ((
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT OFFPAGE.BUTTON.BITMAP COMMENT  "The artwork for the button") 
 (\TYPE PARAMETER NAME LIST.OF.LINES TYPE  (LIST  (STRING)) DEFAULT  ("Push to <frame>") COMMENT  
"The words associated with the button")  (\TYPE PARAMETER NAME TEXT.OFFSET TYPE  (OFFSET.VECTOR  (
PLACEMENT)) DEFAULT  (34 . 51) COMMENT  
"The offset of the words form the lower left corner of the button")  (\TYPE PARAMETER NAME 
HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  
"Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT TYPE  
(ONEOF  (TOP CENTER BOTTOM)) DEFAULT BOTTOM COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) 
DEFAULT NIL COMMENT  "Font in which to print the label")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (
INPUT)) DEFAULT INPUT COMMENT  "The source for BITBLT for the labels")  (\TYPE PARAMETER NAME 
OPERATION TYPE  (ONEOF  (REPLACE INVERT PAINT ERASE)) DEFAULT INVERT COMMENT  
"The operation for BITBLT for the labels")  (\TYPE PARAMETER NAME RESPONSE TYPE  (ONEOF  (NONE 
BLACK.WHILE.DEPRESSED INVERTS.WHEN.DEPRESSED)) DEFAULT BLACK.WHILE.DEPRESSED COMMENT  
"The response to being depressed")  (\TYPE PARAMETER NAME STACK.OPERATION TYPE  (ONEOF  (NO.CHANGE 
PUSH POP)) DEFAULT PUSH COMMENT  "How to change the stack of frames")  (\TYPE PARAMETER NAME 
INITIALIZATION TYPE  (ONEOF  (INITIALIZE DO.NOT.INITIALIZE)) DEFAULT INITIALIZE COMMENT  
"Whether or not to do initialization of the frame")  (\TYPE PARAMETER NAME FRAME TYPE  (FRAME) DEFAULT
 NIL COMMENT  "The frame to push to")) SUBITEM.SPECS  ((ITEM GENERAL.BUTTON  (PLACEMENT PLACEMENT)  (
PICTURE PICTURE)  (TEXT LIST.OF.LINES)  (TEXT.OFFSET TEXT.OFFSET)  (HORIZONTAL.ALIGNMENT 
HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT VERTICAL.ALIGNMENT)  (FONT FONT)  (SOURCE SOURCE)  (
OPERATION OPERATION)  (RESPONSE RESPONSE)  (ACTION  (BUILD.STACK.OPERATION STACK.OPERATION FRAME 
INITIALIZATION)))) OTHER  (BITMAPS  ((OFFPAGE.BUTTON.BITMAP  {(READBITMAP)(74 40
"OOOOOOOOOOOOOOOOOD@@"
"OOOOOOOOOOOOOOOOOF@@"
"OOOOOOOOOOOOOOOOOG@@"
"N@@@@@@@@@@@@@@@GGH@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"OOOOOOOOOOOOOOOOOGL@"
"OOOOOOOOOOOOOOOOOGL@"
"OOOOOOOOOOOOOOOOOGL@"
"@@@@@@@@@@@@@@@@@CL@"
"OOOOOOOOOOOOOOOOOAL@"
"GOOOOOOOOOOOOOOOOHL@"
"COOOOOOOOOOOOOOOOLD@"
"AOOOOOOOOOOOOOOOON@@"
"@OOOOOOOOOOOOOOOOO@@")})) FNS  ((1 CONVERT.CHANGE.FRAME.BUTTON.OFFSETS))) CLASSES  (BUTTON COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.CHANGE.FRAME.BUTTON.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE CIRCLE 5)
(\TYPE ITEM.TYPE NAME CIRCLE COMMENT  "A circle" KIND ARTWORK PARAMETERS  ((\TYPE PARAMETER NAME 
PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  "The center of the circle")  (\TYPE PARAMETER
 NAME RADIUS TYPE  (INTEGER) DEFAULT 50 COMMENT  "The radius of the circle")  (\TYPE PARAMETER NAME 
BRUSH.SHAPE TYPE  (ONEOF  (ROUND SQUARE HORIZONTAL VERTICAL)) DEFAULT ROUND COMMENT  
"The brush shpae for drawing")  (\TYPE PARAMETER NAME BRUSH.SIZE TYPE  (INTEGER) DEFAULT 10 COMMENT  
"The brush size for drawing")) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.CIRCLE)  (SHOW SHOW.CIRCLE))) 
CLASSES  (ARTWORK))
(DEFINEQ

(BOUNDING.BOX.CIRCLE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:32")
                                                             (* edited: " 9-JUN-82 10:16")
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT CIRCLE))
	   (RADIUS (GET.PARAMQ ITEM RADIUS CIRCLE))
	   (BRUSH.SIZE (GET.PARAMQ ITEM BRUSH.SIZE CIRCLE))
	   X Y)
          (SETQ X (fetch (POSITION XCOORD) of POS))
          (SETQ Y (fetch (POSITION YCOORD) of POS))
          (RETURN (LIST (IDIFFERENCE X (IPLUS RADIUS (IQUOTIENT BRUSH.SIZE 2)))
			(IDIFFERENCE Y (IPLUS RADIUS (IQUOTIENT BRUSH.SIZE 2)))
			(IPLUS BRUSH.SIZE (ITIMES RADIUS 2))
			(IPLUS BRUSH.SIZE (ITIMES RADIUS 2])

(SHOW.CIRCLE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:39")
                                                             (* edited: " 9-JUN-82 10:19")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT CIRCLE))
	   (RADIUS (GET.PARAMQ ITEM RADIUS CIRCLE))
	   (BRUSH.SIZE (GET.PARAMQ ITEM BRUSH.SIZE CIRCLE))
	   (BRUSH.SHAPE (GET.PARAMQ ITEM BRUSH.SHAPE CIRCLE)))
          (DRAWCIRCLE (fetch (POSITION XCOORD) of POS)
		      (fetch (POSITION YCOORD) of POS)
		      RADIUS
		      (LIST BRUSH.SHAPE BRUSH.SIZE)
		      NIL CURRENT.DSP])
)
(READ.ITEMTYPE COLOR 5)
(\TYPE ITEM.TYPE NAME COLOR COMMENT  "A color definition" KIND ARTWORK PARAMETERS  ((\TYPE PARAMETER 
NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  "The location of this item" GRID.TYPE  (
LOCATION))  (\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT GRAY COMMENT  "The name of this color"
)  (\TYPE PARAMETER NAME COLOR TYPE  (COLOR.NUMBER) DEFAULT 0 COMMENT  "The color")  (\TYPE PARAMETER 
NAME REPRESENTATIVE.GRAY TYPE  (SHADE) DEFAULT 42405 COMMENT  
"The shade of gray to be used to represent this color on a B&W display")) OTHER  (FNS  ((BOUNDING.BOX 
BOUNDING.BOX.COLOR)  (SHOW SHOW.COLOR))) CLASSES  (ARTWORK SERVICE))
(DEFINEQ

(BOUNDING.BOX.COLOR
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 16:27")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT COLOR)))
          (RETURN (create REGION
			  LEFT ←(fetch (POSITION XCOORD) of POSITION)
			  BOTTOM ←(fetch (POSITION YCOORD) of POSITION)
			  WIDTH ← 50
			  HEIGHT ← 50])

(SHOW.COLOR
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 16:32")
    (DECLARE (GLOBALVARS CURRENT.DSP IN.LIVING.COLOR WHOLECOLORDISPLAY))
    (PROG ((BOUNDING.BOX (GET.FIELDQ ITEM BOUNDING.BOX))
	   (REPRESENTATIVE.GRAY (GET.PARAMQ ITEM REPRESENTATIVE.GRAY)))
          (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of BOUNDING.BOX)
		  (fetch (REGION BOTTOM) of BOUNDING.BOX)
		  (fetch (REGION WIDTH) of BOUNDING.BOX)
		  (fetch (REGION HEIGHT) of BOUNDING.BOX)
		  (QUOTE TEXTURE)
		  (QUOTE REPLACE)
		  REPRESENTATIVE.GRAY)
          (COND
	    (IN.LIVING.COLOR (COLORFILL (INTERSECTREGIONS BOUNDING.BOX WHOLECOLORDISPLAY)
					(GET.PARAMQ ITEM COLOR)
					(COLORSCREENBITMAP)
					(QUOTE REPLACE])
)
(READ.ITEMTYPE COMPUTER 5)
(\TYPE ITEM.TYPE NAME COMPUTER COMMENT  "Adds the values of a list of cells" KIND COMPOSITE PARAMETERS
  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The location of this item" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME INPUTS TYPE  (LIST  (CELL)) 
DEFAULT  (CELL.1) COMMENT  "The cells upon which to trigger the computation")  (\TYPE PARAMETER NAME 
OUTPUT TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The output cell")  (\TYPE PARAMETER NAME FORMULA TYPE  (
FORM) DEFAULT 1 COMMENT  "Formula for computing the value of the output cell")) SUBITEM.SPECS  ((
FOREACH  (CELL IN INPUTS)  (X FROM 0) DO  (ITEM IMPLICATION  (PLACEMENT  (TRANSLATE PLACEMENT X 0))  (
CELL CELL)  (ACTION.FORM  (LIST  (QUOTE ACTON.COMPUTER)  (KWOTE FORMULA)  (KWOTE OUTPUT)  (KWOTE 
INPUTS)))))) OTHER  (FNS  ((ACTON ACTON.COMPUTER))) CLASSES  (COMPOSITE))
(DEFINEQ

(ACTON.COMPUTER
  [LAMBDA (FORMULA OUTPUT.CELL.NAME INPUT.CELL.NAMES)        (* edited: "14-JAN-83 15:29")
    (CHANGE.CURRENT.VALUE OUTPUT.CELL.NAME (EVALA FORMULA (for CELL in INPUT.CELL.NAMES
							     collect (CONS CELL (GET.CURRENT.VALUE
									     CELL])
)
(READ.ITEMTYPE ELLIPSE 5)
(\TYPE ITEM.TYPE NAME ELLIPSE COMMENT  "An ellipse" KIND ARTWORK PARAMETERS  ((\TYPE PARAMETER NAME 
PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  "The centre of the ellipse")  (\TYPE 
PARAMETER NAME MINOR.AXIS TYPE  (INTEGER) DEFAULT 25 COMMENT  "The minor axis of the ellipse")  (\TYPE
 PARAMETER NAME MAJOR.AXIS TYPE  (INTEGER) DEFAULT 50 COMMENT  "The major axis of the ellipse")  (
\TYPE PARAMETER NAME ORIENTATION TYPE  (INTEGER) DEFAULT 0 COMMENT  "The orientation of the ellipse") 
 (\TYPE PARAMETER NAME BRUSH.SHAPE TYPE  (ONEOF  (ROUND SQUARE HORIZONTAL VERTICAL)) DEFAULT ROUND 
COMMENT  "The brush shpae for drawing")  (\TYPE PARAMETER NAME BRUSH.SIZE TYPE  (INTEGER) DEFAULT 10 
COMMENT  "The brush size for drawing")) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.ELLIPSE)  (SHOW 
SHOW.ELLIPSE))) CLASSES  (ARTWORK))
(DEFINEQ

(BOUNDING.BOX.ELLIPSE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:44")
                                                             (* edited: "10-JUN-82 15:01")
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT ELLIPSE))
	   (AXIS (MAX (GET.PARAMQ ITEM MAJOR.AXIS ELLIPSE)
		      (GET.PARAMQ ITEM MINOR.AXIS ELLIPSE)))
	   (ORIENTATION (GET.PARAMQ ITEM ORIENTATION ELLIPSE))
	   (BRUSH.SIZE (GET.PARAMQ ITEM BRUSH.SIZE ELLIPSE)))
          (RETURN (create REGION
			  LEFT ←(IDIFFERENCE (fetch (POSITION XCOORD) of POS)
					     (IPLUS AXIS (IQUOTIENT BRUSH.SIZE 2)))
			  BOTTOM ←(IDIFFERENCE (fetch (POSITION YCOORD) of POS)
					       (IPLUS AXIS (IQUOTIENT BRUSH.SIZE 2)))
			  WIDTH ←(IPLUS BRUSH.SIZE (ITIMES AXIS 2))
			  HEIGHT ←(IPLUS BRUSH.SIZE (ITIMES AXIS 2])

(SHOW.ELLIPSE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 13:47")
                                                             (* edited: "10-JUN-82 14:53")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT ELLIPSE))
	   (MAJOR.AXIS (GET.PARAMQ ITEM MAJOR.AXIS ELLIPSE))
	   (MINOR.AXIS (GET.PARAMQ ITEM MINOR.AXIS ELLIPSE))
	   (ORIENTATION (GET.PARAMQ ITEM ORIENTATION ELLIPSE))
	   (BRUSH.SIZE (GET.PARAMQ ITEM BRUSH.SIZE ELLIPSE))
	   (BRUSH.SHAPE (GET.PARAMQ ITEM BRUSH.SHAPE ELLIPSE)))
          (DRAWELLIPSE (fetch (POSITION XCOORD) of POS)
		       (fetch (POSITION YCOORD) of POS)
		       MINOR.AXIS MAJOR.AXIS ORIENTATION (LIST BRUSH.SHAPE BRUSH.SIZE)
		       NIL CURRENT.DSP])
)
(READ.ITEMTYPE EXTERNAL.BUTTON 5)
(\TYPE ITEM.TYPE NAME EXTERNAL.BUTTON COMMENT  "A button to cause effects in the world" KIND COMPOSITE
 PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT EXTERNAL.BUTTON.BITMAP COMMENT  "The artwork for the button")
  (\TYPE PARAMETER NAME LIST.OF.LINES TYPE  (LIST  (STRING)) DEFAULT  ("Effect an action"  
"outside the machine") COMMENT  "The words associated with the button")  (\TYPE PARAMETER NAME 
TEXT.OFFSET TYPE  (OFFSET.VECTOR  (PLACEMENT)) DEFAULT  (34 . 85) COMMENT  
"The offset of the words form the lower left corner of the button")  (\TYPE PARAMETER NAME 
HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  
"Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT TYPE  
(ONEOF  (TOP CENTER BOTTOM)) DEFAULT BOTTOM COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) 
DEFAULT NIL COMMENT  "Font in which to print the label")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (
INPUT)) DEFAULT INPUT COMMENT  "The source for BITBLT for the labels")  (\TYPE PARAMETER NAME 
OPERATION TYPE  (ONEOF  (REPLACE INVERT PAINT ERASE)) DEFAULT INVERT COMMENT  
"The operation for BITBLT for the labels")  (\TYPE PARAMETER NAME RESPONSE TYPE  (ONEOF  (NONE 
BLACK.WHILE.DEPRESSED INVERTS.WHEN.DEPRESSED)) DEFAULT BLACK.WHILE.DEPRESSED COMMENT  
"The response to being depressed")  (\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (
ACTION.PRINT  "Would now go off and affect the outside world") COMMENT  
"The action to be taken when the button is depressed")) SUBITEM.SPECS  ((ITEM GENERAL.BUTTON  (
PLACEMENT PLACEMENT)  (PICTURE PICTURE)  (TEXT LIST.OF.LINES)  (TEXT.OFFSET TEXT.OFFSET)  (
HORIZONTAL.ALIGNMENT HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT VERTICAL.ALIGNMENT)  (FONT FONT)  (
SOURCE SOURCE)  (OPERATION OPERATION)  (RESPONSE RESPONSE)  (ACTION ACTION.FORM))) OTHER  (BITMAPS  ((
EXTERNAL.BUTTON.BITMAP  {(READBITMAP)(74 74
"OOOOOOOOOOOOOOOOOD@@"
"OOOOOOOOOOOOOOOOOF@@"
"OOOOOOOOOOOOOOOOOG@@"
"N@@@@@@@@@@@@@@@GGH@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"N@@@@@@@@@@@@@@@GGL@"
"OOOOOOOOOOOOOOOOOGL@"
"OOOOOOOOOOOOOOOOOGL@"
"OOOOOOOOOOOOOOOOOGL@"
"@@@@@@@@@@@@@@@@@CL@"
"OOOOOOOOOOOOOOOOOAL@"
"GOOOOOOOOOOOOOOOOHL@"
"COOOOOOOOOOOOOOOOLD@"
"AOOOOOOOOOOOOOOOON@@"
"@OOOOOOOOOOOOOOOOO@@")})) FNS  ((1 CONVERT.EXTERNAL.BUTTON.OFFSETS))) CLASSES  (BUTTON COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.EXTERNAL.BUTTON.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE FLASHING.SENSITIVE.REGION 5)
(\TYPE ITEM.TYPE NAME FLASHING.SENSITIVE.REGION COMMENT  
"A sensor, which goes black on depression, takes action, goes white again on release" KIND SENSOR 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 30 30) COMMENT  
"An area sensitive to touch")  (\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by a FLASHING.SENSITIVE.REGION") COMMENT  
"The action to be taken as the sensitive region is touched")) OTHER  (FNS  ((SENSE 
SENSE.FLASHING.SENSITIVE.REGION))) CLASSES  (SENSOR))
(DEFINEQ

(SENSE.FLASHING.SENSITIVE.REGION
  [LAMBDA (ITEM TOUCH XCOORD YCOORD)                         (* HaKo " 7-Aug-84 16:41")
                                                             (* TRB "12-JAN-84 17:09")
    (COND
      (TOUCH (PROG (BOX ACTION (REGION (GET.PARAMQ ITEM PLACEMENT)))
	           (COND
		     ((INSIDEP REGION XCOORD YCOORD)
		       (BEGIN.EVENT ITEM)
		       (SETQ BOX (BIGGER.BOX REGION))
		       (SETQ ACTION (GET.PARAMQ ITEM ACTION.FORM))
		       (FLIP.BOX BOX)
		       (WAITNOBUG)
		       (FLIP.BOX BOX)
		       (TRILLIUM.EVAL ACTION)
		       (END.EVENT)
		       (RETURN T])
)
(READ.ITEMTYPE GENERAL.BUTTON 5)
(\TYPE ITEM.TYPE NAME GENERAL.BUTTON COMMENT  "A general button" KIND COMPOSITE PARAMETERS  ((\TYPE 
PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The artwork for the button")  
(\TYPE PARAMETER NAME TEXT TYPE  (LIST  (STRING)) DEFAULT  ("Label") COMMENT  
"The words associated with the button")  (\TYPE PARAMETER NAME TEXT.OFFSET TYPE  (OFFSET.VECTOR  (
PLACEMENT)) DEFAULT  (17 . 17) COMMENT  
"The offset of the words form the lower left corner of the button")  (\TYPE PARAMETER NAME 
HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  
"Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT TYPE  
(ONEOF  (TOP CENTER BOTTOM)) DEFAULT CENTER COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) 
DEFAULT NIL COMMENT  "Font in which to print the label")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (
INPUT)) DEFAULT INPUT COMMENT  "The source for BITBLT for the labels")  (\TYPE PARAMETER NAME 
OPERATION TYPE  (ONEOF  (REPLACE INVERT PAINT ERASE)) DEFAULT INVERT COMMENT  
"The operation for BITBLT for the labels")  (\TYPE PARAMETER NAME RESPONSE TYPE  (ONEOF  (NONE 
BLACK.WHILE.DEPRESSED INVERTS.WHEN.DEPRESSED)) DEFAULT BLACK.WHILE.DEPRESSED COMMENT  
"The response to being depressed")  (\TYPE PARAMETER NAME ACTION TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by a GENERAL.BUTTON") COMMENT  
"The action to be taken when the button is depressed")) SUBITEM.SPECS  ((LABEL GRAPHIC  (ITEM PICTURE 
 (PLACEMENT  (PTRANSLATE PLACEMENT  (MINUS BUTTON.BITMAP.EXTRA) 0))  (BITMAP PICTURE)))  (SELECT 
RESPONSE  (NONE  (ITEM SENSITIVE.REGION  (PLACEMENT  (BOUNDING.BOX GRAPHIC))  (ACTION.FORM ACTION)))  
(BLACK.WHILE.DEPRESSED  (ITEM FLASHING.SENSITIVE.REGION  (PLACEMENT  (BOUNDING.BOX GRAPHIC))  (
ACTION.FORM ACTION)))  (INVERTS.WHEN.DEPRESSED  (ITEM INVERTING.SENSITIVE.REGION  (PLACEMENT  (
BOUNDING.BOX GRAPHIC))  (ACTION.FORM ACTION))))  (ITEM BLOCK.OF.TEXT  (PLACEMENT  (PTRANSLATE 
PLACEMENT TEXT.OFFSET))  (LIST.OF.LINES TEXT)  (XALIGNMENT HORIZONTAL.ALIGNMENT)  (YALIGNMENT 
VERTICAL.ALIGNMENT)  (FONT FONT)  (OPERATION OPERATION))) OTHER  (BITMAPS  ((SIMPLE.BUTTON.BITMAP  {(
READBITMAP)(40 40
"OOOOOOOOM@@@"
"OOOOOOOOMH@@"
"OOOOOOOOML@@"
"N@@@@@@AMN@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"N@@@@@@AMO@@"
"OOOOOOOOMO@@"
"OOOOOOOOMO@@"
"OOOOOOOOMO@@"
"@@@@@@@@@O@@"
"OOOOOOOOLG@@"
"GOOOOOOONC@@"
"COOOOOOOOA@@"
"AOOOOOOOOH@@"
"@OOOOOOOOL@@")})) FNS  ((1 CONVERT.GENERAL.BUTTON.OFFSETS))) CLASSES  (BUTTON COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.GENERAL.BUTTON.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE GROUP 5)
(\TYPE ITEM.TYPE NAME GROUP COMMENT  "A translatable group of items" KIND COMPOSITE PARAMETERS  ((
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The location of the group: relative origin for items" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME 
MEMBERS TYPE  (LIST  (ITEM)) DEFAULT NIL COMMENT  "Members of the group")) SUBITEM.SPECS  ((EVAL  (
ANALYZE.GROUP))) OTHER  (FNS  ((ANALYZE ANALYZE.GROUP))) CLASSES  (COMPOSITE))
(DEFINEQ

(ANALYZE.GROUP
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 11:24")
                                                             (* DAHJr " 5-DEC-83 20:22")
    (DECLARE (SPECVARS MEMBERS PLACEMENT))
    (PROG (DXCOORD DYCOORD NEW.ITEM)
          (SETQ DXCOORD (fetch (POSITION XCOORD) of PLACEMENT))
          (SETQ DYCOORD (fetch (POSITION YCOORD) of PLACEMENT))
          (RETURN (for MEMBERITEM in MEMBERS
		     collect (SETQ NEW.ITEM (COPY.ITEM MEMBERITEM))
			     (TRANSLATE.PLACEMENT NEW.ITEM DXCOORD DYCOORD)
			     NEW.ITEM])
)
(READ.ITEMTYPE HORIZONTAL.BUTTONS 5)
(\TYPE ITEM.TYPE NAME HORIZONTAL.BUTTONS COMMENT  
"A set of backlit buttons which all affect the same cell, thus interacting" KIND COMPOSITE PARAMETERS 
 ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) COMMENT  
"Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BUTTONS TYPE  (LIST  (
STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  ((("LABEL 1") VALUE.1)  ((
"LABEL 2") VALUE.2)) COMMENT  "The buttons themselves")  (\TYPE PARAMETER NAME PICTURE TYPE  (
BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the buttons")  (\TYPE PARAMETER 
NAME HORIZONTAL.SPACING TYPE  (INTEGER) DEFAULT 51 COMMENT  "Between buttons")  (\TYPE PARAMETER NAME 
TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR) DEFAULT  (17 . 51) COMMENT  
"Offset for the text from the buttons")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (
LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  "Horizontal alignment of the text")  (\TYPE PARAMETER NAME
 VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT TOP COMMENT  
"Vertical alignment of the text")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT NIL COMMENT  
"The font in which to print the labels")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 
COMMENT  "The affected cell")  (\TYPE PARAMETER NAME INITIAL.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 
COMMENT  "An initial value for the cell")) SUBITEM.SPECS  ((ITEM SET.OF.LABELLED.BACKLIT.BUTTONS  (
PLACEMENT PLACEMENT)  (BUTTONS BUTTONS)  (PICTURE PICTURE)  (BUTTON.SPACING  (NEW.POSITION 
HORIZONTAL.SPACING 0))  (TEXT.DISPLACEMENT TEXT.DISPLACEMENT)  (HORIZONTAL.ALIGNMENT 
HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT VERTICAL.ALIGNMENT)  (FONT FONT)  (CELL CELL)  (
INITIAL.VALUE INITIAL.VALUE))) OTHER  (FNS  ((1 CONVERT.HORIZONTAL.BUTTONS.OFFSETS))) CLASSES  (BUTTON
 COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.HORIZONTAL.BUTTONS.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:53")
    (PROG NIL
          (CONVERT.GRIDDED.OFFSET ITEM (QUOTE HORIZONTAL.SPACING))
          (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(READ.ITEMTYPE IMPLICATION 5)
(\TYPE ITEM.TYPE NAME IMPLICATION COMMENT  
"Means by which a change in one cell can cause changes in others" KIND IMPLICATION PARAMETERS  ((\TYPE
 PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  "Un-named implication" COMMENT  "The item's name")  (
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"A place on the screen so that it can be referenced" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME 
CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell which triggers this implication")  (\TYPE 
PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by an implication") COMMENT  "The action to be taken")) OTHER  (FNS  ((
BOUNDING.BOX BOUNDING.BOX.IMPLICATION)  (IMPLY IMPLY.IMPLICATION))) CLASSES  (IMPLICATION))
(DEFINEQ

(BOUNDING.BOX.IMPLICATION
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:02")
                                                             (* DAHJr " 5-DEC-83 21:12")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT)))
          (RETURN (BOUNDING.BOX.FOR.SEGMENTS (fetch (POSITION XCOORD) of POSITION)
					     (fetch (POSITION YCOORD) of POSITION)
					     1 1])

(IMPLY.IMPLICATION
  [LAMBDA (IMPLICATION OLD.VALUE NEW.VALUE DONT.TRACE)       (* HaKo "17-Aug-84 13:45")
                                                             (* edited: "25-MAY-82 16:50")
    (DECLARE (GLOBALVARS TRILLIUM.TRACE))
    (AND TRILLIUM.TRACE (NOT DONT.TRACE)
	 (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE T "Activate implication: " (GET.PARAMQ IMPLICATION 
										     ACTION.FORM)))
    (TRILLIUM.EVAL (GET.PARAMQ IMPLICATION ACTION.FORM IMPLICATION])
)
(READ.ITEMTYPE INDICATOR 5)
(\TYPE ITEM.TYPE NAME INDICATOR COMMENT  "A bitmap which gets INVERTed into the frame" KIND DISPLAYER 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The lower left corner of the bitmap")  (\TYPE PARAMETER NAME BITMAP TYPE  (BITMAP.NAME) DEFAULT 
SIMPLE.BUTTON.BITMAP COMMENT  "The bitmap")  (\TYPE PARAMETER NAME ON-COLOR TYPE  (COLOR.NAME) DEFAULT
 BLACK COMMENT  "The color of the indicator when on")  (\TYPE PARAMETER NAME OFF-COLOR TYPE  (
COLOR.NAME) DEFAULT WHITE COMMENT  "The color of the indicator when off")  (\TYPE PARAMETER NAME CELL 
TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell whose value the light displays")  (\TYPE PARAMETER NAME
 CONDITION.OPERATION TYPE  (ONEOF  (= < > <= >= NOT.EQUAL)) DEFAULT = COMMENT  
"The operation to use to compare CELL with the REFERENCE.VALUE ")  (\TYPE PARAMETER NAME 
REFERENCE.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "The value to compare with the cell's value"
)) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.INDICATOR)  (SHOW SHOW.INDICATOR)  (DISPLAY 
DISPLAY.INDICATOR)  (RESET RESET.INDICATOR))) CLASSES  (DISPLAYER))
(DEFINEQ

(BOUNDING.BOX.INDICATOR
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:15")
                                                             (* edited: "30-MAR-82 15:05")
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT INDICATOR))
	   (BITMAP (GET.PARAMQ ITEM BITMAP INDICATOR)))
          (OR (BITMAPP BITMAP)
	      (SETQ BITMAP (FIND.BITMAP BITMAP)))
          (RETURN (create REGION
			  LEFT ←(fetch (POSITION XCOORD) of POS)
			  BOTTOM ←(fetch (POSITION YCOORD) of POS)
			  WIDTH ←(fetch (BITMAP BITMAPWIDTH) of BITMAP)
			  HEIGHT ←(fetch (BITMAP BITMAPHEIGHT) of BITMAP])

(SHOW.INDICATOR
  [LAMBDA (ITEM)                                             (* edited: "30-MAR-82 15:24")
    (SET.FIELDQ ITEM ON/OFF (QUOTE OFF)
		INDICATOR])

(DISPLAY.INDICATOR
  [LAMBDA (ITEM FRAME)                                       (* edited: "15-Aug-84 14:13")
                                                             (* DAHJr "10-MAR-83 12:55")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT INDICATOR))
	   (BITMAP (GET.PARAMQ ITEM BITMAP))
	   (CONDITION.OPERATION (GET.PARAMQ ITEM CONDITION.OPERATION))
	   (REFERENCE.VALUE (GET.PARAMQ ITEM REFERENCE.VALUE))
	   (CURRENT.VALUE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL)))
	   (ON-COLOR (GET.PARAMQ ITEM ON-COLOR))
	   (OFF-COLOR (GET.PARAMQ ITEM OFF-COLOR))
	   T1 T2)
          (OR (BITMAPP BITMAP)
	      (SETQ BITMAP (FIND.BITMAP BITMAP)))
          [SETQ T1 (COND
	      ((EQ CONDITION.OPERATION (QUOTE NOT.EQUAL))
		(NOT (EQP CURRENT.VALUE REFERENCE.VALUE)))
	      (T (APPLY (SELECTQ CONDITION.OPERATION
				 (= (QUOTE EQP))
				 (< (QUOTE LESSP))
				 (> (QUOTE GREATERP))
				 (<= (QUOTE LEQ))
				 (>= (QUOTE GEQ))
				 (TRILLIUM.REPORT.ERROR (REPORT.TRILLIUM.ERROR 
							      "Unrecoginized CONDITION.OPERATION"
									       CONDITION.OPERATION 
									       ITEM 
									     "Displaying an item")))
			(LIST CURRENT.VALUE REFERENCE.VALUE]
          (SETQ T2 (EQ (GET.FIELDQ ITEM ON/OFF)
		       (QUOTE ON)))
          (COND
	    [(AND T1 (NOT T2))                               (* TURN IT ON)
	      (SET.FIELDQ ITEM ON/OFF (QUOTE ON))
	      (COND
		((AND (EQ ON-COLOR (QUOTE BLACK))
		      (EQ OFF-COLOR (QUOTE WHITE)))          (* FLIP IT)
		  (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT)
				       (QUOTE INVERT)
				       NIL
				       (QUOTE BLACK)
				       (QUOTE WHITE)))
		(T                                           (* SET IT ON)
		   (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT)
					(QUOTE PAINT)
					NIL ON-COLOR (QUOTE CLEAR]
	    ((AND T2 (NOT T1))                               (* TURN IT OFF)
	      (SET.FIELDQ ITEM ON/OFF (QUOTE OFF))
	      (COND
		((AND (EQ ON-COLOR (QUOTE BLACK))
		      (EQ OFF-COLOR (QUOTE WHITE)))          (* FLIP IT)
		  (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT)
				       (QUOTE INVERT)
				       NIL
				       (QUOTE BLACK)
				       (QUOTE WHITE)))
		(T                                           (* SET IT OFF)
		   (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT)
					(QUOTE PAINT)
					NIL OFF-COLOR (QUOTE CLEAR])

(RESET.INDICATOR
  [LAMBDA (ITEM)                                             (* edited: "22-MAR-83 19:24")
    (SET.FIELDQ ITEM ON/OFF NIL INDICATOR])
)
(READ.ITEMTYPE INHIBITOR 5)
(\TYPE ITEM.TYPE NAME INHIBITOR COMMENT  "Means for inhibiting the changing of a cell's value" KIND 
INHIBITOR PARAMETERS  ((\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  "Un-named inhibitor" 
COMMENT  "The item's name")  (\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) 
COMMENT  "A place on the screen so that it can be referenced" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER
 NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell which triggers this implication")  (\TYPE 
PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by an IMPLICATION") COMMENT  "The action to be taken")) OTHER  (FNS  ((
BOUNDING.BOX BOUNDING.BOX.INHIBITOR)  (INHIBIT INHIBIT.INHIBITOR))) CLASSES  (INHIBITOR))
(DEFINEQ

(BOUNDING.BOX.INHIBITOR
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:19")
                                                             (* DAHJr " 5-DEC-83 21:11")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT INHIBITOR)))
          (RETURN (BOUNDING.BOX.FOR.SEGMENTS (fetch (POSITION XCOORD) of POSITION)
					     (fetch (POSITION YCOORD) of POSITION)
					     1 1])

(INHIBIT.INHIBITOR
  [LAMBDA (INHIBITOR OLD.VALUE NEW.VALUE DONT.TRACE)         (* HaKo "17-Aug-84 13:45")
                                                             (* edited: "25-MAY-82 16:49")
    (DECLARE (GLOBALVARS TRILLIUM.TRACE))
    (PROG (RESULT (ACTION (GET.PARAMQ INHIBITOR ACTION.FORM INHIBITOR)))
          (AND TRILLIUM.TRACE (NOT DONT.TRACE)
	       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE T "Activate inhibitor: " ACTION))
          (SETQ RESULT (TRILLIUM.EVAL ACTION))
          [AND TRILLIUM.TRACE (NOT DONT.TRACE)
	       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE "; result: " (COND
				    (RESULT "inhibit")
				    (T "OK"]
          (RETURN RESULT])
)
(READ.ITEMTYPE INIT.CELL 5)
(\TYPE ITEM.TYPE NAME INIT.CELL COMMENT  "An action to be done on entering the frame" KIND 
INITIALIZATION PARAMETERS  ((\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  
"Un-named initialization" COMMENT  "The item's name")  (\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION
) DEFAULT  (170 . 170) COMMENT  "A position on the screen for reference" GRID.TYPE  (LOCATION))  (
\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell to be initialized")  (\TYPE 
PARAMETER NAME VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "The initial value")) OTHER  (FNS  ((
BOUNDING.BOX BOUNDING.BOX.INIT.CELL)  (INITIALIZE INITIALIZE.INIT.CELL))) CLASSES  (INITIALIZATION))
(DEFINEQ

(BOUNDING.BOX.INIT.CELL
  [LAMBDA (ITEM)                                             (* edited: " 6-May-84 14:34")
    (BOUNDING.BOX.INITIALIZATION ITEM])

(INITIALIZE.INIT.CELL
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:22")
                                                             (* DAHJr "10-OCT-83 10:43")
    (SET.CURRENT.VALUE (GET.PARAMQ ITEM CELL)
		       (GET.PARAMQ ITEM VALUE])
)
(READ.ITEMTYPE INITIALIZATION 5)
(\TYPE ITEM.TYPE NAME INITIALIZATION COMMENT  "An action to be done on entering the frame" KIND 
INITIALIZATION PARAMETERS  ((\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  
"Un-named initialization" COMMENT  "The item's name")  (\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION
) DEFAULT  (170 . 170) COMMENT  "A position on the screen for reference" GRID.TYPE  (LOCATION))  (
\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by an INITIALIZATION") COMMENT  "The initializing action")) OTHER  (FNS
  ((BOUNDING.BOX BOUNDING.BOX.INITIALIZATION)  (INITIALIZE INITIALIZE.INITIALIZATION))) CLASSES  (
INITIALIZATION))
(DEFINEQ

(BOUNDING.BOX.INITIALIZATION
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:23")
                                                             (* DAHJr " 5-DEC-83 21:10")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT INITIALIZATION)))
          (RETURN (BOUNDING.BOX.FOR.SEGMENTS (fetch (POSITION XCOORD) of POSITION)
					     (fetch (POSITION YCOORD) of POSITION)
					     1 1])

(INITIALIZE.INITIALIZATION
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:23")
                                                             (* edited: "26-MAY-82 17:22")
    (TRILLIUM.EVAL (GET.PARAMQ ITEM ACTION.FORM INITIALIZATION])
)
(READ.ITEMTYPE INVERTING.CASCADE 5)
(\TYPE ITEM.TYPE NAME INVERTING.CASCADE COMMENT  "A cascade which lights its indicators" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) COMMENT  
"Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BUTTONS TYPE  (LIST  (
STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  ((("LABEL 1") VALUE.1)  ((
"LABEL 2") VALUE2)) COMMENT  "The buttons themselves")  (\TYPE PARAMETER NAME BUTTON.PICTURE TYPE  (
BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")  (\TYPE PARAMETER 
NAME BUTTON/INDICATOR.SPACING TYPE  (INTEGER) DEFAULT 51 COMMENT  
"Spacing between button and bottom indicator")  (\TYPE PARAMETER NAME VERTICAL.SPACING TYPE  (INTEGER)
 DEFAULT 34 COMMENT  "Between buttons")  (\TYPE PARAMETER NAME TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR)
 DEFAULT  (17 . 17) COMMENT  "Offset for the text")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT  
(HELVETICA 10) COMMENT  "The font for the text")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (
ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  "Horizontal alignment of the text")  (\TYPE 
PARAMETER NAME VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT CENTER COMMENT  
"Vertical alignment of the text")  (\TYPE PARAMETER NAME CONTINUOUS? TYPE  (ONEOF  (YES NO)) DEFAULT 
NO COMMENT  "Whether or not to keep going if the button is held down")  (\TYPE PARAMETER NAME RATE 
TYPE  (INTEGER) DEFAULT 300 COMMENT  "Rate it changes (in milliseconds) if continuous")  (\TYPE 
PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The affected cell")  (\TYPE PARAMETER NAME 
INITIAL.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "An initial value for the cell")  (\TYPE 
PARAMETER NAME SHOW.INITIAL.VALUE? TYPE  (ONEOF  (YES NO)) DEFAULT YES COMMENT  
"Whether or not the default is visible - ala 1075")) SUBITEM.SPECS  ((ITEM CASCADE.BUTTON  (PLACEMENT 
PLACEMENT)  (BUTTONS BUTTONS)  (CELL CELL)  (PICTURE BUTTON.PICTURE)  (CONTINUOUS? CONTINUOUS?)  (RATE
 RATE)  (AT.LIMIT  (QUOTE WRAP.AROUND))  (DIRECTION  (QUOTE UP)))  (FOREACH  (BUTTON IN  (COND  ((EQ 
SHOW.INITIAL.VALUE?  (QUOTE YES)) BUTTONS)  (T  (for B in BUTTONS collect B when  (NOT  (EQUAL  (CADR 
B) INITIAL.VALUE))))))  (I FROM 0) DO  (ITEM INVERTING.CASCADE.LIGHT  (PLACEMENT  (PTRANSLATE 
PLACEMENT 0  (IPLUS  (ITIMES I VERTICAL.SPACING) BUTTON/INDICATOR.SPACING)))  (TEXT  (CAR BUTTON))  (
FONT FONT)  (TEXT.OFFSET TEXT.DISPLACEMENT)  (HORIZONTAL.ALIGNMENT HORIZONTAL.ALIGNMENT)  (
VERTICAL.ALIGNMENT VERTICAL.ALIGNMENT)  (CELL CELL)  (VALUE  (CADR BUTTON))))  (ITEM INITIALIZATION  (
PLACEMENT PLACEMENT)  (ACTION.FORM  (LIST  (QUOTE SET.CELL) CELL INITIAL.VALUE)))) OTHER  (FNS  ((1 
CONVERT.INVERTING.CASCADE.OFFSETS))) CLASSES  (COMPOSITE BUTTON) VERSION 1)
(DEFINEQ

(CONVERT.INVERTING.CASCADE.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 12:17")
    (PROG NIL
          (CONVERT.GRIDDED.OFFSET ITEM (QUOTE VERTICAL.SPACING))
          (CONVERT.GRIDDED.OFFSET ITEM (QUOTE BUTTON/INDICATOR.SPACING))
          (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(READ.ITEMTYPE INVERTING.CASCADE.LIGHT 5)
(\TYPE ITEM.TYPE NAME INVERTING.CASCADE.LIGHT COMMENT  "An indicator with associated text" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"A reference grid position" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME TEXT TYPE  (LIST  (STRING)) 
DEFAULT  (Label for Light) COMMENT  "The text associated with the light")  (\TYPE PARAMETER NAME FONT 
TYPE  (FONT) DEFAULT  (HELVETICA 10) COMMENT  "The font in which to print the information")  (\TYPE 
PARAMETER NAME TEXT.OFFSET TYPE  (OFFSET.VECTOR  (PLACEMENT)) DEFAULT  (51 . 17) COMMENT  
"The offset of the words form the lower left corner of the button")  (\TYPE PARAMETER NAME 
HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT  (QUOTE LEFT) COMMENT  
"Horizontal alignment of text about reference point")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT TYPE  
(ONEOF  (TOP CENTER BOTTOM)) DEFAULT  (QUOTE CENTER) COMMENT  
"Vertical alignment of text about the reference point")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) 
DEFAULT CELL.1 COMMENT  "The cell to affect and display")  (\TYPE PARAMETER NAME VALUE TYPE  (CONSTANT
) DEFAULT VALUE.1 COMMENT  "The value to be set and reflected")) SUBITEM.SPECS  ((LABEL WORDS  (ITEM 
BLOCK.OF.TEXT  (PLACEMENT  (PTRANSLATE PLACEMENT TEXT.OFFSET))  (LIST.OF.LINES TEXT)  (FONT FONT)  (
XALIGNMENT HORIZONTAL.ALIGNMENT)  (YALIGNMENT VERTICAL.ALIGNMENT)))  (ITEM LIGHT  (PLACEMENT  (
BOUNDING.BOX WORDS))  (CELL CELL)  (REFERENCE.VALUE VALUE))) OTHER  (FNS  ((1 
CONVERT.INVERTING.CASCADE.LIGHT.OFFSETS))) CLASSES  (COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.INVERTING.CASCADE.LIGHT.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 10:07")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.OFFSET VERTICAL.OFFSET TEXT.OFFSET])
)
(READ.ITEMTYPE INVERTING.SENSITIVE.REGION 5)
(\TYPE ITEM.TYPE NAME INVERTING.SENSITIVE.REGION COMMENT  
"A sensor, which goes inverts on depression, takes action, and waits for release" KIND SENSOR 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 30 30) COMMENT  
"An area sensitive to touch")  (\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by an INVERTING.SENSITIVE.REGION") COMMENT  
"The action to be taken as the sensitive region is touched")) OTHER  (FNS  ((SENSE 
SENSE.INVERTING.SENSITIVE.REGION))) CLASSES  (SENSOR))
(DEFINEQ

(SENSE.INVERTING.SENSITIVE.REGION
  [LAMBDA (ITEM TOUCH XCOORD YCOORD)                         (* HaKo " 7-Aug-84 16:41")
                                                             (* edited: "31-MAR-82 10:21")
    (COND
      (TOUCH (PROG (BOX ACTION (REGION (GET.PARAMQ ITEM PLACEMENT INVERTING.SENSITIVE.REGION)))
	           (COND
		     ((INSIDEP REGION XCOORD YCOORD)
		       (BEGIN.EVENT ITEM)
		       (SETQ BOX (BIGGER.BOX REGION))
		       (SETQ ACTION (GET.PARAMQ ITEM ACTION.FORM INVERTING.SENSITIVE.REGION))
		       (FLIP.BOX BOX)
		       (TRILLIUM.EVAL ACTION)
		       (WAITNOBUG)
		       (END.EVENT)
		       (RETURN T])
)
(READ.ITEMTYPE LIGHT 5)
(\TYPE ITEM.TYPE NAME LIGHT COMMENT  "A light: black when value of cell is the reference.value" KIND 
DISPLAYER PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 30 30) COMMENT
  "The region which will be black when the light is on")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) 
DEFAULT CELL.1 COMMENT  "The cell whose value the light displays")  (\TYPE PARAMETER NAME 
REFERENCE.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "The value to compare with the cell's value"
)) OTHER  (FNS  ((SHOW SHOW.LIGHT)  (DISPLAY DISPLAY.LIGHT))) CLASSES  (DISPLAYER))
(DEFINEQ

(SHOW.LIGHT
  [LAMBDA (ITEM)                                             (* edited: "30-MAR-82 15:24")
    (SET.FIELDQ ITEM ON/OFF (QUOTE OFF)
		INDICATOR])

(DISPLAY.LIGHT
  [LAMBDA (ITEM FRAME)                                       (* HaKo " 6-Aug-84 14:28")
                                                             (* edited: "15-JUN-82 12:45")
    (PROG ((REGION (GET.PARAMQ ITEM PLACEMENT LIGHT))
	   (REFERENCE.VALUE (GET.PARAMQ ITEM REFERENCE.VALUE LIGHT))
	   (CURRENT.VALUE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL LIGHT)))
	   T1 T2)
          (SETQ T1 (EQUAL REFERENCE.VALUE CURRENT.VALUE))
          (SETQ T2 (EQ (GET.FIELDQ ITEM ON/OFF)
		       (QUOTE ON)))
          (COND
	    ((OR (AND T1 (NOT T2))
		 (AND (NOT T1)
		      T2))
	      [SET.FIELDQ ITEM ON/OFF (COND
			    (T2 (QUOTE OFF))
			    (T (QUOTE ON]
	      (FLIP.BOX (BIGGER.BOX (BOUNDING.BOX ITEM])
)
(READ.ITEMTYPE LIGHT.BAR 5)
(\TYPE ITEM.TYPE NAME LIGHT.BAR COMMENT  "A bar of gray which varies in length on the value of a cell"
 KIND DISPLAYER PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 30 30) 
COMMENT  "The region which the bar fills")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 
COMMENT  "The cell whose value the light/bar indicates")  (\TYPE PARAMETER NAME MINIMUM.VALUE TYPE  (
INTEGER) DEFAULT 1 COMMENT  "The minimum value to be indicated")  (\TYPE PARAMETER NAME MAXIMUM.VALUE 
TYPE  (INTEGER) DEFAULT 10 COMMENT  "The maximum value to be indicated")  (\TYPE PARAMETER NAME 
DIRECTION TYPE  (ONEOF  (LEFT RIGHT BOTTOM TOP)) DEFAULT LEFT COMMENT  
"The side of the rectangle corresponding to the minimum value")  (\TYPE PARAMETER NAME SOURCE TYPE  (
ONEOF  (INPUT INVERT MERGE TEXTURE)) DEFAULT INPUT COMMENT  "Source for BITBLT")  (\TYPE PARAMETER 
NAME OPERATION TYPE  (ONEOF  (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  
"Operation for BITBLT")  (\TYPE PARAMETER NAME TEXTURE TYPE  (SHADE) DEFAULT 65535 COMMENT  
"Texture for BITBLT")) OTHER  (FNS  ((SHOW SHOW.LIGHT.BAR)  (DISPLAY DISPLAY.LIGHT.BAR))) CLASSES  (
DISPLAYER))
(DEFINEQ

(SHOW.LIGHT.BAR
  [LAMBDA (ITEM)                                             (* edited: "14-MAY-82 11:44")
    NIL])

(DISPLAY.LIGHT.BAR
  [LAMBDA (ITEM FRAME)                                       (* HaKo " 6-Aug-84 14:33")
                                                             (* DAHJr "10-Apr-84 19:49")
    (DECLARE (GLOBALVARS CURRENT.DSP WHITESHADE))
    (PROG ((REGION (GET.PARAMQ ITEM PLACEMENT LIGHT.BAR))
	   (CURRENT.VALUE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL LIGHT.BAR)))
	   (MAX (GET.PARAMQ ITEM MAXIMUM.VALUE LIGHT.BAR))
	   (MIN (GET.PARAMQ ITEM MINIMUM.VALUE LIGHT.BAR))
	   (DIRECTION (GET.PARAMQ ITEM DIRECTION LIGHT.BAR))
	   (OPERATION (GET.PARAMQ ITEM OPERATION LIGHT.BAR))
	   (TEXTURE (GET.PARAMQ ITEM TEXTURE LIGHT.BAR))
	   LENGTH)
          (COND
	    ((NUMBERP CURRENT.VALUE))
	    (T (TROUBLE.WITH.TRILLIUM "Non-numeric value" CURRENT.VALUE)))
          (SETQ CURRENT.VALUE (MIN MAX (MAX MIN CURRENT.VALUE)))
          (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION)
		  (fetch (REGION BOTTOM) of REGION)
		  (fetch (REGION WIDTH) of REGION)
		  (fetch (REGION HEIGHT) of REGION)
		  (QUOTE TEXTURE)
		  (QUOTE REPLACE)
		  WHITESHADE)
          (SELECTQ DIRECTION
		   (LEFT (SETQ LENGTH (IQUOTIENT (ITIMES (fetch (REGION WIDTH) of REGION)
							 (IDIFFERENCE CURRENT.VALUE MIN))
						 (IDIFFERENCE MAX MIN)))
			 (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION)
				 (fetch (REGION BOTTOM) of REGION)
				 LENGTH
				 (fetch (REGION HEIGHT) of REGION)
				 (QUOTE TEXTURE)
				 OPERATION TEXTURE))
		   (RIGHT (SETQ LENGTH (IQUOTIENT (ITIMES (fetch (REGION WIDTH) of REGION)
							  (IDIFFERENCE CURRENT.VALUE MIN))
						  (IDIFFERENCE MAX MIN)))
			  (BITBLT NIL 0 0 CURRENT.DSP (ADD1 (IDIFFERENCE (fetch (REGION RIGHT)
									    of REGION)
									 LENGTH))
				  (fetch (REGION BOTTOM) of REGION)
				  LENGTH
				  (fetch (REGION HEIGHT) of REGION)
				  (QUOTE TEXTURE)
				  OPERATION TEXTURE))
		   (BOTTOM (SETQ LENGTH (IQUOTIENT (ITIMES (fetch (REGION HEIGHT) of REGION)
							   (IDIFFERENCE CURRENT.VALUE MIN))
						   (IDIFFERENCE MAX MIN)))
			   (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION)
				   (fetch (REGION BOTTOM) of REGION)
				   (fetch (REGION WIDTH) of REGION)
				   LENGTH
				   (QUOTE TEXTURE)
				   OPERATION TEXTURE))
		   (TOP (SETQ LENGTH (IQUOTIENT (ITIMES (fetch (REGION HEIGHT) of REGION)
							(IDIFFERENCE CURRENT.VALUE MIN))
						(IDIFFERENCE MAX MIN)))
			(BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION)
				(ADD1 (IDIFFERENCE (fetch (REGION TOP) of REGION)
						   LENGTH))
				(fetch (REGION WIDTH) of REGION)
				LENGTH
				(QUOTE TEXTURE)
				OPERATION TEXTURE))
		   (TROUBLE.WITH.TRILLIUM "Unrecognized DIRECTION" DIRECTION])
)
(READ.ITEMTYPE LINE.OF.TEXT 5)
(\TYPE ITEM.TYPE NAME LINE.OF.TEXT COMMENT  "A located line of text" KIND COMPOSITE PARAMETERS  ((
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The left baseline of the first character of the line")  (\TYPE PARAMETER NAME LINE TYPE  (STRING) 
DEFAULT  "The text of a LINE.OF.TEXT" COMMENT  "The line of text itself")  (\TYPE PARAMETER NAME 
XALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT LEFT COMMENT  "Horizontal alignment")  (\TYPE 
PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (GACHA 10) COMMENT  "The font the line is to be printed in")
  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (INPUT INVERT MERGE TEXTURE)) DEFAULT INPUT COMMENT  
"Source for BITBLT")  (\TYPE PARAMETER NAME OPERATION TYPE  (ONEOF  (REPLACE PAINT INVERT ERASE)) 
DEFAULT REPLACE COMMENT  "Operation for BITBLT")  (\TYPE PARAMETER NAME TEXTURE TYPE  (SHADE) DEFAULT 
65535 COMMENT  "Texture for BITBLT")  (\TYPE PARAMETER NAME FIGURE-COLOR TYPE  (COLOR.NAME) DEFAULT 
BLACK COMMENT  "The color corresponding to the figure")  (\TYPE PARAMETER NAME GROUND-COLOR TYPE  (
COLOR.NAME) DEFAULT WHITE COMMENT  "The color corresponding to ground")) SUBITEM.SPECS  ((EVAL  (
ANALYZE.LINE.OF.TEXT)  (PICTURE))) OTHER  (FNS  ((ANALYZE ANALYZE.LINE.OF.TEXT))) CLASSES  (COMPOSITE)
)
(DEFINEQ

(ANALYZE.LINE.OF.TEXT
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 15:19")
                                                             (* DAHJr "13-JAN-83 09:11")
    (PROG ((XCOORD (fetch (POSITION XCOORD) of PLACEMENT))
	   (YCOORD (fetch (POSITION YCOORD) of PLACEMENT))
	   (FONT.DESCRIPTOR (FIND.FONT FONT))
	   HEIGHT WIDTH DESCENT BITMAP DISPLAY.STREAM TX)
          (SETQ HEIGHT (FONTPROP FONT.DESCRIPTOR (QUOTE HEIGHT)))
          (SETQ WIDTH (STRINGWIDTH LINE FONT.DESCRIPTOR))
          (SETQ DESCENT (FONTPROP FONT.DESCRIPTOR (QUOTE DESCENT)))
          (SETQ BITMAP (BITMAPCREATE WIDTH HEIGHT))
          [SETQ DISPLAY.STREAM (OR ANALYZE.LOT.DSP (SETQ ANALYZE.LOT.DSP (DSPCREATE]
          (DSPDESTINATION BITMAP DISPLAY.STREAM)
          (DSPFONT FONT.DESCRIPTOR DISPLAY.STREAM)
          (DSPXPOSITION 0 DISPLAY.STREAM)
          (DSPYPOSITION DESCENT DISPLAY.STREAM)
          (PRIN1 LINE DISPLAY.STREAM)
          (SETQ TX (SELECTQ XALIGNMENT
			    (LEFT XCOORD)
			    (CENTER (IDIFFERENCE XCOORD (IQUOTIENT WIDTH 2)))
			    (RIGHT (IDIFFERENCE XCOORD WIDTH))
			    (SHOULDNT "Unrecognized keyword in ANALYZE.LINE.OF.TEXT")))
          (RETURN (LIST (ITEM.CREATE PICTURE (PLACEMENT (create POSITION
								XCOORD ← TX
								YCOORD ←(IDIFFERENCE YCOORD DESCENT)))
				     (BITMAP BITMAP)
				     (SOURCE SOURCE)
				     (OPERATION OPERATION)
				     (TEXTURE TEXTURE)
				     (FIGURE-COLOR FIGURE-COLOR)
				     (GROUND-COLOR GROUND-COLOR])
)
(READ.ITEMTYPE NUMBER.BUTTON 5)
(\TYPE ITEM.TYPE NAME NUMBER.BUTTON COMMENT  
"A small button, with a label on it, which flashes when pushed, and does internal action" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME LABEL TYPE  (STRING) DEFAULT 1 COMMENT  "The words above this button")  (\TYPE PARAMETER NAME 
FONT TYPE  (FONT) DEFAULT NIL COMMENT  "The font for the button label")  (\TYPE PARAMETER NAME CELL 
TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell affected by this button")  (\TYPE PARAMETER NAME DIGIT 
TYPE  (INTEGER) DEFAULT 1 COMMENT  "The digit added to the number in the cell")  (\TYPE PARAMETER NAME
 PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")) 
SUBITEM.SPECS  ((LABEL BUTTON  (ITEM PICTURE  (PLACEMENT  (PTRANSLATE PLACEMENT  (MINUS 
BUTTON.BITMAP.EXTRA) 0))  (BITMAP PICTURE)))  (ITEM LINE.OF.TEXT  (PLACEMENT  (PICTURE.CENTER BUTTON))
  (LINE LABEL)  (XALIGNMENT  (QUOTE CENTER))  (FONT FONT))  (ITEM FLASHING.SENSITIVE.REGION  (
PLACEMENT  (BOUNDING.BOX BUTTON))  (ACTION.FORM  (LIST  (QUOTE CHANGE.CELL) CELL  (KWOTE DIGIT))))) 
CLASSES  (BUTTON COMPOSITE)  (QUOTE CLASSES)  (BUTTON))
(READ.ITEMTYPE NUMBER.BUTTON.NEXT.DIGIT 5)
(\TYPE ITEM.TYPE NAME NUMBER.BUTTON.NEXT.DIGIT COMMENT  
"A small button, with a label on it, which flashes when pushed, and does internal action" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"The grid position of the lower left corner of the button" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER 
NAME LABEL TYPE  (STRING) DEFAULT 1 COMMENT  "The words above this button")  (\TYPE PARAMETER NAME 
FONT TYPE  (FONT) DEFAULT NIL COMMENT  "The font for the label")  (\TYPE PARAMETER NAME CELL TYPE  (
CELL) DEFAULT CELL.1 COMMENT  "The cell affected by this button")  (\TYPE PARAMETER NAME DIGIT TYPE  (
INTEGER) DEFAULT 1 COMMENT  "The digit added to the number in the cell")  (\TYPE PARAMETER NAME 
PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")) 
SUBITEM.SPECS  ((LABEL BUTTON  (ITEM PICTURE  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION  (MINUS
 BUTTON.BITMAP.EXTRA) 0)))  (BITMAP PICTURE)))  (ITEM LINE.OF.TEXT  (PLACEMENT  (PICTURE.CENTER BUTTON
))  (LINE LABEL)  (XALIGNMENT  (QUOTE CENTER))  (FONT FONT))  (ITEM FLASHING.SENSITIVE.REGION  (
PLACEMENT  (BOUNDING.BOX BUTTON))  (ACTION.FORM  (LIST  (QUOTE NEXT.DIGIT.CELL) CELL  (KWOTE DIGIT))))
) CLASSES  (BUTTON COMPOSITE)  (QUOTE CLASSES)  (BUTTON))
(READ.ITEMTYPE NUMBER.PAD 5)
(\TYPE ITEM.TYPE NAME NUMBER.PAD COMMENT  "A classic Xerox number pad, putting its value in a cell" 
KIND COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) 
COMMENT  "The lower left corner of the number pad" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME CELL 
TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell affected by pushing the pad's buttons")  (\TYPE 
PARAMETER NAME INITIAL.VALUE TYPE  (INTEGER) DEFAULT 1 COMMENT  
"How to initialize the cell when entering the frame")  (\TYPE PARAMETER NAME PICTURE TYPE  (
BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")  (\TYPE PARAMETER 
NAME FONT TYPE  (FONT) DEFAULT  (GACHA 10) COMMENT  "The font for the button labels")  (\TYPE 
PARAMETER NAME BORDER.THICKNESS TYPE  (INTEGER) DEFAULT 2 COMMENT  
"The thickness in screen points of the border")  (\TYPE PARAMETER NAME BORDER.COLOR TYPE  (SHADE) 
DEFAULT 65535 COMMENT  "The color of the border")  (\TYPE PARAMETER NAME PRINT.FONT TYPE  (FONT) 
DEFAULT  (HELVETICA 10) COMMENT  "The font of the print region")  (\TYPE PARAMETER NAME PRINT.MARGIN 
TYPE  (INTEGER) DEFAULT 2 COMMENT  "The margin of the printing region")  (\TYPE PARAMETER NAME 
PRINT.BACKGROUND TYPE  (SHADE) DEFAULT 0 COMMENT  "The background of the printing region")  (\TYPE 
PARAMETER NAME PRINT.SOURCE TYPE  (ONEOF  (INPUT INVERT MERGE TEXTURE)) DEFAULT INPUT COMMENT  
"How the texture is combined with the print")  (\TYPE PARAMETER NAME PRINT.OPERATION TYPE  (ONEOF  (
REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  "How the print is combined with the background")
) SUBITEM.SPECS  ((ITEM VALUE.BAR  (PLACEMENT  (NEW.REGION  (PTRANSLATE PLACEMENT 0 204) 136 34))  (
CELL CELL)  (XALIGNMENT  (QUOTE CENTER))  (YALIGNMENT  (QUOTE CENTER))  (FONT PRINT.FONT)  (
BORDER.THICKNESS BORDER.THICKNESS)  (BORDER.COLOR BORDER.COLOR)  (PRINT.MARGIN PRINT.MARGIN)  (
PRINT.BACKGROUND PRINT.BACKGROUND)  (PRINT.SOURCE PRINT.SOURCE)  (PRINT.OPERATION PRINT.OPERATION))  (
ITEM INITIALIZATION  (PLACEMENT PLACEMENT)  (ACTION.FORM  (LIST  (QUOTE SET.CELL) CELL  (KWOTE 
INITIAL.VALUE))))  (ITEM NUMBER.BUTTON.NEXT.DIGIT  (LABEL 1)  (PLACEMENT  (TRANSLATE PLACEMENT 0 9))  
(CELL CELL)  (DIGIT 1)  (PICTURE PICTURE)  (FONT FONT))  (ITEM NUMBER.BUTTON.NEXT.DIGIT  (LABEL 2)  (
PLACEMENT  (TRANSLATE PLACEMENT 3 9))  (CELL CELL)  (DIGIT 2)  (PICTURE PICTURE)  (FONT FONT))  (ITEM 
NUMBER.BUTTON.NEXT.DIGIT  (LABEL 3)  (PLACEMENT  (TRANSLATE PLACEMENT 6 9))  (CELL CELL)  (DIGIT 3)  (
PICTURE PICTURE)  (FONT FONT))  (ITEM NUMBER.BUTTON.NEXT.DIGIT  (LABEL 4)  (PLACEMENT  (TRANSLATE 
PLACEMENT 0 6))  (CELL CELL)  (DIGIT 4)  (PICTURE PICTURE)  (FONT FONT))  (ITEM 
NUMBER.BUTTON.NEXT.DIGIT  (LABEL 5)  (PLACEMENT  (TRANSLATE PLACEMENT 3 6))  (CELL CELL)  (DIGIT 5)  (
PICTURE PICTURE)  (FONT FONT))  (ITEM NUMBER.BUTTON.NEXT.DIGIT  (LABEL 6)  (PLACEMENT  (TRANSLATE 
PLACEMENT 6 6))  (CELL CELL)  (DIGIT 6)  (PICTURE PICTURE)  (FONT FONT))  (ITEM 
NUMBER.BUTTON.NEXT.DIGIT  (LABEL 7)  (PLACEMENT  (TRANSLATE PLACEMENT 0 3))  (CELL CELL)  (DIGIT 7)  (
PICTURE PICTURE)  (FONT FONT))  (ITEM NUMBER.BUTTON.NEXT.DIGIT  (LABEL 8)  (PLACEMENT  (TRANSLATE 
PLACEMENT 3 3))  (CELL CELL)  (DIGIT 8)  (PICTURE PICTURE)  (FONT FONT))  (ITEM 
NUMBER.BUTTON.NEXT.DIGIT  (LABEL 9)  (PLACEMENT  (TRANSLATE PLACEMENT 6 3))  (CELL CELL)  (DIGIT 9)  (
PICTURE PICTURE)  (FONT FONT))  (ITEM GENERAL.BUTTON  (TEXT  (QUOTE  ("")))  (PLACEMENT PLACEMENT)  (
ACTION  (LIST  (QUOTE ACTION.DONOTHING)))  (PICTURE PICTURE)  (FONT FONT))  (ITEM 
NUMBER.BUTTON.NEXT.DIGIT  (LABEL 0)  (PLACEMENT  (TRANSLATE PLACEMENT 3 0))  (CELL CELL)  (DIGIT 0)  (
PICTURE PICTURE)  (FONT FONT))  (ITEM NUMBER.BUTTON  (LABEL  "C")  (PLACEMENT  (TRANSLATE PLACEMENT 6 
0))  (CELL CELL)  (DIGIT 0)  (PICTURE PICTURE)  (FONT FONT))) CLASSES  (BUTTON COMPOSITE)  (QUOTE 
CLASSES)  (BUTTON))
(READ.ITEMTYPE NUMERIC.CHECKER 5)
(\TYPE ITEM.TYPE NAME NUMERIC.CHECKER COMMENT  "A numeric inhibitor" KIND INHIBITOR PARAMETERS  ((
\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  "Un-named inhibitor" COMMENT  "The item's name")  
(\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"A place on the screen so that it can be referenced" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME 
CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell which triggers this implication")  (\TYPE 
PARAMETER NAME CONDITION TYPE  (ONEOF  (EQUAL NOT.EQUAL GREATER.THAN GREATER.THAN.OR.EQUAL LESS.THAN 
LESS.THAN.OR.EQUAL)) DEFAULT EQUAL COMMENT  "The condition under which to inhibit")  (\TYPE PARAMETER 
NAME REFERENCE.VALUE TYPE  (CONSTANT) DEFAULT 0 COMMENT  "The value against which to compare")  (\TYPE
 PARAMETER NAME INHIBIT.ACTION TYPE  (FORM) DEFAULT NIL COMMENT  
"A form to EVAL if the inhibitor fires")) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.NUMERIC.CHECKER)  (
INHIBIT INHIBIT.NUMERIC.CHECKER))) CLASSES  (INHIBITOR))
(DEFINEQ

(BOUNDING.BOX.NUMERIC.CHECKER
  [LAMBDA (ITEM)                                             (* edited: " 6-May-84 14:33")
    (BOUNDING.BOX.INHIBITOR ITEM])

(INHIBIT.NUMERIC.CHECKER
  [LAMBDA (INHIBITOR OLD.VALUE NEW.VALUE DONT.TRACE)         (* HaKo "17-Aug-84 13:45")
                                                             (* DAHJr "10-OCT-83 11:58")
    (DECLARE (GLOBALVARS TRILLIUM.TRACE))
    (PROG ((CELL (GET.PARAMQ INHIBITOR CELL NUMERIC.CHECKER))
	   (CONDITION (GET.PARAMQ INHIBITOR CONDITION NUMERIC.CHECKER))
	   (REFERENCE.VALUE (GET.PARAMQ INHIBITOR REFERENCE.VALUE NUMERIC.CHECKER))
	   (INHIBIT.ACTION (GET.PARAMQ INHIBITOR INHIBIT.ACTION NUMERIC.CHECKER))
	   RESULT)
          (SETQ RESULT (SELECTQ CONDITION
				(EQUAL (EQP NEW.VALUE REFERENCE.VALUE))
				(NOT.EQUAL (NOT (EQP NEW.VALUE REFERENCE.VALUE)))
				(GREATER.THAN (GREATERP NEW.VALUE REFERENCE.VALUE))
				(GREATER.THAN.OR.EQUAL (NOT (LESSP NEW.VALUE REFERENCE.VALUE)))
				(LESS.THAN (LESSP NEW.VALUE REFERENCE.VALUE))
				(LESS.THAN.OR.EQUAL (NOT (GREATERP NEW.VALUE REFERENCE.VALUE)))
				(SHOULDNT)))
          [AND TRILLIUM.TRACE (NOT DONT.TRACE)
	       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE T "Test if " CELL " is " CONDITION " to " 
				  REFERENCE.VALUE "; result: " (COND
				    (RESULT "inhibit")
				    (T "OK"]
          (COND
	    (RESULT (TRILLIUM.EVAL INHIBIT.ACTION " EVALing an INHIBIT.ACTION on a NUMERIC.CHECKER")))
          (RETURN RESULT])
)
(READ.ITEMTYPE PICTURE 5)
(\TYPE ITEM.TYPE NAME PICTURE COMMENT  "A bitmap to be added to the screen as artwork" KIND ARTWORK 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The lower left corner of the bitmap")  (\TYPE PARAMETER NAME BITMAP TYPE  (BITMAP.NAME) DEFAULT 
EXAMPLE.BITMAP COMMENT  "The bits")  (\TYPE PARAMETER NAME SOURCE TYPE  (ONEOF  (INPUT INVERT MERGE 
TEXTURE)) DEFAULT INPUT COMMENT  "Source for BITBLT")  (\TYPE PARAMETER NAME OPERATION TYPE  (ONEOF  (
REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  "Operation for BITBLT")  (\TYPE PARAMETER NAME 
TEXTURE TYPE  (SHADE) DEFAULT 65535 COMMENT  "Texture for BITBLT")  (\TYPE PARAMETER NAME FIGURE-COLOR
 TYPE  (COLOR.NAME) DEFAULT BLACK COMMENT  "The color corresponding to the figure")  (\TYPE PARAMETER 
NAME GROUND-COLOR TYPE  (COLOR.NAME) DEFAULT WHITE COMMENT  "The color corresponding to ground")) 
OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.PICTURE)  (SHOW SHOW.PICTURE))) CLASSES  (ARTWORK))
(DEFINEQ

(BOUNDING.BOX.PICTURE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:42")
                                                             (* DAHJr " 9-MAR-82 11:12")
    (PROG ((POS (GET.PARAMQ ITEM PLACEMENT PICTURE))
	   (BITMAP (GET.PARAMQ ITEM BITMAP PICTURE)))
          (OR (BITMAPP BITMAP)
	      (SETQ BITMAP (FIND.BITMAP BITMAP)))
          (RETURN (create REGION
			  LEFT ←(fetch (POSITION XCOORD) of POS)
			  BOTTOM ←(fetch (POSITION YCOORD) of POS)
			  WIDTH ←(fetch (BITMAP BITMAPWIDTH) of BITMAP)
			  HEIGHT ←(fetch (BITMAP BITMAPHEIGHT) of BITMAP])

(SHOW.PICTURE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 14:44")
                                                             (* DAHJr " 5-JAN-84 19:33")
    (PROG ((POSITION (GET.PARAMQ ITEM PLACEMENT PICTURE))
	   (BITMAP (GET.PARAMQ ITEM BITMAP PICTURE))
	   (SOURCE (GET.PARAMQ ITEM SOURCE PICTURE))
	   (OPERATION (GET.PARAMQ ITEM OPERATION PICTURE))
	   (TEXTURE (GET.PARAMQ ITEM TEXTURE PICTURE))
	   (FIGURE-COLOR (GET.PARAMQ ITEM FIGURE-COLOR PICTURE))
	   (GROUND-COLOR (GET.PARAMQ ITEM GROUND-COLOR PICTURE)))
          (OR (BITMAPP BITMAP)
	      (SETQ BITMAP (FIND.BITMAP BITMAP)))
          (SHOW.COLORED.BITMAP BITMAP (fetch (POSITION XCOORD) of POSITION)
			       (fetch (POSITION YCOORD) of POSITION)
			       SOURCE OPERATION TEXTURE FIGURE-COLOR GROUND-COLOR])
)
(READ.ITEMTYPE PRINT.REGION 5)
(\TYPE ITEM.TYPE NAME PRINT.REGION COMMENT  "A region through which to view a cell" KIND DISPLAYER 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (10 10 80 20) COMMENT  
"The boundaries of the viewing area")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT 
 "The cell to be printed")  (\TYPE PARAMETER NAME XALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) 
DEFAULT CENTER COMMENT  "Horizontal alignment")  (\TYPE PARAMETER NAME YALIGNMENT TYPE  (ONEOF  (TOP 
CENTER BOTTOM)) DEFAULT CENTER COMMENT  "Vertical alignment")  (\TYPE PARAMETER NAME FONT TYPE  (FONT)
 DEFAULT NIL COMMENT  "The font to print the value in")  (\TYPE PARAMETER NAME MARGIN TYPE  (INTEGER) 
DEFAULT 2 COMMENT  "The thickness of a margin in the region")  (\TYPE PARAMETER NAME BACKGROUND TYPE  
(SHADE) DEFAULT 42405 COMMENT  "The shade of a fresh print region")  (\TYPE PARAMETER NAME SOURCE TYPE
  (ONEOF  (INPUT INVERT)) DEFAULT INPUT COMMENT  "How the print is combined with the texture")  (\TYPE
 PARAMETER NAME OPERATION TYPE  (ONEOF  (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  
"How the print is combined with the
background")) OTHER  (FNS  ((SHOW SHOW.PRINT.REGION)  (DISPLAY DISPLAY.PRINT.REGION))) CLASSES  (
DISPLAYER))
(DEFINEQ

(SHOW.PRINT.REGION
  [LAMBDA (ITEM)                                             (* rao: "22-JUN-82 15:30")
    NIL])

(DISPLAY.PRINT.REGION
  [LAMBDA (ITEM)                                             (* PH "27-Aug-84 15:05")
                                                             (* DAHJr " 7-OCT-83 11:25")
    (DECLARE (GLOBALVARS ANALYZE.LOT.DSP CURRENT.DSP))
    (PROG ((CELL (GET.PARAMQ ITEM CELL PRINT.REGION))
	   (REGION (GET.PARAMQ ITEM PLACEMENT PRINT.REGION))
	   (X.ALIGNMENT (GET.PARAMQ ITEM XALIGNMENT PRINT.REGION))
	   (Y.ALIGNMENT (GET.PARAMQ ITEM YALIGNMENT PRINT.REGION))
	   (SOURCE (GET.PARAMQ ITEM SOURCE PRINT.REGION))
	   (OPERATION (GET.PARAMQ ITEM OPERATION PRINT.REGION))
	   (TEXTURE (GET.PARAMQ ITEM TEXTURE PRINT.REGION))
	   (BACKGROUND (GET.PARAMQ ITEM BACKGROUND PRINT.REGION))
	   (FONT (GET.PARAMQ ITEM FONT PRINT.REGION))
	   (MARGIN (GET.PARAMQ ITEM MARGIN PRINT.REGION))
	   DSP OLD.CLIPPING.REGION CBOX LEFT BOTTOM WIDTH HEIGHT BOX LIST.OF.LINES XCOORD YCOORD 
	   TEXT.WIDTH FONT.HEIGHT FONT.DESCENT OLD.SOURCE OLD.OPERATION OLD.FONT TX TY)
          (SETQ DSP CURRENT.DSP)
          (SETQ OLD.CLIPPING.REGION (DSPCLIPPINGREGION NIL DSP))
          (SETQ CBOX (INTERSECTREGIONS REGION OLD.CLIPPING.REGION))
          (COND
	    (CBOX (DSPFILL CBOX BACKGROUND (QUOTE REPLACE)
			   DSP)
		  (SETQ LEFT (IPLUS MARGIN (fetch (REGION LEFT) of REGION)))
		  (SETQ BOTTOM (IPLUS MARGIN (fetch (REGION BOTTOM) of REGION)))
		  (SETQ WIDTH (IDIFFERENCE (fetch (REGION WIDTH) of REGION)
					   (LSH MARGIN 1)))
		  (SETQ HEIGHT (IDIFFERENCE (fetch (REGION HEIGHT) of REGION)
					    (LSH MARGIN 1)))
		  (SETQ BOX (create REGION
				    LEFT ← LEFT
				    BOTTOM ← BOTTOM
				    WIDTH ← WIDTH
				    HEIGHT ← HEIGHT))
		  (OR (LISTP (SETQ LIST.OF.LINES (GET.CURRENT.VALUE CELL)))
		      (SETQ LIST.OF.LINES (LIST LIST.OF.LINES)))
		  (OR FONT (SETQ FONT (DSPFONT NIL CURRENT.DSP)))
		  (SETQ FONT.HEIGHT (FONTPROP FONT (QUOTE HEIGHT)))
		  (SETQ FONT.DESCENT (FONTPROP FONT (QUOTE DESCENT)))
		  (SETQ TWIDTH (STRINGWIDTH LIST.OF.LINES FONT))
		  (SETQ FONT.HEIGHT (FONTPROP FONT (QUOTE HEIGHT)))
		  (SETQ FONT.DESCENT (FONTPROP FONT (QUOTE DESCENT)))
		  (DSPCLIPPINGREGION BOX DSP)
		  (SETQ XCOORD (SELECTQ X.ALIGNMENT
					(LEFT LEFT)
					(CENTER (IPLUS LEFT (RSH WIDTH 1)))
					(RIGHT (IPLUS LEFT WIDTH))
					(SHOULDNT)))
		  (SETQ YCOORD (SELECTQ Y.ALIGNMENT
					(BOTTOM BOTTOM)
					(CENTER (IPLUS BOTTOM (RSH (IDIFFERENCE HEIGHT FONT.HEIGHT)
								   1)))
					(TOP (IPLUS BOTTOM (IDIFFERENCE HEIGHT FONT.HEIGHT)))
					(SHOULDNT)))
		  (SETQ TY (SELECTQ Y.ALIGNMENT
				    [BOTTOM (IPLUS YCOORD (ITIMES FONT.HEIGHT (SUB1 (LENGTH 
										    LIST.OF.LINES]
				    (CENTER (IPLUS YCOORD (RSH (ITIMES FONT.HEIGHT
								       (SUB1 (LENGTH LIST.OF.LINES)))
							       1)
						   FONT.DESCENT))
				    (TOP YCOORD)
				    (SHOULDNT)))
		  (SETQ OLD.FONT (DSPFONT FONT DSP))
		  (SETQ OLD.SOURCE (DSPSOURCETYPE SOURCE CURRENT.DSP))
		  (SETQ OLD.OPERATION (DSPOPERATION OPERATION CURRENT.DSP))
		  (for LINE in LIST.OF.LINES
		     do (SETQ TEXT.WIDTH (STRINGWIDTH LINE FONT))
			(SETQ TX (SELECTQ X.ALIGNMENT
					  (LEFT XCOORD)
					  (CENTER (IDIFFERENCE XCOORD (RSH TEXT.WIDTH 1)))
					  (RIGHT (IDIFFERENCE XCOORD TEXT.WIDTH))
					  (SHOULDNT)))
			(DSPXPOSITION TX DSP)
			(DSPYPOSITION TY DSP)
			(PRIN1 LINE DSP)
			(SETQ TY (IDIFFERENCE TY FONT.HEIGHT)))
		  (DSPCLIPPINGREGION OLD.CLIPPING.REGION CURRENT.DSP)
		  (DSPFONT OLD.FONT CURRENT.DSP)
		  (DSPSOURCETYPE OLD.SOURCE CURRENT.DSP)
		  (DSPOPERATION OLD.OPERATION CURRENT.DSP])
)
(READ.ITEMTYPE REGULAR.POLYGON 5)
(\TYPE ITEM.TYPE NAME REGULAR.POLYGON COMMENT  "A regular polygon, drawn with STRAIGHT.LINES" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME CENTER TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The center for the polygon")  (\TYPE PARAMETER NAME NUMBER.OF.SIDES TYPE  (INTEGER) DEFAULT 6 COMMENT
  "The number of sides (and points) to the polygon")  (\TYPE PARAMETER NAME RADIUS TYPE  (INTEGER) 
DEFAULT 100 COMMENT  "The distance from the center to each point")  (\TYPE PARAMETER NAME ORIENTATION 
TYPE  (CONSTANT) DEFAULT 0 COMMENT  
"The clockwise rotation of the first point from stright up (degrees)")  (\TYPE PARAMETER NAME 
LINE.WIDTH TYPE  (INTEGER) DEFAULT 3 COMMENT  "The width of the lines forming the sides")) 
SUBITEM.SPECS  ((FOREACH  (I TO NUMBER.OF.SIDES) DO  (ITEM STRAIGHT.LINE  (PLACEMENT  (LIST  (IPLUS  (
fetch  (POSITION XCOORD) of CENTER)  (FIX  (FTIMES RADIUS  (COS  (FDIFFERENCE 90  (FPLUS ORIENTATION  
(FTIMES  (SUB1 I)  (FQUOTIENT  360.0 NUMBER.OF.SIDES))))))))  (IPLUS  (fetch  (POSITION YCOORD) of 
CENTER)  (FIX  (FTIMES RADIUS  (SIN  (FDIFFERENCE 90  (FPLUS ORIENTATION  (FTIMES  (SUB1 I)  (
FQUOTIENT  360.0 NUMBER.OF.SIDES))))))))  (IPLUS  (fetch  (POSITION XCOORD) of CENTER)  (FIX  (FTIMES 
RADIUS  (COS  (FDIFFERENCE 90  (FPLUS ORIENTATION  (FTIMES I  (FQUOTIENT  360.0 NUMBER.OF.SIDES)))))))
)  (IPLUS  (fetch  (POSITION YCOORD) of CENTER)  (FIX  (FTIMES RADIUS  (SIN  (FDIFFERENCE 90  (FPLUS 
ORIENTATION  (FTIMES I  (FQUOTIENT  360.0 NUMBER.OF.SIDES)))))))) NIL))  (WIDTH LINE.WIDTH)))) CLASSES
  (ARTWORK COMPOSITE))
(READ.ITEMTYPE SEGMENT.LINE 5)
(\TYPE ITEM.TYPE NAME SEGMENT.LINE COMMENT  "A straight line between grid positions" KIND COMPOSITE 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION2) DEFAULT  (170 170 340 340 NIL) COMMENT 
 "The endpoints of the line" GRID.TYPE  (LOCATION2))  (\TYPE PARAMETER NAME WIDTH TYPE  (INTEGER) 
DEFAULT 4 COMMENT  "The width of the line in screen points")) SUBITEM.SPECS  ((ITEM STRAIGHT.LINE  (
PLACEMENT PLACEMENT)  (WIDTH WIDTH))) CLASSES  (COMPOSITE))
(READ.ITEMTYPE SENSITIVE.REGION 5)
(\TYPE ITEM.TYPE NAME SENSITIVE.REGION COMMENT  "A sensor which shows nothing but does take action" 
KIND SENSOR PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (100 100 30 30) 
COMMENT  "An area sensitive to touch")  (\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (
ACTION.PRINT  "This action brought to you by a SENSITIVE.REGION") COMMENT  
"The action to be taken as the sensitive region is touched")) OTHER  (FNS  ((SENSE 
SENSE.SENSITIVE.REGION))) CLASSES  (SENSOR))
(DEFINEQ

(SENSE.SENSITIVE.REGION
  [LAMBDA (ITEM TOUCH XCOORD YCOORD)                         (* HaKo " 7-Aug-84 17:01")
                                                             (* edited: "31-MAR-82 10:21")
    (COND
      ((AND TOUCH (INSIDEP (GET.PARAMQ ITEM PLACEMENT SENSITIVE.REGION)
			   XCOORD YCOORD))
	(BEGIN.EVENT ITEM)
	(TRILLIUM.EVAL (GET.PARAMQ ITEM ACTION.FORM SENSITIVE.REGION))
	(WAITNOBUG)
	(END.EVENT)
	T])
)
(READ.ITEMTYPE SET.OF.LABELLED.BACKLIT.BUTTONS 5)
(\TYPE ITEM.TYPE NAME SET.OF.LABELLED.BACKLIT.BUTTONS COMMENT  
"A set of backlit buttons which all affect the same cell, thus interacting" KIND COMPOSITE PARAMETERS 
 ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) COMMENT  
"Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BUTTONS TYPE  (LIST  (
STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  ((("LABEL 1") VALUE.1)  ((
"LABEL 2") VALUE.2)) COMMENT  "The buttons themselves")  (\TYPE PARAMETER NAME PICTURE TYPE  (
BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the button")  (\TYPE PARAMETER 
NAME BUTTON.SPACING TYPE  (OFFSET.VECTOR) DEFAULT  (0 . 51) COMMENT  "Between buttons")  (\TYPE 
PARAMETER NAME TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR) DEFAULT  (-34 . 17) COMMENT  
"Offset for the text from the buttons")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (
LEFT CENTER RIGHT)) DEFAULT LEFT COMMENT  "Horizontal alignment of the text")  (\TYPE PARAMETER NAME 
VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT TOP COMMENT  
"Vertical alignment of the text")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT NIL COMMENT  
"The font in which to print the labels")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 
COMMENT  "The affected cell")  (\TYPE PARAMETER NAME INITIAL.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 
COMMENT  "An initial value for the cell")) SUBITEM.SPECS  ((FOREACH  (BUTTON IN BUTTONS)  (I FROM 0) 
DO  (ITEM BACKLIT.BUTTON  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION  (ITIMES I  (CAR 
BUTTON.SPACING))  (ITIMES I  (CDR BUTTON.SPACING)))))  (PICTURE PICTURE)  (TEXT  (CAR BUTTON))  (
TEXT.OFFSET TEXT.DISPLACEMENT)  (HORIZONTAL.ALIGNMENT HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT 
VERTICAL.ALIGNMENT)  (FONT FONT)  (CELL CELL)  (VALUE  (CADR BUTTON))))  (ITEM INITIALIZATION  (
PLACEMENT PLACEMENT)  (ACTION.FORM  (LIST  (QUOTE SET.CELL) CELL  (KWOTE INITIAL.VALUE))))) OTHER  (
FNS  ((1 CONVERT.SET.OF.LABELLED.BACKLIT.BUTTONS.OFFSETS))) CLASSES  (BUTTON COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.SET.OF.LABELLED.BACKLIT.BUTTONS.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 13:16")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.SPACING VERTICAL.SPACING BUTTON.SPACING)
    (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(READ.ITEMTYPE SET.OF.NUMBER.BUTTONS 5)
(\TYPE ITEM.TYPE NAME SET.OF.NUMBER.BUTTONS COMMENT  "A set of buttons which put numbers in a cell" 
KIND COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) 
COMMENT  "Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME LOWEST.NUMBER TYPE
  (INTEGER) DEFAULT 1 COMMENT  "The lowest number for the buttons")  (\TYPE PARAMETER NAME 
HIGHEST.NUMBER TYPE  (INTEGER) DEFAULT 10 COMMENT  "The lowest number for the buttons")  (\TYPE 
PARAMETER NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  
"The graphic for the button")  (\TYPE PARAMETER NAME BUTTON.SPACING TYPE  (OFFSET.VECTOR) DEFAULT  (0
 . 34) COMMENT  "Between buttons")  (\TYPE PARAMETER NAME TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR) 
DEFAULT  (17 . 17) COMMENT  "Offset for the text")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (
ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  "Horizontal alignment of the text")  (\TYPE 
PARAMETER NAME VERTICAL.ALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT CENTER COMMENT  
"Vertical alignment of the text")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT NIL COMMENT  
"The font in which to print the labels")  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 
COMMENT  "The affected cell")  (\TYPE PARAMETER NAME INITIAL.VALUE TYPE  (CONSTANT) DEFAULT 1 COMMENT 
 "An initial value for the cell")) SUBITEM.SPECS  ((FOREACH  (I FROM LOWEST.NUMBER TO HIGHEST.NUMBER) 
DO  (ITEM NUMBER.BUTTON  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION  (ITIMES  (IDIFFERENCE I 
LOWEST.NUMBER)  (CAR BUTTON.SPACING))  (ITIMES  (IDIFFERENCE I LOWEST.NUMBER)  (CDR BUTTON.SPACING))))
)  (PICTURE PICTURE)  (LABEL I)  (FONT FONT)  (CELL CELL)  (DIGIT I)))  (ITEM INITIALIZATION  (
PLACEMENT PLACEMENT)  (ACTION.FORM  (LIST  (QUOTE SET.CELL) CELL  (KWOTE INITIAL.VALUE))))) OTHER  (
FNS  ((1 CONVERT.SET.OF.NUMBER.BUTTONS.OFFSETS))) CLASSES  (COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.SET.OF.NUMBER.BUTTONS.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 13:16")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.SPACING VERTICAL.SPACING BUTTON.SPACING)
    (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(READ.ITEMTYPE SIMPLE.PROPOGATOR 5)
(\TYPE ITEM.TYPE NAME SIMPLE.PROPOGATOR COMMENT  
"Means by which a change in one cell can cause changes in others" KIND IMPLICATION PARAMETERS  ((\TYPE
 PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  "Un-named implication" COMMENT  "The item's name")  (
\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"A place on the screen so that it can be referenced" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME 
CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The cell which triggers this implication")  (\TYPE 
PARAMETER NAME TO.CELL TYPE  (CELL) DEFAULT CELL.2 COMMENT  
"The cell to which the new value should go")  (\TYPE PARAMETER NAME EXPRESSION TYPE  (FORM) DEFAULT 
NEW.VALUE COMMENT  "An expression in terms of NEW.VALUE for computing the value to propogate")) OTHER 
 (FNS  ((BOUNDING.BOX BOUNDING.BOX.SIMPLE.PROPOGATOR)  (IMPLY IMPLY.SIMPLE.PROPOGATOR))) CLASSES  (
IMPLICATION))
(DEFINEQ

(BOUNDING.BOX.SIMPLE.PROPOGATOR
  [LAMBDA (ITEM)                                             (* edited: " 6-May-84 14:32")
    (BOUNDING.BOX.IMPLICATION ITEM])

(IMPLY.SIMPLE.PROPOGATOR
  [LAMBDA (IMPLICATION OLD.VALUE NEW.VALUE DONT.TRACE)       (* HaKo "17-Aug-84 13:45")
                                                             (* DAHJr "10-OCT-83 11:51")
    (DECLARE (GLOBALVARS TRILLIUM.TRACE))
    (PROG ((CELL (GET.PARAMQ IMPLICATION CELL SIMPLE.PROPOGATOR))
	   (TO.CELL (GET.PARAMQ IMPLICATION TO.CELL SIMPLE.PROPOGATOR))
	   (EXPRESSION (GET.PARAMQ IMPLICATION EXPRESSION SIMPLE.PROPOGATOR))
	   VALUE)
          (SETQ VALUE (TRILLIUM.EVAL EXPRESSION))
          (CHANGE.CURRENT.VALUE TO.CELL VALUE)
          (AND TRILLIUM.TRACE (NOT DONT.TRACE)
	       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE T "Propagate " NEW.VALUE " in " CELL " via " 
				  EXPRESSION " to " VALUE " in " TO.CELL])
)
(READ.ITEMTYPE STRAIGHT.LINE 5)
(\TYPE ITEM.TYPE NAME STRAIGHT.LINE COMMENT  "A straight line between screen locations" KIND ARTWORK 
PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION2) DEFAULT  (100 100 200 200 NIL) COMMENT 
 "The endpoints of the line")  (\TYPE PARAMETER NAME WIDTH TYPE  (INTEGER) DEFAULT 4 COMMENT  
"The width of the line in screen points")) OTHER  (FNS  ((BOUNDING.BOX BOUNDING.BOX.STRAIGHT.LINE)  (
SHOW SHOW.STRAIGHT.LINE))) CLASSES  (ARTWORK))
(DEFINEQ

(BOUNDING.BOX.STRAIGHT.LINE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 15:09")
                                                             (* DAHJr "15-JAN-83 16:47")
    (PROG ((POS2 (GET.PARAMQ ITEM PLACEMENT STRAIGHT.LINE))
	   X1 Y1 X2 Y2)
          (SETQ X1 (fetch (POSITION2 XCOORD1) of POS2))
          (SETQ Y1 (fetch (POSITION2 YCOORD1) of POS2))
          (SETQ X2 (fetch (POSITION2 XCOORD2) of POS2))
          (SETQ Y2 (fetch (POSITION2 YCOORD2) of POS2))
          (RETURN (create REGION
			  LEFT ←(MIN X1 X2)
			  BOTTOM ←(MIN Y1 Y2)
			  WIDTH ←(ABS (IDIFFERENCE X1 X2))
			  HEIGHT ←(ABS (IDIFFERENCE Y1 Y2])

(SHOW.STRAIGHT.LINE
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 15:11")
                                                             (* edited: " 8-MAR-82 17:40")
    (DECLARE (GLOBALVARS CURRENT.DSP))
    (PROG ((POS2 (GET.PARAMQ ITEM PLACEMENT STRAIGHT.LINE))
	   (WIDTH (GET.PARAMQ ITEM WIDTH STRAIGHT.LINE)))
          (MOVETO (fetch (POSITION2 XCOORD1) of POS2)
		  (fetch (POSITION2 YCOORD1) of POS2)
		  CURRENT.DSP)
          (DRAWTO (fetch (POSITION2 XCOORD2) of POS2)
		  (fetch (POSITION2 YCOORD2) of POS2)
		  WIDTH NIL CURRENT.DSP])
)
(READ.ITEMTYPE TEXT.BULLETS 5)
(\TYPE ITEM.TYPE NAME TEXT.BULLETS COMMENT  "A bunch of related lines of text, with alignment" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (100 . 100) COMMENT  
"The reference point of the block")  (\TYPE PARAMETER NAME LIST.OF.LINES TYPE  (LIST  (STRING)) 
DEFAULT  ("Point"  "Point"  "Point") COMMENT  "The points")  (\TYPE PARAMETER NAME XALIGNMENT TYPE  (
ONEOF  (LEFT CENTER RIGHT)) DEFAULT LEFT COMMENT  "Horizontal alignment")  (\TYPE PARAMETER NAME STYLE
 TYPE  (ONEOF  (PLAIN NUMBERED BULLETS)) DEFAULT BULLETS COMMENT  "Focus points")  (\TYPE PARAMETER 
NAME FONT TYPE  (FONT) DEFAULT  (HELVETICA 18) COMMENT  "The font in which to print the information") 
 (\TYPE PARAMETER NAME INTERLINE.SPACING TYPE  (INTEGER) DEFAULT 10 COMMENT  
"The spacing between points")) SUBITEM.SPECS  ((FOREACH  (LINE IN LIST.OF.LINES)  (I FROM 1) DO  (
SELECT STYLE  (PLAIN  (ITEM LINE.OF.TEXT  (PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION 0  (MINUS  
(ITIMES  (SUB1 I)  (IPLUS  (FONT.HEIGHT FONT) INTERLINE.SPACING))))))  (LINE LINE)  (XALIGNMENT 
XALIGNMENT)  (FONT FONT)))  (NUMBERED  (ITEM LINE.OF.TEXT  (PLACEMENT  (PTRANSLATE PLACEMENT  (
NEW.POSITION 0  (MINUS  (ITIMES  (SUB1 I)  (IPLUS  (FONT.HEIGHT FONT) INTERLINE.SPACING))))))  (LINE  
(CONCAT I  ". " LINE))  (XALIGNMENT XALIGNMENT)  (FONT FONT)))  (BULLETS  (ITEM LINE.OF.TEXT  (
PLACEMENT  (PTRANSLATE PLACEMENT  (NEW.POSITION 0  (MINUS  (ITIMES  (SUB1 I)  (IPLUS  (FONT.HEIGHT 
FONT) INTERLINE.SPACING))))))  (LINE  (CONCAT  "- " LINE))  (XALIGNMENT XALIGNMENT)  (FONT FONT)))))) 
CLASSES  (ARTWORK COMPOSITE))
(READ.ITEMTYPE TIMEOUT 5)
(\TYPE ITEM.TYPE NAME TIMEOUT COMMENT  "A sensor which takes action if CELL > BASE + DELAY" KIND 
SENSOR PARAMETERS  ((\TYPE PARAMETER NAME NAME TYPE  (CONSTANT) DEFAULT  "Un-named timeout" COMMENT  
"The item's name")  (\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT  
"A location for identification purposes" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BASE TYPE  (
CELL) DEFAULT CELL.1 COMMENT  "A cell which is the reference time")  (\TYPE PARAMETER NAME DELAY TYPE 
 (INTEGER) DEFAULT 10000 COMMENT  "The time (in milliseconds) before the action should be taken")  (
\TYPE PARAMETER NAME ACTION.FORM TYPE  (FORM) DEFAULT  (ACTION.PRINT  
"This action is brought to you by a TIMEOUT") COMMENT  "The action to be taken on timeout")) OTHER  (
FNS  ((BOUNDING.BOX BOUNDING.BOX.TIMEOUT)  (SENSE SENSE.TIMEOUT))) CLASSES  (SENSOR))
(DEFINEQ

(BOUNDING.BOX.TIMEOUT
  [LAMBDA (ITEM)                                             (* HaKo " 6-Aug-84 15:12")
                                                             (* DAHJr "17-APR-83 14:05")
    (PROG ((LOCATION (GET.PARAMQ ITEM PLACEMENT TIMEOUT)))
          (RETURN (BOUNDING.BOX.FOR.SEGMENTS (fetch (LOCATION X) of LOCATION)
					     (fetch (LOCATION Y) of LOCATION)
					     8 1])

(SENSE.TIMEOUT
  [LAMBDA (ITEM TOUCH XCOORD YCOORD)                         (* HaKo " 7-Aug-84 17:10")
    (PROG ((BASE (GET.PARAMQ ITEM BASE TIMEOUT))
	   (DELAY (GET.PARAMQ ITEM DELAY TIMEOUT))
	   (ACTION (GET.PARAMQ ITEM ACTION.FORM TIMEOUT)))
          (COND
	    ((IGREATERP (CELL.VALUE CLOCK)
			(IPLUS DELAY (GET.CURRENT.VALUE BASE)))
	      (BEGIN.EVENT ITEM)
	      (TRILLIUM.EVAL ACTION)
	      (END.EVENT)
	      (RETURN T])
)
(READ.ITEMTYPE UP.DOWN.BUTTONS 5)
(\TYPE ITEM.TYPE NAME UP.DOWN.BUTTONS COMMENT  "Pair of Up/Down Buttons for Thermometer controls" KIND
 COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (170 . 170) COMMENT 
 "The location of this item" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME CELL TYPE  (CELL) DEFAULT 
CELL.1 COMMENT  "The cell affected")  (\TYPE PARAMETER NAME BUTTON.SPACING TYPE  (OFFSET.VECTOR) 
DEFAULT  (0 . 51) COMMENT  "Between buttons")  (\TYPE PARAMETER NAME UP.PICTURE TYPE  (BITMAP.NAME) 
DEFAULT UP.BUTTON COMMENT  "Bitmap picture for Up button")  (\TYPE PARAMETER NAME DOWN.PICTURE TYPE  (
BITMAP.NAME) DEFAULT DOWN.BUTTON COMMENT  "Bitmap picture for Down button")  (\TYPE PARAMETER NAME 
MAXIMUM TYPE  (INTEGER) DEFAULT 10 COMMENT  "Maximum value of cell")  (\TYPE PARAMETER NAME MINIMUM 
TYPE  (INTEGER) DEFAULT 1 COMMENT  "Minimum value of cell")  (\TYPE PARAMETER NAME INCREMENT TYPE  (
INTEGER) DEFAULT 1 COMMENT  "The step size for each activation")  (\TYPE PARAMETER NAME AT.LIMIT TYPE 
 (ONEOF  (STICK.AT.LIMIT WRAP.AROUND)) DEFAULT STICK.AT.LIMIT COMMENT  
"What to do when you reach the limit")  (\TYPE PARAMETER NAME RATE TYPE  (INTEGER) DEFAULT 300 COMMENT
  "Delay in milliseconds")) SUBITEM.SPECS  ((ITEM GENERAL.BUTTON  (PLACEMENT  (PTRANSLATE PLACEMENT 
BUTTON.SPACING))  (TEXT  (LIST  ""))  (PICTURE UP.PICTURE)  (ACTION  (LIST  (QUOTE INCREASE.CELL)  (
KWOTE CELL) INCREMENT MAXIMUM  (COND  ((EQ AT.LIMIT  (QUOTE STICK.AT.LIMIT)) NIL)  (T MINIMUM)) RATE))
)  (ITEM GENERAL.BUTTON  (PLACEMENT PLACEMENT)  (TEXT  (LIST  ""))  (PICTURE DOWN.PICTURE)  (ACTION  (
LIST  (QUOTE DECREASE.CELL)  (KWOTE CELL) INCREMENT MINIMUM  (COND  ((EQ AT.LIMIT  (QUOTE 
STICK.AT.LIMIT)) NIL)  (T MAXIMUM)) RATE)))) OTHER  (FNS  ((1 CONVERT.UP.DOWN.BUTTONS.OFFSETS))) 
CLASSES  (COMPOSITE BUTTON) VERSION 1)
(DEFINEQ

(CONVERT.UP.DOWN.BUTTONS.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 12:59")
    (CONVERT.GRIDDED.OFFSETSQ ITEM HORIZONTAL.SPACING VERTICAL.SPACING BUTTON.SPACING])
)
(READ.ITEMTYPE VALUE.BAR 5)
(\TYPE ITEM.TYPE NAME VALUE.BAR COMMENT  "A bordered region through which to view a cell" KIND 
COMPOSITE PARAMETERS  ((\TYPE PARAMETER NAME PLACEMENT TYPE  (REGION) DEFAULT  (170 170 136 34) 
COMMENT  "The boundaries of the viewing area" GRID.TYPE  (GRIDREGION))  (\TYPE PARAMETER NAME CELL 
TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The underlying cell represented by the value bar")  (\TYPE 
PARAMETER NAME XALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) DEFAULT CENTER COMMENT  
"Horizontal alignment")  (\TYPE PARAMETER NAME YALIGNMENT TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT 
CENTER COMMENT  "Vertical alignment")  (\TYPE PARAMETER NAME FONT TYPE  (FONT) DEFAULT  (GACHA 10) 
COMMENT  "The font to print the value in")  (\TYPE PARAMETER NAME BORDER.THICKNESS TYPE  (INTEGER) 
DEFAULT 2 COMMENT  "The thickness in screen points of the border")  (\TYPE PARAMETER NAME BORDER.COLOR
 TYPE  (SHADE) DEFAULT 65535 COMMENT  "The color of the border")  (\TYPE PARAMETER NAME 
BORDER.OPERATION TYPE  (ONEOF  (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  
"How the border is combined with the screen")  (\TYPE PARAMETER NAME PRINT.MARGIN TYPE  (INTEGER) 
DEFAULT 2 COMMENT  "The margin of the printing region")  (\TYPE PARAMETER NAME PRINT.BACKGROUND TYPE  
(SHADE) DEFAULT 42405 COMMENT  "The background of the printing region")  (\TYPE PARAMETER NAME 
PRINT.SOURCE TYPE  (ONEOF  (INPUT INVERT)) DEFAULT INPUT COMMENT  
"How the texture is combined with the print")  (\TYPE PARAMETER NAME PRINT.OPERATION TYPE  (ONEOF  (
REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT  "How the print is combined with the background")
) SUBITEM.SPECS  ((ITEM BORDER  (PLACEMENT PLACEMENT)  (THICKNESS BORDER.THICKNESS)  (OPERATION 
BORDER.OPERATION)  (COLOR BORDER.COLOR))  (ITEM PRINT.REGION  (PLACEMENT  (REGION.WITHIN.BORDER 
PLACEMENT BORDER.THICKNESS))  (CELL CELL)  (XALIGNMENT XALIGNMENT)  (YALIGNMENT YALIGNMENT)  (FONT 
FONT)  (MARGIN PRINT.MARGIN)  (BACKGROUND PRINT.BACKGROUND)  (SOURCE PRINT.SOURCE)  (OPERATION 
PRINT.OPERATION))) CLASSES  (COMPOSITE))
(READ.ITEMTYPE VERTICAL.BUTTONS 5)
(\TYPE ITEM.TYPE NAME VERTICAL.BUTTONS COMMENT  
"A set of backlit buttons which all affect the same cell, thus interacting" KIND COMPOSITE PARAMETERS 
 ((\TYPE PARAMETER NAME PLACEMENT TYPE  (POSITION) DEFAULT  (340 . 255) COMMENT  
"Offset for the whole bunch" GRID.TYPE  (LOCATION))  (\TYPE PARAMETER NAME BUTTONS TYPE  (LIST  (
STRUCTURE  ((TEXT  (LIST  (STRING)))  (VALUE  (CONSTANT))))) DEFAULT  ((("LABEL 1") VALUE.1)  ((
"LABEL 2") VALUE2)) COMMENT  "A list of label/value pairs describing the buttons")  (\TYPE PARAMETER 
NAME PICTURE TYPE  (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT  "The graphic for the buttons") 
 (\TYPE PARAMETER NAME VERTICAL.SPACING TYPE  (INTEGER) DEFAULT 51 COMMENT  "Between buttons")  (\TYPE
 PARAMETER NAME TEXT.DISPLACEMENT TYPE  (OFFSET.VECTOR) DEFAULT  (-34 . 17) COMMENT  
"Offset for the text")  (\TYPE PARAMETER NAME HORIZONTAL.ALIGNMENT TYPE  (ONEOF  (LEFT CENTER RIGHT)) 
DEFAULT LEFT COMMENT  "Horizontal alignment of the text")  (\TYPE PARAMETER NAME VERTICAL.ALIGNMENT 
TYPE  (ONEOF  (TOP CENTER BOTTOM)) DEFAULT TOP COMMENT  "Vertical alignment of the text")  (\TYPE 
PARAMETER NAME FONT TYPE  (FONT) DEFAULT NIL COMMENT  "The font in which to print the labels")  (\TYPE
 PARAMETER NAME CELL TYPE  (CELL) DEFAULT CELL.1 COMMENT  "The affected cell")  (\TYPE PARAMETER NAME 
INITIAL.VALUE TYPE  (CONSTANT) DEFAULT VALUE.1 COMMENT  "An initial value for the cell")) 
SUBITEM.SPECS  ((ITEM SET.OF.LABELLED.BACKLIT.BUTTONS  (PLACEMENT PLACEMENT)  (BUTTONS BUTTONS)  (
PICTURE PICTURE)  (BUTTON.SPACING  (NEW.POSITION 0 VERTICAL.SPACING))  (TEXT.DISPLACEMENT 
TEXT.DISPLACEMENT)  (HORIZONTAL.ALIGNMENT HORIZONTAL.ALIGNMENT)  (VERTICAL.ALIGNMENT 
VERTICAL.ALIGNMENT)  (FONT FONT)  (CELL CELL)  (INITIAL.VALUE INITIAL.VALUE))) OTHER  (FNS  ((1 
CONVERT.VERTICAL.BUTTONS.OFFSETS))) CLASSES  (BUTTON COMPOSITE) VERSION 1)
(DEFINEQ

(CONVERT.VERTICAL.BUTTONS.OFFSETS
  [LAMBDA (ITEM)                                             (* edited: "16-Aug-84 13:27")
    (PROG NIL
          (CONVERT.GRIDDED.OFFSET ITEM (QUOTE VERTICAL.SPACING))
          (CONVERT.GRIDDED.OFFSETSQ ITEM TEXT.DISPLACEMENT TEXT.DISPLACEMENT.↑ TEXT.DISPLACEMENT])
)
(PRETTYCOMPRINT PUBLIC-ITEMTYPESCOMS)

(RPAQQ PUBLIC-ITEMTYPESCOMS [(ITEMTYPES ARROW BACKLIT.BUTTON BITMAP BLOCK.OF.TEXT BORDER CAPTION 
					CASCADE CASCADE.BUTTON CASCADE.INDICATOR CHANGE.FRAME.BUTTON 
					CIRCLE COLOR COMPUTER ELLIPSE EXTERNAL.BUTTON 
					FLASHING.SENSITIVE.REGION GENERAL.BUTTON GROUP 
					HORIZONTAL.BUTTONS IMPLICATION INDICATOR INHIBITOR INIT.CELL 
					INITIALIZATION INVERTING.CASCADE INVERTING.CASCADE.LIGHT 
					INVERTING.SENSITIVE.REGION LIGHT LIGHT.BAR LINE.OF.TEXT 
					NUMBER.BUTTON NUMBER.BUTTON.NEXT.DIGIT NUMBER.PAD 
					NUMERIC.CHECKER PICTURE PRINT.REGION REGULAR.POLYGON 
					SEGMENT.LINE SENSITIVE.REGION SET.OF.LABELLED.BACKLIT.BUTTONS 
					SET.OF.NUMBER.BUTTONS SIMPLE.PROPOGATOR STRAIGHT.LINE 
					TEXT.BULLETS TIMEOUT UP.DOWN.BUTTONS VALUE.BAR 
					VERTICAL.BUTTONS)
	(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
									      (NLAML 
									     ACTON.CASCADE.BUTTON)
									      (LAMA])
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS 

(ADDTOVAR NLAMA )

(ADDTOVAR NLAML ACTON.CASCADE.BUTTON)

(ADDTOVAR LAMA )
)
(PUTPROPS PUBLIC-ITEMTYPES COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1994 7190 (ANALYZE.ARROW 2004 . 2499) (BOUNDING.BOX.ARROW 2501 . 4089) (SHOW.ARROW 4091
 . 5281) (RESET.ARROW 5283 . 5425) (ARROW.HEAD.POSITIONS 5427 . 7188)) (9184 9409 (
CONVERT.BACKLIT.BUTTON.OFFSETS 9194 . 9407)) (16198 17317 (BOUNDING.BOX.BITMAP 16208 . 16653) (
SHOW.BITMAP 16655 . 17315)) (20419 22212 (SHOW.BORDER 20429 . 22210)) (26830 27315 (
CONVERT.CASCADE.OFFSETS 26840 . 27313)) (29128 30505 (ACTON.CASCADE.BUTTON 29138 . 29503) (
INCREMENT.CASCADE.BUTTON 29505 . 30503)) (32248 32476 (CONVERT.CASCADE.INDICATOR.OFFSETS 32258 . 32474
)) (35890 36120 (CONVERT.CHANGE.FRAME.BUTTON.OFFSETS 35900 . 36118)) (36759 38217 (BOUNDING.BOX.CIRCLE
 36769 . 37546) (SHOW.CIRCLE 37548 . 38215)) (38888 40103 (BOUNDING.BOX.COLOR 38898 . 39278) (
SHOW.COLOR 39280 . 40101)) (40997 41306 (ACTON.COMPUTER 41007 . 41304)) (42170 43896 (
BOUNDING.BOX.ELLIPSE 42180 . 43079) (SHOW.ELLIPSE 43081 . 43894)) (47875 48101 (
CONVERT.EXTERNAL.BUTTON.OFFSETS 47885 . 48099)) (48713 49400 (SENSE.FLASHING.SENSITIVE.REGION 48723 . 
49398)) (52577 52802 (CONVERT.GENERAL.BUTTON.OFFSETS 52587 . 52800)) (53286 53954 (ANALYZE.GROUP 53296
 . 53952)) (55863 56201 (CONVERT.HORIZONTAL.BUTTONS.OFFSETS 55873 . 56199)) (57014 57982 (
BOUNDING.BOX.IMPLICATION 57024 . 57476) (IMPLY.IMPLICATION 57478 . 57980)) (59139 62824 (
BOUNDING.BOX.INDICATOR 59149 . 59837) (SHOW.INDICATOR 59839 . 60011) (DISPLAY.INDICATOR 60013 . 62661)
 (RESET.INDICATOR 62663 . 62822)) (63614 64821 (BOUNDING.BOX.INHIBITOR 63624 . 64084) (
INHIBIT.INHIBITOR 64086 . 64819)) (65530 66004 (BOUNDING.BOX.INIT.CELL 65540 . 65706) (
INITIALIZE.INIT.CELL 65708 . 66002)) (66709 67479 (BOUNDING.BOX.INITIALIZATION 66719 . 67189) (
INITIALIZE.INITIALIZATION 67191 . 67477)) (70338 70754 (CONVERT.INVERTING.CASCADE.OFFSETS 70348 . 
70752)) (72395 72629 (CONVERT.INVERTING.CASCADE.LIGHT.OFFSETS 72405 . 72627)) (73242 73960 (
SENSE.INVERTING.SENSITIVE.REGION 73252 . 73958)) (74567 75556 (SHOW.LIGHT 74577 . 74745) (
DISPLAY.LIGHT 74747 . 75554)) (76757 79918 (SHOW.LIGHT.BAR 76767 . 76891) (DISPLAY.LIGHT.BAR 76893 . 
79916)) (81235 82912 (ANALYZE.LINE.OF.TEXT 81245 . 82910)) (90552 92125 (BOUNDING.BOX.NUMERIC.CHECKER 
90562 . 90729) (INHIBIT.NUMERIC.CHECKER 90731 . 92123)) (93148 94724 (BOUNDING.BOX.PICTURE 93158 . 
93838) (SHOW.PICTURE 93840 . 94722)) (96008 100078 (SHOW.PRINT.REGION 96018 . 96142) (
DISPLAY.PRINT.REGION 96144 . 100076)) (102710 103183 (SENSE.SENSITIVE.REGION 102720 . 103181)) (105317
 105656 (CONVERT.SET.OF.LABELLED.BACKLIT.BUTTONS.OFFSETS 105327 . 105654)) (107649 107978 (
CONVERT.SET.OF.NUMBER.BUTTONS.OFFSETS 107659 . 107976)) (108922 109889 (BOUNDING.BOX.SIMPLE.PROPOGATOR
 108932 . 109103) (IMPLY.SIMPLE.PROPOGATOR 109105 . 109887)) (110371 111789 (
BOUNDING.BOX.STRAIGHT.LINE 110381 . 111140) (SHOW.STRAIGHT.LINE 111142 . 111787)) (114325 115249 (
BOUNDING.BOX.TIMEOUT 114335 . 114769) (SENSE.TIMEOUT 114771 . 115247)) (117110 117341 (
CONVERT.UP.DOWN.BUTTONS.OFFSETS 117120 . 117339)) (121334 121668 (CONVERT.VERTICAL.BUTTONS.OFFSETS 
121344 . 121666)))))
STOP