(FILECREATED "17-Aug-84 21:47:46" {ICE}<TRILLIUM><BIRTHDAY84>BETA>TRI-ANALYZE.;1 19817  

      previous date: "16-Aug-84 18:18:04" {ICE}<TRILLIUM>BIRTHDAY84>PRE-BETA>TRI-ANALYZE.;9)


(* Copyright (c) 1984 by Xerox Corporation)

(PRETTYCOMPRINT TRI-ANALYZECOMS)

(RPAQQ TRI-ANALYZECOMS ((VARS (ANALYZE.LOT.DSP))
	(FNS ANALYZE&COMPLETE.ITEM ANALYZE.AND.ADD ANALYZE.FRAME ANALYZE.FRAME.IF.NECESSARY 
	     ANALYZE.FRAME.IF.NECESSARY* ANALYZE.INTERFACE ANALYZE.ITEM ANALYZE.UNDEFINED 
	     BOUNDING.BOX BOUNDING.BOX.FOR.BUTTON BOUNDING.BOX.FOR.NUMBER.BUTTON 
	     BOUNDING.BOX.FOR.SEGMENTS BOUNDING.BOX.UNDEFINED COERCE.BOUNDING.BOX 
	     COMPOSITE.BOUNDING.BOX DEFAULT.BOUNDING.BOX.FN FIND.FONT FONT.HEIGHT FORM.GET.CALL 
	     FORM.GET.MSF.NAME FORM.GET.REFERENCE.VALUE MAKE.ITEM.NAMES MARK.6LISTS.OBSOLETE 
	     NEW.GRIDREGION NEW.LOCATION2 NEW.POSITION2 NEW.REGION PICTURE.CENTER PICTURE.HEIGHT 
	     PICTURE.WIDTH PTRANSLATE RANDOM.REGION REGION.HEIGHT REGION.WIDTH TRANSLATE 
	     UPDATE&DISPLAY.FRAME)))

(RPAQQ ANALYZE.LOT.DSP NIL)
(DEFINEQ

(ANALYZE&COMPLETE.ITEM
  [LAMBDA (ITEM)                                             (* DAHJr "16-SEP-83 16:17")
    (PROG (RESULT)
          (SETQ RESULT (ANALYZE.ITEM ITEM))
          (COERCE.BOUNDING.BOX ITEM)
          (EXCISE.INTERMEDIATE.STRUCTURE ITEM)
          (RETURN RESULT])

(ANALYZE.AND.ADD
  [LAMBDA (ITEM)                                             (* DAHJr " 5-DEC-83 10:21")
    (PROG (RESULT)
          (SETQ RESULT (ANALYZE.ITEM ITEM))
          (COERCE.BOUNDING.BOX ITEM)
          (EXCISE.INTERMEDIATE.STRUCTURE ITEM)
          (RETURN RESULT])

(ANALYZE.FRAME
  [LAMBDA (FRAME)                                            (* HaKo "16-Aug-84 16:18")
    (DECLARE (GLOBALVARS REPORT.FRAMES))
    (THINKING (AND REPORT.FRAMES (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Analyzing frame: "
						    (GET.FIELDQ FRAME NAME FRAME)
						    ". . ."))
	      (RESET.FRAME FRAME)
	      (for SUBITEM in (GET.FIELDQ FRAME ITEMS FRAME) do (ANALYZE.AND.ADD SUBITEM))
	      (SET.FIELDQ FRAME ANALYZED T FRAME)
	      (MARK.6LISTS.OBSOLETE FRAME)
	      (AND REPORT.FRAMES (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE " done."])

(ANALYZE.FRAME.IF.NECESSARY
  [LAMBDA (FRAME)                                            (* DAHJr " 5-DEC-83 19:56")
    (COND
      ((NULL (GET.FIELDQ FRAME ANALYZED FRAME))
	(ANALYZE.FRAME FRAME)))
    (COND
      ((NULL (GET.FIELDQ FRAME 6LISTS))
	(BUILD.6LISTS FRAME])

(ANALYZE.FRAME.IF.NECESSARY*
  [LAMBDA (FRAME)                                            (* HaKo "25-Jul-84 16:02")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE))
    [for SUPERFRAME.NAME bind SUPERFRAME in (GET.FIELDQ FRAME SUPERFRAMES FRAME)
       do (COND
	    ((SETQ SUPERFRAME (FIND.FRAME CURRENT.INTERFACE SUPERFRAME.NAME))
	      (ANALYZE.FRAME.IF.NECESSARY* SUPERFRAME))
	    (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Frame " (GET.FIELDQ FRAME NAME)
				  " has superframe " SUPERFRAME.NAME " which doesn't exist" 
				  " (analysis)"]
    (ANALYZE.FRAME.IF.NECESSARY FRAME])

(ANALYZE.INTERFACE
  [LAMBDA (INTERFACE ONLY.IF.NECESSARY)                      (* HaKo "26-Jul-84 15:09")
                                                             (* DAHJr "31-Mar-84 17:39")
    (DECLARE (GLOBALVARS CURRENT.FRAME))
    [RESETLST (RESETSAVE CURRENT.FRAME)
	      (for FRAME in (GET.FIELDQ INTERFACE FRAMES)
		 do (SETQ CURRENT.FRAME FRAME)
		    (COND
		      (ONLY.IF.NECESSARY (ANALYZE.FRAME.IF.NECESSARY FRAME))
		      (T (ANALYZE.FRAME FRAME]
    (MARK.FRAME.CONTEXT.OBSOLETE])

(ANALYZE.ITEM
  [LAMBDA (ITEM FRAME)                                       (* DAHJr "16-FEB-83 10:12")
    (PROG [(ANALYSIS.FN (GET.ANALYSISFN (ITEM.TYPE ITEM]
          (RETURN (COND
		    (ANALYSIS.FN (APPLY* ANALYSIS.FN ITEM FRAME))
		    (T (PROG (ITYPE DESCRIPTION)
			     (SETQ ITYPE (ITEM.TYPE ITEM))
			     (SETQ DESCRIPTION (ITEM.TYPE.DESCRIPTION ITYPE))
			     (COND
			       ((NULL DESCRIPTION)
				 (ANALYZE.UNDEFINED ITEM))
			       (T                            (* INTERPRETED EXPANSION)
				  (SHOULDNT "EXPANDING")
				  (COND
				    ((COMPOSITE? ITEM)
				      (ANALYZE.COMPOSITE.ITEM ITEM FRAME))
				    (T (APPLY* (OR (GETPROP ITYPE (QUOTE ANALYZE))
						   (PROGN (TRILLIUM.PRINTOUT 
								  "No ANALYZE function for type "
									     ITYPE)
							  (QUOTE NULL)))
					       ITEM FRAME)))
                                                             (* FORCES MEMOIZING OF BOUNDING BOX)
				  (BOUNDING.BOX ITEM])

(ANALYZE.UNDEFINED
  [LAMBDA (ITEM)                                             (* HaKo "25-Jul-84 16:07")
    (PROG (ITYPE)
          (RESET.ITEM ITEM)
          (SETQ ITYPE (GET.FIELDQ ITEM \TYPE))
          (SET.FIELDQ ITEM BOUNDING.BOX (BOUNDING.BOX.UNDEFINED ITEM))
          (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Item of undefined type " ITYPE " encountered")
          (PUTPROP ITYPE (QUOTE COMPOSITE?)
		   (QUOTE UNDEFINED))
          (RETURN ITEM])

(BOUNDING.BOX
  [LAMBDA (ITEM)                                             (* HaKo "26-Jul-84 15:18")
    (OR (LISTGET ITEM (QUOTE BOUNDING.BOX))
	(PROG (MAXREG RESULT)
	      [SETQ MAXREG (COND
		  ((COMPOSITE? ITEM)
		    (COMPOSITE.BOUNDING.BOX (GET.FIELDQ ITEM SUBITEMS)))
		  (T (COND
		       ((NLSETQ (SETQ RESULT (APPLY* (OR (GETPROP (ITEM.TYPE ITEM)
								  (QUOTE BOUNDING.BOX))
							 (FUNCTION DEFAULT.BOUNDING.BOX.FN))
						     ITEM)))
			 RESULT)
		       (T (REPORT.LISP.ERROR "getting bounding box of item" ITEM)
			  0]
	      (SET.FIELDQ ITEM BOUNDING.BOX MAXREG)
	      (RETURN MAXREG])

(BOUNDING.BOX.FOR.BUTTON
  [LAMBDA (X Y XW YW)                                        (* edited: "15-JUL-81 18:17")
    (DECLARE (GLOBALVARS BUTTON.BITMAP.EXTRA TRILLIUM.GRID.DX TRILLIUM.GRID.DY TRILLIUM.GRID.X0 
			 TRILLIUM.GRID.Y0))
    (LIST (IDIFFERENCE (XCOORD X)
		       BUTTON.BITMAP.EXTRA)
	  (YCOORD Y)
	  (IPLUS (XDIST XW)
		 BUTTON.BITMAP.EXTRA)
	  (IPLUS (YDIST YW)
		 BUTTON.BITMAP.EXTRA])

(BOUNDING.BOX.FOR.NUMBER.BUTTON
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 14:48")
    (PROG ((LOCATION (GET.PARAMQ ITEM PLACEMENT NUMBER.BUTTON)))
          (BOUNDING.BOX.FOR.BUTTON (fetch (LOCATION X) of LOCATION)
				   (fetch (LOCATION Y) of LOCATION)
				   2 2])

(BOUNDING.BOX.FOR.SEGMENTS
  [LAMBDA (X Y XW YW)                                        (* DAHJr " 5-DEC-83 10:22")
    (DECLARE (GLOBALVARS TRILLIUM.GRID.DX TRILLIUM.GRID.DY))
    (LIST X Y (XDIST XW)
	  (YDIST YW])

(BOUNDING.BOX.UNDEFINED
  [LAMBDA (ITEM)                                             (* DAHJr "20-JAN-83 08:59")
    (LIST (RAND 100 300)
	  (RAND 100 300)
	  50 25])

(COERCE.BOUNDING.BOX
  [LAMBDA (ITEM)                                             (* edited: "21-JAN-83 10:04")
    (PROG (BOUNDING.BOX)
          (SETQ BOUNDING.BOX (BOUNDING.BOX ITEM))
          [COND
	    ((NLISTP BOUNDING.BOX)
	      (SETQ BOUNDING.BOX (RANDOM.REGION))
	      (SET.FIELDQ ITEM BOUNDING.BOX BOUNDING.BOX))
	    (T                                               (* MAKE IT VISIBLE)
	       (replace (REGION WIDTH) of BOUNDING.BOX with (MAX 4 (fetch (REGION WIDTH)
								      of BOUNDING.BOX)))
	       (replace (REGION HEIGHT) of BOUNDING.BOX with (MAX 4 (fetch (REGION HEIGHT)
								       of BOUNDING.BOX]
          (RETURN BOUNDING.BOX])

(COMPOSITE.BOUNDING.BOX
  [LAMBDA (SUBITEMS)                                         (* edited: " 6-JUL-82 18:00")
    (PROG ((MAXREG 0)
	   (REST SUBITEMS))
          (while [AND REST (ZEROP (SETQ MAXREG (BOUNDING.BOX (CAR REST] do (SETQ REST (CDR REST)))
          [AND (SETQ REST (CDR REST))
	       (PROG ((BIGTOP MAXREG)
		      (BIGRIGHT MAXREG)
		      (BIGBOTTOM MAXREG)
		      (MINLEFT (fetch (REGION LEFT) of MAXREG))
		      (MAXTOP (fetch (REGION TOP) of MAXREG))
		      (MAXRIGHT (fetch (REGION RIGHT) of MAXREG))
		      (MINBOTTOM (fetch (REGION BOTTOM) of MAXREG))
		      BOX POINT)
		     [for SUBITEM in REST unless (ZEROP (SETQ BOX (BOUNDING.BOX SUBITEM)))
			do (SETQ POINT (fetch (REGION LEFT) of BOX))
			   (COND
			     ((IGREATERP MINLEFT POINT)
			       (SETQ MINLEFT POINT)
			       (SETQ MAXREG BOX)))
			   (SETQ POINT (fetch (REGION TOP) of BOX))
			   (COND
			     ((IGREATERP POINT MAXTOP)
			       (SETQ MAXTOP POINT)
			       (SETQ BIGTOP BOX)))
			   (SETQ POINT (fetch (REGION RIGHT) of BOX))
			   (COND
			     ((IGREATERP POINT MAXRIGHT)
			       (SETQ MAXRIGHT POINT)
			       (SETQ BIGRIGHT BOX)))
			   (SETQ POINT (fetch (REGION BOTTOM) of BOX))
			   (COND
			     ((IGREATERP MINBOTTOM POINT)
			       (SETQ MINBOTTOM POINT)
			       (SETQ BIGBOTTOM BOX]
		     (COND
		       ((OR (NEQ MAXREG BIGTOP)
			    (NEQ MAXREG BIGBOTTOM)
			    (NEQ MAXREG BIGRIGHT))
			 (SETQ MAXREG (create REGION
					      LEFT ← MINLEFT
					      BOTTOM ← MINBOTTOM
					      WIDTH ←(ADD1 (IDIFFERENCE MAXRIGHT MINLEFT))
					      HEIGHT ←(ADD1 (IDIFFERENCE MAXTOP MINBOTTOM]
          (RETURN MAXREG])

(DEFAULT.BOUNDING.BOX.FN
  [LAMBDA (ITEM)                                             (* HaKo "16-Aug-84 11:39")
    (MISSING.ITYPE.FN ITEM (QUOTE BOUNDING.BOX])

(FIND.FONT
  [LAMBDA (FONT)                                             (* HaKo " 7-Aug-84 12:36")
                                                             (* HK "12-JUL-82 14:08")
    (DECLARE (SPECVARS FONT)
	     (GLOBALVARS CURRENT.DSP))
    (OR (CAR (NLSETQ (FONTCREATE FONT)))
	(DSPFONT NIL CURRENT.DSP])

(FONT.HEIGHT
  [LAMBDA (FONT)
    (FONTPROP (FIND.FONT FONT)
	      (QUOTE HEIGHT])

(FORM.GET.CALL
  [LAMBDA (FORM FUNCTION.NAMES)                              (* edited: " 4-AUG-81 18:47")
    (COND
      ((ATOM FORM)
	NIL)
      ((MEMBER (CAR FORM)
	       FUNCTION.NAMES)
	FORM)
      (T (PROG (RESULT)
	       [for SUBFORM in FORM do (COND
					 ((SETQ RESULT (FORM.GET.CALL SUBFORM FUNCTION.NAMES))
					   (RETURN RESULT]
	       (RETURN RESULT])

(FORM.GET.MSF.NAME
  [LAMBDA (FORM)                                             (* edited: "19-MAY-82 17:54")
    (COND
      ((ATOM FORM)
	FORM)
      (T (CADR (FORM.GET.CALL FORM (QUOTE (CHANGE.MACHINE.STATE CHANGE.CELL 
								CHANGE.MACHINE.STATE.NEXT.DIGIT 
								EMPTY.MACHINE.STATE 
								PUSH.TO.MACHINE.STATE 
								POP.FROM.MACHINE.STATE 
								NTH.OF.MACHINE.STATE 
								SET.NTH.OF.MACHINE.STATE 
								LENGTH.OF.MACHINE.STATE])

(FORM.GET.REFERENCE.VALUE
  [LAMBDA (FORM)
    (CADDR (FORM.GET.CALL FORM (QUOTE (CHANGE.MACHINE.STATE CHANGE.MACHINE.STATE.NEXT.DIGIT])

(MAKE.ITEM.NAMES
  [LAMBDA (ITEMS)                                            (* DAHJr "14-JUL-83 20:08")
                                                             (* RETURNS AN ALST OF ITEM\NAME PAIRS)
    (PROG (NAMES ITYPE ELEM ITMS)
          [for ITEM in ITEMS
	     do (SETQ ITYPE (ITEM.TYPE ITEM))
		(COND
		  (NAMES (LISTPUT NAMES ITYPE (NCONC1 (LISTGET NAMES ITYPE)
						      ITEM)))
		  (T (SETQ NAMES (LIST ITYPE (LIST ITEM]
          (RETURN (for ELEM on NAMES by (CDDR ELEM)
		     join (SETQ ITYPE (CAR ELEM))
			  (SETQ ITMS (CADR ELEM))
			  (COND
			    [(EQP (LENGTH ITMS)
				  1)
			      (LIST (CONS (CAR ITMS)
					  (MKATOM (CONCAT ITYPE "."]
			    (T (for ITM in ITMS as I from 1
				  collect (CONS ITM (MKATOM (CONCAT ITYPE "." I "."])

(MARK.6LISTS.OBSOLETE
  [LAMBDA (FRAME)                                            (* DAHJr "16-SEP-83 16:11")
    (SET.FIELDQ FRAME 6LISTS NIL])

(NEW.GRIDREGION
  [LAMBDA (LOCATION EXTENT/WIDTH HEIGHT)                     (* HaKo "25-Jul-84 16:07")
    (DECLARE (GLOBALVARS TRILLIUM.GRID.DX TRILLIUM.GRID.DY))
    (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "NEW.GRIDREGION still being used")
    (create REGION
	    LEFT ←(fetch (LOCATION X) of LOCATION)
	    BOTTOM ←(fetch (LOCATION Y) of LOCATION)
	    WIDTH ←[XDIST (COND
			    ((NUMBERP EXTENT/WIDTH)
			      EXTENT/WIDTH)
			    (T (fetch (LOCATION X) of EXTENT/WIDTH]
	    HEIGHT ←(YDIST (COND
			     ((NUMBERP EXTENT/WIDTH)
			       HEIGHT)
			     (T (fetch (LOCATION Y) of EXTENT/WIDTH])

(NEW.LOCATION2
  [LAMBDA (L1 L2)                                            (* DAHJr "23-FEB-82 18:31")
    (create LOCATION2
	    X1 ←(fetch (LOCATION X) of L1)
	    Y1 ←(fetch (LOCATION Y) of L1)
	    X2 ←(fetch (LOCATION X) of L2)
	    Y2 ←(fetch (LOCATION Y) of L2])

(NEW.POSITION2
  [LAMBDA (P1 P2)                                            (* DAHJr "23-FEB-82 18:31")
    (create POSITION2
	    XCOORD1 ←(fetch (POSITION XCOORD) of P1)
	    YCOORD1 ←(fetch (POSITION YCOORD) of P1)
	    XCOORD2 ←(fetch (POSITION XCOORD) of P2)
	    YCOORD2 ←(fetch (POSITION YCOORD) of P2])

(NEW.REGION
  [LAMBDA (POSITION EXTENT/WIDTH HEIGHT)                     (* edited: "25-MAY-82 17:39")
    (create REGION
	    LEFT ←(fetch (POSITION XCOORD) of POSITION)
	    BOTTOM ←(fetch (POSITION YCOORD) of POSITION)
	    WIDTH ←(COND
	      ((NUMBERP EXTENT/WIDTH)
		EXTENT/WIDTH)
	      (T (fetch (POSITION XCOORD) of EXTENT/WIDTH)))
	    HEIGHT ←(COND
	      ((NUMBERP EXTENT/WIDTH)
		HEIGHT)
	      (T (fetch (POSITION YCOORD) of EXTENT/WIDTH])

(PICTURE.CENTER
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 14:49")
    (PROG [(POS (GET.PARAMQ ITEM PLACEMENT PICTURE))
	   (BITMAP (FIND.BITMAP (GET.PARAMQ ITEM BITMAP]
          (RETURN (NEW.POSITION (IPLUS (fetch (POSITION XCOORD) of POS)
				       (IQUOTIENT (fetch (BITMAP BITMAPWIDTH) of BITMAP)
						  2))
				(IPLUS (fetch (POSITION YCOORD) of POS)
				       (IQUOTIENT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)
						  2])

(PICTURE.HEIGHT
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 14:49")
    (fetch (BITMAP BITMAPHEIGHT) of (FIND.BITMAP (GET.PARAMQ ITEM BITMAP])

(PICTURE.WIDTH
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 14:49")
    (fetch (BITMAP BITMAPWIDTH) of (FIND.BITMAP (GET.PARAMQ ITEM BITMAP])

(PTRANSLATE
  [LAMBDA (PLACEMENT OFFSET/DELTAX DELTAY)                   (* HK " 9-JUL-82 17:22")
    (PROG (DX DY)
          [COND
	    ((NUMBERP OFFSET/DELTAX)
	      (SETQ DX OFFSET/DELTAX)
	      (SETQ DY DELTAY))
	    (T (SETQ DX (fetch (POSITION XCOORD) of OFFSET/DELTAX))
	       (SETQ DY (fetch (POSITION YCOORD) of OFFSET/DELTAX]
          (RETURN (COND
		    [(NLISTP (CDR PLACEMENT))
		      (create POSITION
			      XCOORD ←(IPLUS DX (fetch (POSITION XCOORD) of PLACEMENT))
			      YCOORD ←(IPLUS DY (fetch (POSITION YCOORD) of PLACEMENT]
		    [(LISTP (CDDDDR PLACEMENT))
		      (create POSITION2
			      XCOORD1 ←(IPLUS DX (fetch (POSITION2 XCOORD1) of PLACEMENT))
			      YCOORD1 ←(IPLUS DY (fetch (POSITION2 YCOORD1) of PLACEMENT))
			      XCOORD2 ←(IPLUS DX (fetch (POSITION2 XCOORD2) of PLACEMENT))
			      YCOORD2 ←(IPLUS DY (fetch (POSITION2 YCOORD2) of PLACEMENT]
		    (T (create REGION
			       LEFT ←(IPLUS DX (fetch (REGION LEFT) of PLACEMENT))
			       BOTTOM ←(IPLUS DY (fetch (REGION BOTTOM) of PLACEMENT))
			       WIDTH ←(fetch (REGION WIDTH) of PLACEMENT)
			       HEIGHT ←(fetch (REGION HEIGHT) of PLACEMENT])

(RANDOM.REGION
  [LAMBDA NIL                                                (* DAHJr "20-JAN-83 10:16")
    (create REGION
	    LEFT ←(RAND 100 300)
	    BOTTOM ←(RAND 100 300)
	    WIDTH ←(RAND 50 100)
	    HEIGHT ←(RAND 50 100])

(REGION.HEIGHT
  [LAMBDA (REGION)
    (fetch (REGION HEIGHT) of REGION])

(REGION.WIDTH
  [LAMBDA (REGION)
    (fetch (REGION WIDTH) of REGION])

(TRANSLATE
  [LAMBDA (PLACEMENT OFFSET/DELTAX DELTAY)                   (* DAHJr " 5-DEC-83 10:26")
    (DECLARE (GLOBALVARS TRILLIUM.GRID.DX TRILLIUM.GRID.DY))
    (PROG (DX DY)
          [COND
	    ((NUMBERP OFFSET/DELTAX)
	      (SETQ DX (XDIST OFFSET/DELTAX))
	      (SETQ DY (YDIST DELTAY)))
	    (T (SETQ DX (XDIST (fetch (LOCATION X) of OFFSET/DELTAX)))
	       (SETQ DY (YDIST (fetch (LOCATION Y) of OFFSET/DELTAX]
          (RETURN (COND
		    [(NLISTP (CDR PLACEMENT))
		      (create LOCATION
			      X ←(IPLUS DX (fetch (LOCATION X) of PLACEMENT))
			      Y ←(IPLUS DY (fetch (LOCATION Y) of PLACEMENT]
		    [(LISTP (CDDDDR PLACEMENT))
		      (create LOCATION2
			      X1 ←(IPLUS DX (fetch (LOCATION2 X1) of PLACEMENT))
			      Y1 ←(IPLUS DY (fetch (LOCATION2 Y1) of PLACEMENT))
			      X2 ←(IPLUS DX (fetch (LOCATION2 X2) of PLACEMENT))
			      Y2 ←(IPLUS DY (fetch (LOCATION2 Y2) of PLACEMENT]
		    (T (create GRIDREGION
			       LEFT ←(IPLUS DX (fetch (GRIDREGION LEFT) of PLACEMENT))
			       BOTTOM ←(IPLUS DY (fetch (GRIDREGION BOTTOM) of PLACEMENT))
			       WIDTH ←(fetch (GRIDREGION WIDTH) of PLACEMENT)
			       HEIGHT ←(fetch (GRIDREGION HEIGHT) of PLACEMENT])

(UPDATE&DISPLAY.FRAME
  [LAMBDA (FRAME ITEM/S OLD.POSITION A.BUNCH)                (* edited: " 6-May-84 17:18")
    (DECLARE (GLOBALVARS CURRENT.DSP CURRENT.INTERFACE DISPLAY.CHANGED.ITEM.ONLY))
    (PROG (NEW.ITEMS BACKGROUND.COLOR REPRESENTATIVE.GRAY)
          (MARK.6LISTS.OBSOLETE FRAME)
          (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
          (MARK.INTERFACE CURRENT.INTERFACE)
          (COND
	    ((AND ITEM/S DISPLAY.CHANGED.ITEM.ONLY)

          (* * THE IDEA HERE IS TO DO THE MINIMAL WORK TO ALLOW THE DESIGNER TO CONTINUE DESIGNING. IT NEEDN'T BE RIGHT, AS 
	  ANALYZE.FRAME CAN BE EMPLOYED TO CLEAN IT UP.)


	      (COND
		(OLD.POSITION (SETQ BACKGROUND.COLOR (GET.FIELDQ CURRENT.INTERFACE BACKGROUND.COLOR))
			      (SETQ REPRESENTATIVE.GRAY (FIND.REPRESENTATIVE.GRAY BACKGROUND.COLOR))
			      (BITBLT NIL NIL NIL CURRENT.DSP (fetch (REGION LEFT) of OLD.POSITION)
				      (fetch (REGION BOTTOM) of OLD.POSITION)
				      (fetch (REGION WIDTH) of OLD.POSITION)
				      (fetch (REGION HEIGHT) of OLD.POSITION)
				      (QUOTE TEXTURE)
				      (QUOTE REPLACE)
				      REPRESENTATIVE.GRAY)))
	      [SETQ NEW.ITEMS (COND
		  (A.BUNCH ITEM/S)
		  ((EQ ITEM/S (QUOTE IGNORE))
		    NIL)
		  (T (LIST ITEM/S]
	      (for ITEM in NEW.ITEMS do (SELECTQ (ITEM.KIND ITEM)
						 (COMPOSITE (for SUBITEM in (GET.FIELDQ ITEM SUBITEMS)
							       when (MEMB (ITEM.KIND SUBITEM)
									  (QUOTE (ARTWORK DISPLAYER)))
							       do (SHOW.ITEM SUBITEM)))
						 ((ARTWORK DISPLAYER)
						   (SHOW.ITEM ITEM))
						 NIL))
	      (for ITEM in NEW.ITEMS do (SELECTQ (ITEM.KIND ITEM)
						 (COMPOSITE (for SUBITEM in (GET.FIELDQ ITEM SUBITEMS)
							       when (EQ (ITEM.KIND SUBITEM)
									(QUOTE DISPLAYER))
							       do (DISPLAY.ITEM SUBITEM FRAME)))
						 (DISPLAYER (DISPLAY.ITEM ITEM FRAME))
						 NIL)))
	    (T (DISPLAY.FRAME FRAME])
)
(PUTPROPS TRI-ANALYZE COPYRIGHT ("Xerox Corporation" 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1056 19735 (ANALYZE&COMPLETE.ITEM 1066 . 1367) (ANALYZE.AND.ADD 1369 . 1664) (
ANALYZE.FRAME 1666 . 2265) (ANALYZE.FRAME.IF.NECESSARY 2267 . 2551) (ANALYZE.FRAME.IF.NECESSARY* 2553
 . 3174) (ANALYZE.INTERFACE 3176 . 3715) (ANALYZE.ITEM 3717 . 4691) (ANALYZE.UNDEFINED 4693 . 5166) (
BOUNDING.BOX 5168 . 5790) (BOUNDING.BOX.FOR.BUTTON 5792 . 6208) (BOUNDING.BOX.FOR.NUMBER.BUTTON 6210
 . 6543) (BOUNDING.BOX.FOR.SEGMENTS 6545 . 6773) (BOUNDING.BOX.UNDEFINED 6775 . 6949) (
COERCE.BOUNDING.BOX 6951 . 7678) (COMPOSITE.BOUNDING.BOX 7680 . 9433) (DEFAULT.BOUNDING.BOX.FN 9435 . 
9604) (FIND.FONT 9606 . 9936) (FONT.HEIGHT 9938 . 10029) (FORM.GET.CALL 10031 . 10423) (
FORM.GET.MSF.NAME 10425 . 10890) (FORM.GET.REFERENCE.VALUE 10892 . 11036) (MAKE.ITEM.NAMES 11038 . 
11865) (MARK.6LISTS.OBSOLETE 11867 . 12020) (NEW.GRIDREGION 12022 . 12673) (NEW.LOCATION2 12675 . 
12989) (NEW.POSITION2 12991 . 13345) (NEW.REGION 13347 . 13844) (PICTURE.CENTER 13846 . 14355) (
PICTURE.HEIGHT 14357 . 14551) (PICTURE.WIDTH 14553 . 14745) (PTRANSLATE 14747 . 16015) (RANDOM.REGION 
16017 . 16259) (REGION.HEIGHT 16261 . 16345) (REGION.WIDTH 16347 . 16429) (TRANSLATE 16431 . 17747) (
UPDATE&DISPLAY.FRAME 17749 . 19733)))))
STOP