(FILECREATED "19-Nov-84 17:00:10" {AZTEC}<TRILLIUM>BIRTHDAY84>RERELEASE>TRI-WINDOWS.;2 57779  

      changes to:  (FNS CONTROL.WINDOW.WHENSELECTEDFN GET.CONTROL.WINDOW.COMMAND.MENU 
			PROFILE.EDITOR.TITLECOMMANDFN)

      previous date: "10-Sep-84 09:51:13" {AZTEC}<TRILLIUM>BIRTHDAY84>RERELEASE>TRI-WINDOWS.;1)


(* Copyright (c) 1984 by Xerox Corporation)

(PRETTYCOMPRINT TRI-WINDOWSCOMS)

(RPAQQ TRI-WINDOWSCOMS ((FNS ADD.DEPENDENT.WINDOW ADJUST.INTERFACE.WINDOWS.COUNT 
			     CLOSE.DEPENDENT.WINDOWS CONTROL.WINDOW.CREATE CONTROL.WINDOW.HELPFN 
			     CONTROL.WINDOW.WHENSELECTEDFN CONTROL.WINDOW.WHENSELECTEDFN.REFER 
			     DELETE.DEPENDENT.WINDOW DELETE.DEPENDENT.WINDOWS DEPENDENT.WINDOWS 
			     EDIT.WINDOW.CREATE EDIT.WINDOW.FETCHFN EDIT.WINDOW.GET.NEW.VALUE 
			     EDIT.WINDOW.MAKE.CHANGES EDIT.WINDOW.PROPCOMMANDFN 
			     EDIT.WINDOW.PROPERTIES EDIT.WINDOW.STOREFN EDIT.WINDOW.TITLE 
			     EDIT.WINDOW.TITLECOMMANDFN EDIT.WINDOW.VALUECOMMANDFN 
			     EDIT.WINDOW.VALUECOMMANDFN.REFER EXPOSE.ITEM.EDITORS FIX.PROC 
			     FRAME.GRAPH.WINDOW.LEFTBUTTONFN GET.CHECK.DIALOG.MENU 
			     GET.CONTROL.WINDOW.COMMAND.MENU GET.EDIT.WINDOW.VALUECOMMAND.MENU 
			     GET.FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU 
			     GET.PROFILE.EDITOR.TITLECOMMANDFN.MENU GRAPH.FRAMES.FRIENDS.SONS 
			     GRAPH.LEFTBUTTONFN GRAPH.MIDDLEBUTTONFN GRAPH.WINDOW.CURSORINFN 
			     GRAY.WINDOW INTERFACE.WINDOW.BUTTONEVENTFN 
			     INTERFACE.WINDOW.BUTTONEVENTFN.REFER INTERFACE.WINDOW.CHANGE.TITLE 
			     INTERFACE.WINDOW.CLOSEFN INTERFACE.WINDOW.CREATE 
			     INTERFACE.WINDOW.LEFTBUTTONFN INTERFACE.WINDOW.LOWERLEFT 
			     INTERFACE.WINDOW.REPAINTFN INTERFACE.WINDOW.RESHAPEFN 
			     ITEM.TYPE.GRAPH.SPEC.FN1 ITEM.TYPE.GRAPH.SPEC.FN2 
			     ITEM.TYPE.GRAPH.SPEC.FN3 ITEM.TYPE.GRAPH.SPEC.FN4 
			     ITEM.TYPE.GRAPH.SPEC.FN5 ITEM.TYPE.WINDOW.CREATE 
			     ITEM.TYPE.WINDOW.LEFTBUTTONFN ITEM.TYPE.WINDOW.MIDDLEBUTTONFN 
			     MAKE.TRILLIUM.ICON OPEN.DEPENDENT.WINDOWS PROFILE.EDITOR.CREATE 
			     PROFILE.EDITOR.MAKE.CHANGES PROFILE.EDITOR.TITLECOMMANDFN 
			     PROFILE.EDITOR.VALUECOMMANDFN PROFILE.EDITOR.VALUECOMMANDFN.REFER 
			     PROPLIST.WINDOW.CREATE PROPLIST.WINDOW.PROPCOMMANDFN 
			     PROPLIST.WINDOW.PROPCOMMANDFN.REFER PROPLIST.WINDOW.PROPERTIES 
			     PROPLIST.WINDOW.TITLE PROPLIST.WINDOW.TITLECOMMANDFN 
			     PROPLIST.WINDOW.VALUECOMMANDFN PROPLIST.WINDOW.VALUECOMMANDFN.REFER 
			     TRILLIUM TRILLIUM.HANDLE.REFERRALS TRILLIUM.MAKE.REFERRAL 
			     TRILLIUM.RESET.REFERRALS WINDOW.DEPENDED.UPON)
	(UGLYVARS TRILLIUM.DESIGNER.MODE.BITMAP TRILLIUM.OPERATOR.MODE.BITMAP)
	(VARS ITEM.TYPE.GRAPH.SPEC (TRILLIUM.ICON.LOCATION (CREATEREGION 607 515 10 10))
	      (INTERFACE.WINDOWS.COUNT 0)
	      (PROFILE.EDITOR.TITLECOMMANDFN.MENU)
	      (TRILLIUM.MODE T)
	      (FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU)
	      (TRILLIUM.PROCESS)
	      (TRILLIUM.REFERRAL.FORM)
	      (CONTROL.WINDOW.COMMAND.MENU)
	      (EDIT.WINDOW.VALUECOMMAND.MENU))))
(DEFINEQ

(ADD.DEPENDENT.WINDOW
  [LAMBDA (WINDOW DEPENDENT.WINDOW)                          (* DAHJr " 3-AUG-83 08:29")
    (WINDOWPROP WINDOW (QUOTE DEPENDENT.WINDOWS)
		(NCONC1 (WINDOWPROP WINDOW (QUOTE DEPENDENT.WINDOWS))
			DEPENDENT.WINDOW))                   (* CIRCULAR STRUCTURE BROKEN UP BY 
							     DELETE.DEPENDENT.WINDOW)
    (WINDOWPROP DEPENDENT.WINDOW (QUOTE WINDOW.DEPENDED.UPON)
		WINDOW])

(ADJUST.INTERFACE.WINDOWS.COUNT
  [LAMBDA (OPEN/CLOSE.ACTION)
    (DECLARE (GLOBALVARS INTERFACE.WINDOWS.COUNT))           (* dls "12-MAR-84 09:55")
    (SELECTQ OPEN/CLOSE.ACTION
	     (OPEN (add INTERFACE.WINDOWS.COUNT 1))
	     (CLOSE (AND (IGREATERP INTERFACE.WINDOWS.COUNT 0)
			 (add INTERFACE.WINDOWS.COUNT -1)))
	     (SHOULDNT "Unrecognized argument!  OPEN or CLOSE only"])

(CLOSE.DEPENDENT.WINDOWS
  [LAMBDA (WINDOW)                                           (* DAHJr " 3-AUG-83 08:28")
    (for W in (DEPENDENT.WINDOWS WINDOW) do (CLOSEW W])

(CONTROL.WINDOW.CREATE
  [LAMBDA (POSITION)                                         (* HaKo "25-Jul-84 17:35")
    (DECLARE (GLOBALVARS CONTROL.WINDOW.ICON LASTMOUSEX LASTMOUSEY SCREENHEIGHT SCREENWIDTH 
			 TRILLIUM.BITMAP TRILLIUM.VERSION))
    (PROG (REGION WINDOW MENU POS TX TY BMW BMH WIDTH HEIGHT)
          (SETQ MENU (GET.CONTROL.WINDOW.COMMAND.MENU))      (* PROCESSED BY CONTROL.WINDOW.WHENSELECTEDFN)
          (SETQ TX (fetch (MENU IMAGEWIDTH) of MENU))
          (SETQ TY (fetch (MENU IMAGEHEIGHT) of MENU))
          (SETQ BMW (fetch (BITMAP BITMAPWIDTH) of TRILLIUM.BITMAP))
          (SETQ BMH (fetch (BITMAP BITMAPHEIGHT) of TRILLIUM.BITMAP))
          (SETQ WIDTH (IPLUS 12 TX BMW))
          (SETQ HEIGHT (IPLUS 20 TY))
          (COND
	    (POSITION)
	    (T (GETMOUSESTATE)))
          (SETQ REGION (create REGION
			       LEFT ←[MAX 0 (MIN (IDIFFERENCE SCREENWIDTH WIDTH)
						 (COND
						   (POSITION (fetch (POSITION XCOORD) of POSITION))
						   (T LASTMOUSEX]
			       BOTTOM ←[MAX 0 (MIN (IDIFFERENCE SCREENHEIGHT HEIGHT)
						   (COND
						     (POSITION (fetch (POSITION YCOORD) of POSITION))
						     (T LASTMOUSEY]
			       WIDTH ← WIDTH
			       HEIGHT ← HEIGHT))
          (SETQ WINDOW (CREATEW REGION (CONCAT "Trillium of " TRILLIUM.VERSION ": control window")))
          (ADDMENU MENU WINDOW (CONS (IPLUS BMW 4)
				     0))
          (BITBLT TRILLIUM.BITMAP 0 0 WINDOW 0 (IQUOTIENT (IDIFFERENCE TY BMH)
							  2)
		  BMW BMH (QUOTE INPUT)
		  (QUOTE PAINT))
          (WINDOWPROP WINDOW (QUOTE RESHAPEFN)
		      (QUOTE DON'T))
          (WINDOWPROP WINDOW (QUOTE ICON)
		      CONTROL.WINDOW.ICON)
          (COND
	    (POSITION)
	    (T (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Position this Trillium Control Window.")
	       (MOVEW WINDOW)))
          (RETURN])

(CONTROL.WINDOW.HELPFN
  [LAMBDA (ITEM MENU BUTTON)                                 (* HaKo "25-Jul-84 17:35")
    (PROG (MESSAGE)
          (SETQ MESSAGE (SELECTQ ITEM
				 (SELECT.DIALOG "Will provide a menu of dialog names to select from")
				 (SPAWN 
				"Open a DIALOG window an run the currently selected dialog in it")
				 (EDIT 
	      "Will provide another menu which will permit editing the currently selected dialog")
				 (CREATE.NEW.DIALOG 
			      "Will prompt for a name and then create a new ialog with that name")
				 (COPY 
    "Will prompt for a name and then make a copy of the currently selected dialog with that name")
				 (DELETE 
				"Open a DIALOG window an run the currently selected dialog in it")
				 (SHOULDNT)))
          (TRILLIUM.PRINTOUT ON PROMPTWINDOW MESSAGE])

(CONTROL.WINDOW.WHENSELECTEDFN
  [LAMBDA (WINDOW COMMAND)                                   (* kkm "19-Nov-84 13:49")
                                                             (* edited: " 6-May-84 14:21")
    (DECLARE (GLOBALVARS COLOR.AVAILABLE TRILLIUM.BILLBOARD.SHOWING))
    (PROG (INTERFACE.NAME INTERFACE.NAME.2)
          (AND (EQUAL COMMAND " ")
	       (RETURN))
          (SELECTQ COMMAND
		   (NIL NIL)
		   [DISPLAY.BILLBOARD (THINKING (COND
						  (TRILLIUM.BILLBOARD.SHOWING (CLOSE.HEADLINES)
									      (SETQ 
								       TRILLIUM.BILLBOARD.SHOWING))
						  (T (TRILLIUM.BILLBOARD)
						     (SETQ TRILLIUM.BILLBOARD.SHOWING T]
		   (SETUP.EVENT.MODE (SETUP.EVENT.MODE))
		   (CREATE.NEW.INTERFACE (SETQ INTERFACE.NAME (CREATE.NEW.INTERFACE)))
		   [OPEN.WINDOW.FOR.INTERFACE (SETQ INTERFACE.NAME (ACQUIRE.INTERFACE.NAME))
					      (COND
						(INTERFACE.NAME (INTERFACE.WINDOW.CREATE
								  (FIND.INTERFACE INTERFACE.NAME]
		   [COPY.INTERFACE (SETQ INTERFACE.NAME (ACQUIRE.INTERFACE.NAME))
				   (COND
				     (INTERFACE.NAME (SETQ INTERFACE.NAME (COPY.INTERFACE
							 (FIND.INTERFACE INTERFACE.NAME]
		   (RENAME.INTERFACE (RENAME.INTERFACE))
		   [MERGE.INTERFACE (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Merging interfaces")
				    (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Extend which interface?")
				    (SETQ INTERFACE.NAME (ACQUIRE.INTERFACE.NAME))
				    (COND
				      (INTERFACE.NAME (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE 
									 1 INTERFACE.NAME)
						      (TRILLIUM.PRINTOUT ON PROMPTWINDOW 
								 "By merging in which interface?")
						      (SETQ INTERFACE.NAME.2 (ACQUIRE.INTERFACE.NAME))
						      (COND
							(INTERFACE.NAME.2
							  (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE 
									     SAME.LINE 1 
									     INTERFACE.NAME.2)
							  (COND
							    ((CONFIRM (CONCAT "Merge " 
									      INTERFACE.NAME.2 
									      " into "
									      INTERFACE.NAME "?"))
							      (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE 
									     "Merging interface "
										 INTERFACE.NAME.2 
									       " into interface "
										 INTERFACE.NAME)
							      (THINKING (MERGE.INTERFACE
									  (FIND.INTERFACE 
										   INTERFACE.NAME)
									  (FIND.INTERFACE 
										 INTERFACE.NAME.2)))
							      (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE 
										 "Interface "
										 INTERFACE.NAME.2 
									" merged into interface "
										 INTERFACE.NAME]
		   [DELETE.INTERFACE (SETQ INTERFACE.NAME (ACQUIRE.INTERFACE.NAME))
				     (COND
				       ((AND INTERFACE.NAME (CONFIRM (CONCAT 
									"Delete interface named "
									     INTERFACE.NAME "?")))
					 (DELETE.INTERFACE INTERFACE.NAME]
		   (EDIT.ITEM.TYPES (EDIT.ITEM.TYPES))
		   (EDIT.USER.PROFILE (EDIT.PROFILE))
		   (LOADING.&.MAKING.FILES (LOADING.&.SAVING))
		   (TURN.COLOR.ON.OR.OFF (COND
					   (COLOR.AVAILABLE (COLOR.ON.OFF))
					   (T TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS T 
					      "Can't!  Color not available!"
					      T)))
		   (SHOULDNT])

(CONTROL.WINDOW.WHENSELECTEDFN.REFER
  [LAMBDA (ITEM MENU BUTTON)                                 (* DAHJr "22-JUN-83 21:04")
    (PROG (WINDOW COMMAND)
          (SETQ WINDOW (WFROMMENU MENU))
          (SETQ COMMAND (CAR ITEM))
          (TRILLIUM.MAKE.REFERRAL (LIST (QUOTE CONTROL.WINDOW.WHENSELECTEDFN)
					(KWOTE WINDOW)
					(KWOTE COMMAND])

(DELETE.DEPENDENT.WINDOW
  [LAMBDA (WINDOW DEPENDENT.WINDOW)                          (* DAHJr " 3-AUG-83 08:30")
    [WINDOWPROP WINDOW (QUOTE DEPENDENT.WINDOWS)
		(DREMOVE DEPENDENT.WINDOW (WINDOWPROP WINDOW (QUOTE DEPENDENT.WINDOWS]
    (WINDOWPROP DEPENDENT.WINDOW (QUOTE WINDOW.DEPENDED.UPON)
		NIL])

(DELETE.DEPENDENT.WINDOWS
  [LAMBDA (WINDOW ALL.THE.WAY.DOWN)                          (* DAHJr " 3-AUG-83 08:40")
    (for W in (APPEND (DEPENDENT.WINDOWS WINDOW))
       do (DELETE.DEPENDENT.WINDOW WINDOW W)
	  (COND
	    (ALL.THE.WAY.DOWN (DELETE.DEPENDENT.WINDOWS W T])

(DEPENDENT.WINDOWS
  [LAMBDA (WINDOW)                                           (* DAHJr "23-APR-83 09:58")
    (WINDOWPROP WINDOW (QUOTE DEPENDENT.WINDOWS])

(EDIT.WINDOW.CREATE
  [LAMBDA (ITEM WINDOW.DEPENDED.UPON)                        (* HaKo "25-Jul-84 17:38")
    (PROG (WINDOW)
          (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Indicate a location for a new ITEM EDITOR (window)")
          (SETQ WINDOW (INSPECTW.CREATE ITEM (FUNCTION EDIT.WINDOW.PROPERTIES)
					(FUNCTION EDIT.WINDOW.FETCHFN)
					(FUNCTION EDIT.WINDOW.STOREFN)
					(FUNCTION EDIT.WINDOW.PROPCOMMANDFN)
					(FUNCTION EDIT.WINDOW.VALUECOMMANDFN.REFER)
					(FUNCTION EDIT.WINDOW.TITLECOMMANDFN)
					(EDIT.WINDOW.TITLE ITEM)))
          (WINDOWPROP WINDOW (QUOTE TRILLIUM.WINDOW.TYPE)
		      (QUOTE ITEM.EDITOR))
          (ADD.DEPENDENT.WINDOW WINDOW.DEPENDED.UPON WINDOW)
          (RETURN WINDOW])

(EDIT.WINDOW.FETCHFN
  [LAMBDA (ITEM FIELD)                                       (* HaKo "27-Jul-84 16:54")
    (COND
      ((EQUAL FIELD (QUOTE ITEM.TYPE))
	(ITEM.TYPE ITEM))
      (T (PROG (VALUE)
	       (RETURN (COND
			 ((ITEMP (SETQ VALUE (GET.PARAM ITEM FIELD)))
			   (INDEFINITE (ITEM.TYPE VALUE)))
			 (T VALUE])

(EDIT.WINDOW.GET.NEW.VALUE
  [LAMBDA (VALUE FIELD ITEM EDIT.WINDOW PTYPE)               (* HaKo "17-Aug-84 14:48")
                                                             (* "Top level of the editor")
    (DECLARE (GLOBALVARS CONFIRM.VALUE.CHANGES TRILLIUM.SAVED.VALUE))
    (PROG (NEW.TYPE COMMAND.MENU COMMAND OLD.VALUE NEW.VALUE EXPRESSION EDIT.WINDOW.FOR.OLD.VALUE)
          (TRILLIUM.CLEAR.ALL.PROMPTING)
          (SETQ COMMAND.MENU (GET.EDIT.WINDOW.VALUECOMMAND.MENU))
          (SETQ COMMAND (MENU COMMAND.MENU))
          (SETQ OLD.VALUE (GET.PARAM ITEM FIELD))
          (SELECTQ COMMAND
		   (NIL (SETQ NEW.VALUE (QUOTE $$DONOTHING$$)))
		   [CREATE.NEW.VALUE (SETQ NEW.VALUE (OR (CREATE.OBJECT PTYPE FIELD ITEM)
							 (QUOTE $$DONOTHING$$]
		   [EDIT.EXISTING.VALUE (COND
					  ((ITEMP OLD.VALUE)
					    (COND
					      ((NULL (LISTGET ITEM FIELD))
                                                             (* COPY DEFAULT ON EDIT SO DON'T DAMAGE DEFAULT)
						(SETQ OLD.VALUE (COPYALL OLD.VALUE))
						(INSPECTW.REPLACE EDIT.WINDOW FIELD OLD.VALUE)))
					    (EDIT.WINDOW.OPEN OLD.VALUE EDIT.WINDOW)
					    (SETQ NEW.VALUE (QUOTE $$DONOTHING$$)))
					  (T [COND
					       ((NULL (LISTGET ITEM FIELD))
                                                             (* COPY DEFAULT ON EDIT SO DON'T DAMAGE DEFAULT)
						 (SETQ OLD.VALUE (COPYALL OLD.VALUE]
					     (SETQ NEW.VALUE (OR (EDIT.OBJECT OLD.VALUE PTYPE FIELD 
									      ITEM)
								 (QUOTE $$DONOTHING$$]
		   (USE.DEFAULT.VALUE (SETQ NEW.VALUE NIL))
		   [USE.EXPRESSION.VALUE (TRILLIUM.PRINTOUT ON PROMPTWINDOW 
				     "Expression to be EVAL'd to get new value of characteristic"
							    T "Expression: ")
					 (SETQ EXPRESSION (PROMPT.READ))
					 (COND
					   (EXPRESSION (SETQ NEW.VALUE (TRILLIUM.EVAL EXPRESSION)))
					   (T (SETQ NEW.VALUE (QUOTE $$DONOTHING$$]
		   [USE.SAVED.VALUE (COND
				      (TRILLIUM.SAVED.VALUE (SETQ NEW.VALUE (COPYALL 
									     TRILLIUM.SAVED.VALUE)))
				      (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "No saved value")
					 (SETQ NEW.VALUE (QUOTE $$DONOTHING$$]
		   (SAVE.VALUE (SETQ TRILLIUM.SAVED.VALUE (COPYALL VALUE))
			       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Value saved")
			       (SETQ NEW.VALUE (QUOTE $$DONOTHING$$)))
		   (INSPECT.VALUE (INSPECT VALUE)
				  (SETQ NEW.VALUE (QUOTE $$DONOTHING$$)))
		   (SHOULDNT))
          (RETURN (COND
		    ((AND (NEQ NEW.VALUE (QUOTE $$DONOTHING$$))
			  (OR (NULL CONFIRM.VALUE.CHANGES)
			      (CONFIRM "Change value?" T)))
		      [COND
			((AND (SETQ OLD.VALUE (LISTGET ITEM FIELD))
			      (ITEMP OLD.VALUE)
			      (NEQ OLD.VALUE NEW.VALUE))     (* CLEAN UP OLD ITEM)
			  [SETQ EDIT.WINDOW.FOR.OLD.VALUE (for WINDOW in (DEPENDENT.WINDOWS 
										      EDIT.WINDOW)
							     thereis
							      (AND (EQ (WINDOWPROP WINDOW
										   (QUOTE 
									     TRILLIUM.WINDOW.TYPE))
								       (QUOTE ITEM.EDITOR))
								   (EQ OLD.VALUE (WINDOWPROP
									 WINDOW
									 (QUOTE DATUM]
			  (COND
			    (EDIT.WINDOW.FOR.OLD.VALUE (DELETE.DEPENDENT.WINDOW EDIT.WINDOW 
									EDIT.WINDOW.FOR.OLD.VALUE)
						       (CLOSEW EDIT.WINDOW.FOR.OLD.VALUE]
		      (INSPECTW.REPLACE EDIT.WINDOW FIELD NEW.VALUE)
		      (INSPECTW.REDISPLAY EDIT.WINDOW)
		      T)
		    (T NIL])

(EDIT.WINDOW.MAKE.CHANGES
  [LAMBDA (WINDOW)                                           (* edited: " 6-May-84 16:46")
    (PROG (WINDOW.DEPENDED.UPON ITEM FRAME OLD.POSITION)
          (THINKING (INSPECTW.REDISPLAY WINDOW)
		    (SETQ ITEM (WINDOWPROP WINDOW (QUOTE DATUM)))
		    (SETQ WINDOW.DEPENDED.UPON (WINDOW.DEPENDED.UPON WINDOW))
		    (COND
		      ((NEQ (WINDOWPROP WINDOW.DEPENDED.UPON (QUOTE TRILLIUM.WINDOW.TYPE))
			    (QUOTE INTERFACE.WINDOW))        (* ITEM IS PART OF ANOTHER ITEM)
			(EDIT.WINDOW.MAKE.CHANGES WINDOW.DEPENDED.UPON))
		      (T                                     (* TOP LEVEL ITEM)
			 (SETQ FRAME (WINDOWPROP WINDOW.DEPENDED.UPON (QUOTE CURRENT.FRAME)))
			 (SETQ OLD.POSITION (BOUNDING.BOX ITEM))
			 (ANALYZE&COMPLETE.ITEM ITEM)
			 (UPDATE&DISPLAY.FRAME FRAME ITEM OLD.POSITION)))
		    (TOTOPW WINDOW])

(EDIT.WINDOW.PROPCOMMANDFN
  [LAMBDA (FIELD ITEM WINDOW)                                (* HaKo "16-Aug-84 16:47")
                                                             (* "Top level of the editor")
    (PROG (DESCRIPTION PARAMETER (ITYPE (ITEM.TYPE ITEM)))
          (TRILLIUM.CLEAR.ALL.PROMPTING)
          (COND
	    ((EQ FIELD (QUOTE ITEM.TYPE))
	      (SETQ DESCRIPTION (ITEM.TYPE.DESCRIPTION ITYPE))
	      (SELECTQ (MENU (create MENU
				     ITEMS ←(QUOTE (COMMENT))
				     CENTERFLG ← T
				     CHANGEOFFSETFLG ← T))
		       (NIL NIL)
		       (COMMENT (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS ITYPE "; comment: "
						   (GET.FIELDQ DESCRIPTION COMMENT)))
		       (SHOULDNT)))
	    (T (SETQ PARAMETER (ITEM.TYPE.PARAMETER ITYPE FIELD))
	       (SELECTQ (MENU (create MENU
				      ITEMS ←(QUOTE (COMMENT TYPE DEFAULT))
				      CENTERFLG ← T
				      CHANGEOFFSETFLG ← T))
			(NIL NIL)
			(COMMENT (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS FIELD " of " ITYPE 
						    "; comment: "
						    (GET.FIELDQ PARAMETER COMMENT)))
			(TYPE (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS FIELD " of " ITYPE 
						 "; field type: "
						 (GET.FIELDQ PARAMETER TYPE)))
			(DEFAULT (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS FIELD " of " ITYPE 
						    "; default value: "
						    (GET.FIELDQ PARAMETER DEFAULT)))
			(SHOULDNT])

(EDIT.WINDOW.PROPERTIES
  [LAMBDA (ITEM)                                             (* edited: "11-MAR-82 12:53")
    (CONS (QUOTE ITEM.TYPE)
	  (ITEM.TYPE.PARAMETER.NAMES (ITEM.TYPE ITEM])

(EDIT.WINDOW.STOREFN
  [LAMBDA (ITEM FIELD NEW.VALUE)
    (SET.FIELD ITEM FIELD NEW.VALUE])

(EDIT.WINDOW.TITLE
  [LAMBDA (ITEM)                                             (* edited: "11-MAR-82 10:01")
    (CONCAT "Item editor: " (ITEM.TYPE ITEM)
	    "        MAKE.CHANGES"])

(EDIT.WINDOW.TITLECOMMANDFN
  [LAMBDA (WINDOW ITEM)                                      (* DAHJr "19-JAN-83 17:50")
                                                             (* "Top level of the editor")
    (TRILLIUM.CLEAR.ALL.PROMPTING)
    (EDIT.WINDOW.MAKE.CHANGES WINDOW])

(EDIT.WINDOW.VALUECOMMANDFN
  [LAMBDA (VALUE FIELD ITEM WINDOW)                          (* HaKo "27-Jul-84 16:55")
                                                             (* "Top level of the editor")
    (DECLARE (GLOBALVARS AUTO.MAKE.CHANGES.FLG CURRENT.INTERFACE))
    (PROG (NEW.TYPE CHANGE.MADE)
          (TRILLIUM.CLEAR.ALL.PROMPTING)
          [COND
	    [(EQ FIELD (QUOTE ITEM.TYPE))
	      (SETQ NEW.TYPE (ACQUIRE.ITEM.TYPE))
	      (COND
		(NEW.TYPE (SET.FIELDQ ITEM \TYPE NEW.TYPE)
			  (INSPECTW.REDISPLAY WINDOW]
	    (T (SETQ CHANGE.MADE (EDIT.WINDOW.GET.NEW.VALUE (GET.PARAM ITEM FIELD)
							    FIELD ITEM WINDOW (
							      ITEM.TYPE.PARAMETER.TYPE (ITEM.TYPE
											 ITEM)
										       FIELD)))
	       (COND
		 ((AND CHANGE.MADE AUTO.MAKE.CHANGES.FLG)
		   (EDIT.WINDOW.MAKE.CHANGES WINDOW)
		   (MARK.INTERFACE CURRENT.INTERFACE]        (* SEE OLD.EWVCFN)
      ])

(EDIT.WINDOW.VALUECOMMANDFN.REFER
  [LAMBDA (VALUE FIELD ITEM WINDOW)                          (* DAHJr "21-APR-83 17:56")
                                                             (* "Top level of the editor")
    (TRILLIUM.MAKE.REFERRAL (LIST (QUOTE EDIT.WINDOW.VALUECOMMANDFN)
				  (KWOTE VALUE)
				  (KWOTE FIELD)
				  (KWOTE ITEM)
				  (KWOTE WINDOW])

(EXPOSE.ITEM.EDITORS
  [LAMBDA NIL                                                (* DAHJr " 5-DEC-83 17:51")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE.WINDOW))
    (THINKING (for WINDOW in (DEPENDENT.WINDOWS CURRENT.INTERFACE.WINDOW)
		 when (EQ (WINDOWPROP WINDOW (QUOTE TRILLIUM.WINDOW.TYPE))
			  (QUOTE ITEM.EDITOR))
		 do (OPEN.DEPENDENT.WINDOWS WINDOW))
	      NIL])

(FIX.PROC
  [LAMBDA NIL                                                (* DAHJr "21-APR-83 18:05")
    (DECLARE (GLOBALVARS TRILLIUM.PROCESS TRILLIUM.REFERRAL.FORM))
    (SETQ TRILLIUM.REFERRAL.FORM)
    (COND
      (TRILLIUM.PROCESS (DEL.PROCESS TRILLIUM.PROCESS)
			(SETQ TRILLIUM.PROCESS])

(FRAME.GRAPH.WINDOW.LEFTBUTTONFN
  [LAMBDA (GRAPHNODE WINDOW)                                 (* DAHJr "29-MAR-83 17:46")
    (COND
      (GRAPHNODE (PROG (POSITION CR CX CY DX DY)
		       (SETQ POSITION (fetch (GRAPHNODE NODEPOSITION) of GRAPHNODE))
		       [SETQ CR (DSPCLIPPINGREGION NIL (WINDOWPROP WINDOW (QUOTE DSP]
		       (SETQ CX (IPLUS (fetch (REGION LEFT) of CR)
				       (IQUOTIENT (fetch (REGION WIDTH) of CR)
						  2)))
		       (SETQ CY (IPLUS (fetch (REGION BOTTOM) of CR)
				       (IQUOTIENT (fetch (REGION HEIGHT) of CR)
						  2)))
		       (SETQ DX (IDIFFERENCE CX (fetch (POSITION XCOORD) of POSITION)))
		       (SETQ DY (IDIFFERENCE CY (fetch (POSITION YCOORD) of POSITION)))
		       (SCROLLBYREPAINTFN WINDOW DX DY])

(GET.CHECK.DIALOG.MENU
  [LAMBDA NIL                                                (* DAHJr "11-JAN-83 08:55")
                                                             (* USE WHEN CHANGING THE MENU 
							     (SETQ CHECK.DIALOG.MENU))
    (DECLARE (GLOBALVARS CHECK.DIALOG.MENU))
    (OR CHECK.DIALOG.MENU (SETQ CHECK.DIALOG.MENU (create MENU
							  TITLE ← "Dialog checks/info"
							  ITEMS ←(QUOTE (USED.ITEM.TYPES 
									     UNDEFINED.ITEM.TYPES))
							  CENTERFLG ← T
							  CHANGEOFFSETFLG ← T])

(GET.CONTROL.WINDOW.COMMAND.MENU
  [LAMBDA NIL                                                (* kkm "19-Nov-84 13:47")
    (DECLARE (GLOBALVARS CONTROL.WINDOW.COMMAND.MENU))
    (SETQ CONTROL.WINDOW.COMMAND.MENU (create MENU
					      ITEMS ←(QUOTE ((DISPLAY.BILLBOARD NIL 
							"Puts up a billboard announcing Trillium")
							      (" " NIL "No action")
							      (SETUP.EVENT.MODE NIL 
			    "For setting the mode for the event recording and playback mechanism")
							      (" " NIL "No action")
							      (CREATE.NEW.INTERFACE NIL 
				 "Will prompt for a name for a new interface, and then create it")
							      (COPY.INTERFACE NIL 
		     "Will prompt for a interface, and a name for a copy, and then make the copy")
							      (RENAME.INTERFACE NIL 
			"Will prompt for an interface to be renamed, then prompt for a new name.")
							      (DELETE.INTERFACE NIL 
						"Will prompt for a interface, and then delete it")
							      (MERGE.INTERFACE NIL 
		       "Will prompt for two interfaces, and then merge the second into the first")
							      (OPEN.WINDOW.FOR.INTERFACE NIL 
				     "Will prompt for a interface, and then open a window for it")
							      (" " NIL "No action")
							      (EDIT.ITEM.TYPES NIL 
								 "Gives access to the item types")
							      (EDIT.USER.PROFILE NIL 
						       "will open an editor for the user profile")
							      (" " NIL "No action")
							      (LOADING.&.MAKING.FILES NIL 
	   "Access to functions for loading and making files containing interfaces and itemtypes")))
					      MENUFONT ←(FONTCREATE (QUOTE HELVETICA)
								    12)
					      MENUOUTLINESIZE ← 0
					      WHENSELECTEDFN ←(QUOTE 
							      CONTROL.WINDOW.WHENSELECTEDFN.REFER])

(GET.EDIT.WINDOW.VALUECOMMAND.MENU
  [LAMBDA (VALUE FIELD ITEM WINDOW)                          (* DAHJr "19-JUL-83 02:17")
                                                             (* EVAL THIS WHEN YOU CHANGE THE MENU 
							     (SETQ EDIT.WINDOW.VALUECOMMAND.MENU))
    (DECLARE (GLOBALVARS EDIT.WINDOW.VALUECOMMAND.MENU))
    (OR EDIT.WINDOW.VALUECOMMAND.MENU (SETQ EDIT.WINDOW.VALUECOMMAND.MENU
	  (create MENU
		  ITEMS ←(QUOTE (CREATE.NEW.VALUE EDIT.EXISTING.VALUE USE.DEFAULT.VALUE 
						  USE.EXPRESSION.VALUE USE.SAVED.VALUE SAVE.VALUE 
						  INSPECT.VALUE))
		  CENTERFLG ← T
		  CHANGEOFFSETFLG ← T])

(GET.FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU
  [LAMBDA NIL                                                (* DAHJr "25-JUN-83 17:32")
                                                             (* EVAL WHEN CHANGING THIS MENU 
							     (SETQ FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU))
    (DECLARE (GLOBALVARS FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU))
    (OR FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU (SETQ FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU
	  (create MENU
		  ITEMS ←(QUOTE (MOVE.TO.FRAME MAKE.SUBGRAPH INSPECT))
		  CENTERFLG ← T
		  CHANGEOFFSETFLG ← T])

(GET.PROFILE.EDITOR.TITLECOMMANDFN.MENU
  [LAMBDA NIL                                                (* DAHJr " 3-AUG-83 15:49")
                                                             (* EVAL THIS WHEN YOU CHANGE THE MENU 
							     (SETQ PROFILE.EDITOR.TITLECOMMANDFN.MENU))
    (DECLARE (GLOBALVARS PROFILE.EDITOR.TITLECOMMANDFN.MENU))
    (OR PROFILE.EDITOR.TITLECOMMANDFN.MENU (SETQ PROFILE.EDITOR.TITLECOMMANDFN.MENU
	  (create MENU
		  ITEMS ←(QUOTE (MAKE.CHANGES SAVE.PROFILE))
		  CENTERFLG ← T
		  CHANGEOFFSETFLG ← T])

(GRAPH.FRAMES.FRIENDS.SONS
  [LAMBDA (FRAME INTERFACE)                                  (* DAHJr "25-JUN-83 16:12")
    (PROG (REFERENCES SUPERFRAMES SONS)
          [COND
	    ((SETQ REFERENCES (GRAPH.FRAMES.MENTIONED.FRAMES FRAME INTERFACE))
	      (SETQ SONS (LIST (CONS REFERENCES (QUOTE REFERENCES]
          [COND
	    ((SETQ SUPERFRAMES (GRAPH.FRAME.SUPERFRAMES FRAME INTERFACE))
	      (SETQ SONS (NCONC1 SONS (CONS SUPERFRAMES (QUOTE SUPERFRAMES]
          (RETURN SONS])

(GRAPH.LEFTBUTTONFN
  [LAMBDA (NODE WINDOW)                                      (* HaKo "25-Jul-84 17:41")
    (DECLARE (GLOBALVARS PRINT.SEPARATOR.STRING))
    (COND
      (NODE (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS PRINT.SEPARATOR.STRING)
	    (PRINT.ITEM.TYPE (fetch (GRAPHNODE NODELABEL) of NODE)))
      (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "No item type found where you pointed"])

(GRAPH.MIDDLEBUTTONFN
  [LAMBDA (NODE WINDOW)                                      (* edited: "31-MAR-82 17:04")
    (EDIT.ITEM.TYPE.DESCRIPTION (fetch (GRAPHNODE NODELABEL) of NODE])

(GRAPH.WINDOW.CURSORINFN
  [LAMBDA (WINDOW)                                           (* HK "22-JUL-82 17:49")
    (DECLARE (GLOBALVARS LASTMOUSEBUTTONS LASTMOUSEX LASTMOUSEY))
    (COND
      ((WINDOWPROP WINDOW (QUOTE OBSOLETE))
	(do (GETMOUSESTATE)
	    (COND
	      ((NOT (INSIDEP (WINDOWPROP WINDOW (QUOTE REGION))
			     LASTMOUSEX LASTMOUSEY))
		(RETURN))
	      ((READP)
		(RETURN))
	      ((LASTMOUSESTATE (NOT UP))
		(GRAPH.ITEM.TYPES)
		(WINDOWPROP WINDOW (QUOTE OBSOLETE)
			    NIL)
		(RETURN])

(GRAY.WINDOW
  [LAMBDA (WINDOW)
    (DECLARE (GLOBALVARS SCREENHEIGHT SCREENWIDTH))          (* HaKo "27-Jul-84 13:47")
    (BITBLT NIL NIL NIL WINDOW 0 0 SCREENWIDTH SCREENHEIGHT (QUOTE TEXTURE)
	    (QUOTE PAINT)
	    CHANGEDSHADE])

(INTERFACE.WINDOW.BUTTONEVENTFN
  [LAMBDA (INTERFACE.WINDOW)                                 (* PH "10-Sep-84 09:34")
    (DECLARE (GLOBALVARS CURRENT.FRAME LASTMOUSEBUTTONS TRILLIUM.MODE))
    (TOTOPW INTERFACE.WINDOW)
    (RESTORE.INTERFACE.CONTEXT.IF.NECESSARY INTERFACE.WINDOW)
                                                             (* TO HANDLE THE CASE WHERE THE CURRENT.FRAME HAS BEEN 
							     RESET WHILE THE FRAME IS NOT RUNNING, PARTICULARLY 
							     BECAUSE OF MAKEFILE.)
    (TRILLIUM.CLEAR.ALL.PROMPTING)
    (COND
      ((AND TRILLIUM.MODE (LASTMOUSESTATE (ONLY MIDDLE)))
	(ANALYZE.FRAME.IF.NECESSARY* CURRENT.FRAME)
	(EDIT.FRAME INTERFACE.WINDOW))
      ((AND TRILLIUM.MODE (LASTMOUSESTATE (ONLY RIGHT)))
	(DOWINDOWCOM INTERFACE.WINDOW))
      (T (ANALYZE.FRAME.IF.NECESSARY* CURRENT.FRAME)
	 (INTERFACE.WINDOW.LEFTBUTTONFN INTERFACE.WINDOW])

(INTERFACE.WINDOW.BUTTONEVENTFN.REFER
  [LAMBDA (WINDOW)                                           (* DAHJr "21-APR-83 17:48")
    (DECLARE (GLOBALVARS LASTMOUSEBUTTONS))
    (COND
      ((LASTMOUSESTATE (NOT UP))
	(TRILLIUM.MAKE.REFERRAL (LIST (QUOTE INTERFACE.WINDOW.BUTTONEVENTFN)
				      (KWOTE WINDOW])

(INTERFACE.WINDOW.CHANGE.TITLE
  [LAMBDA (INTERFACE.WINDOW)                                 (* HaKo " 8-Aug-84 15:12")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE.WINDOW FRAME.STATUS))
    (PROG (INTERFACE INTERFACE.NAME FRAME FRAME.NAME)
          (OR (WINDOWP INTERFACE.WINDOW)
	      (SETQ INTERFACE.WINDOW CURRENT.INTERFACE.WINDOW))
          (SETQ INTERFACE (WINDOWPROP INTERFACE.WINDOW (QUOTE INTERFACE)))
          (SETQ INTERFACE.NAME (GET.FIELDQ INTERFACE NAME))
          [SETQ FRAME.NAME (CAR (WINDOWPROP INTERFACE.WINDOW (QUOTE TRILLIUM.STACK]
          (SETQ FRAME (FIND.FRAME INTERFACE FRAME.NAME))
          (WINDOWPROP INTERFACE.WINDOW (QUOTE TITLE)
		      (CONCAT "TRILLIUM;  interface: " INTERFACE.NAME ";  frame: " FRAME.NAME
			      (COND
				((GET.FIELDQ FRAME FROZEN)
				  ";  frozen,  ")
				(T ";  "))
			      FRAME.STATUS])

(INTERFACE.WINDOW.CLOSEFN
  [LAMBDA (WINDOW)                                           (* edited: " 6-May-84 14:00")
    (THINKING (ADJUST.INTERFACE.WINDOWS.COUNT (QUOTE CLOSE))
	      (CLOSE.DEPENDENT.WINDOWS WINDOW)
	      (DELETE.DEPENDENT.WINDOWS WINDOW T)
	      NIL])

(INTERFACE.WINDOW.CREATE
  [LAMBDA (INTERFACE NEW.REGION NEW.FRAME.NAME NEW.MACHINE)
                                                             (* HaKo "15-Aug-84 16:44")
    (DECLARE (GLOBALVARS CHANGE.FRAME.SPECIFICATIONS FRAME.STATUS))
    (THINKING (PROG (WINDOW REGION INTERFACE.NAME FIRST.FRAME.NAME FIRST.FRAME)
		    (SETQ REGION (OR NEW.REGION (GET.FIELDQ INTERFACE REGION INTERFACE)))
		    (SETQ INTERFACE.NAME (GET.FIELDQ INTERFACE NAME))
		    (SETQ FIRST.FRAME.NAME (OR NEW.FRAME.NAME (GET.FIELDQ INTERFACE FIRST.FRAME)))
		    (SETQ FIRST.FRAME (FIND.FRAME INTERFACE FIRST.FRAME.NAME))
		    (COND
		      ((NULL REGION)
			(TRILLIUM.PRINTOUT ON PROMPTWINDOW "Indicate region for a interface window")
			(SETQ REGION (GETREGION 50 50))
			(SET.FIELDQ INTERFACE REGION REGION)))
		    (SETQ WINDOW (CREATEW REGION "Trillium; interface: ... hang on a moment ..."))
		    (WINDOWPROP WINDOW (QUOTE BUTTONEVENTFN)
				(FUNCTION INTERFACE.WINDOW.BUTTONEVENTFN.REFER))
		    (WINDOWPROP WINDOW (QUOTE RIGHTBUTTONFN)
				(FUNCTION INTERFACE.WINDOW.BUTTONEVENTFN.REFER))
		    (WINDOWPROP WINDOW (QUOTE CLOSEFN)
				(FUNCTION INTERFACE.WINDOW.CLOSEFN))
		    (WINDOWPROP WINDOW (QUOTE ICONFN)
				(FUNCTION MAKE.TRILLIUM.ICON))
		    (WINDOWPROP WINDOW (QUOTE RESHAPEFN)
				(FUNCTION INTERFACE.WINDOW.RESHAPEFN))
		    (WINDOWPROP WINDOW (QUOTE REPAINTFN)
				(FUNCTION INTERFACE.WINDOW.REPAINTFN))
		    (WINDOWPROP WINDOW (QUOTE INTERFACE)
				INTERFACE)
		    (WINDOWPROP WINDOW (QUOTE TRILLIUM.WINDOW.TYPE)
				(QUOTE INTERFACE.WINDOW))
		    (WINDOWPROP WINDOW (QUOTE MACHINE.STATE)
				(OR NEW.MACHINE (MACHINE.STATE.CREATE)))
		    (WINDOWPROP WINDOW (QUOTE CURRENT.FRAME)
				FIRST.FRAME)
		    (ADJUST.INTERFACE.WINDOWS.COUNT (QUOTE OPEN))
		    (RESTORE.INTERFACE.CONTEXT WINDOW)
		    (WINDOWPROP WINDOW (QUOTE TRILLIUM.STACK)
				NIL)
		    (SET.CURRENT.VALUE (QUOTE \CLOCK.ZERO)
				       (CLOCK 0))
		    (SET.CURRENT.VALUE (QUOTE \LOST.TIME)
				       0)
		    (SET.CURRENT.VALUE (QUOTE CLOCK)
				       0)
		    (SETQ FRAME.STATUS "Not operating")
		    (SETQ CHANGE.FRAME.SPECIFICATIONS (LIST (QUOTE OPERATION)
							    (QUOTE PUSH)
							    (QUOTE FRAME.NAME)
							    FIRST.FRAME.NAME
							    (QUOTE INITIALIZE)
							    T))
                                                             (* APPLY* (QUOTE FRAME.PUSH) FIRST.FRAME.NAME)
		    (DO.FRAME.CHANGE)
		    (RETURN WINDOW])

(INTERFACE.WINDOW.LEFTBUTTONFN
  [LAMBDA (INTERFACE.WINDOW)                                 (* HaKo " 8-Aug-84 15:12")
    (DECLARE (GLOBALVARS EVENT.MODE FRAME.STATUS TIME.BETWEEN.EVENTS.BASE))
    (PROG (BUTTON)
          (SETQ FRAME.STATUS (if (EQ EVENT.MODE (QUOTE RECORDING))
				 then "Operating & recording session"
			       else "Operating"))
          (SETQ TIME.BETWEEN.EVENTS.BASE (CLOCK 0))
          (INTERFACE.WINDOW.CHANGE.TITLE INTERFACE.WINDOW)   (* TO HANDLE THE CASE WHERE THE CURRENT.FRAME HAS BEEN 
							     RESET WHILE THE FRAME IS NOT RUNNING, PARTICULARLY 
							     BECAUSE OF MAKEFILE.)
          (SETQ BUTTON (SENSE.FRAME INTERFACE.WINDOW))
          (SETQ FRAME.STATUS (if (EQ EVENT.MODE (QUOTE RECORDING))
				 then "Not operating & recording session"
			       else "Not operating"))
          (INTERFACE.WINDOW.CHANGE.TITLE INTERFACE.WINDOW)
          (SELECTQ BUTTON
		   (NOTHING NIL)
		   (MIDDLE (EDIT.FRAME INTERFACE.WINDOW))
		   (RIGHT (DOWINDOWCOM INTERFACE.WINDOW))
		   (SHOULDNT "Unrecognized keyword in INTERFACE.WINDOW.LEFTBUTTONFN"))
          (RETURN])

(INTERFACE.WINDOW.LOWERLEFT
  [LAMBDA (DIALOG WINDOW)                                    (* DAHJr "12-NOV-81 16:14")
    (DECLARE (GLOBALVARS CURRENT.FRAME))
    (LOWERLEFTW WINDOW)
    (DISPLAY.FRAME CURRENT.FRAME])

(INTERFACE.WINDOW.REPAINTFN
  [LAMBDA (WINDOW OLDIMAGE WIDTH HEIGHT)                     (* HaKo "27-Jul-84 12:40")
    (RESTORE.INTERFACE.CONTEXT.IF.NECESSARY WINDOW)
    (DISPLAY.FRAME (WINDOWPROP WINDOW (QUOTE CURRENT.FRAME])

(INTERFACE.WINDOW.RESHAPEFN
  [LAMBDA (WINDOW OLDIMAGE WIDTH HEIGHT)                     (* HaKo "27-Jul-84 12:41")
                                                             (* DAHJr "18-JAN-83 15:19")
    (RESTORE.INTERFACE.CONTEXT.IF.NECESSARY WINDOW)
    (DISPLAY.FRAME (WINDOWPROP WINDOW (QUOTE CURRENT.FRAME])

(ITEM.TYPE.GRAPH.SPEC.FN1
  [LAMBDA (DATUM)                                            (* DAHJr " 7-APR-83 20:47")
    (PROG (NODES)
          [SETQ NODES (LIST (CONS (GET.FIELDQ DATUM COMMENT ITEM.TYPE)
				  (QUOTE COMMENT))
			    (CONS (GET.FIELDQ DATUM KIND ITEM.TYPE)
				  (QUOTE KIND))
			    (CONS (GET.FIELDQ DATUM PARAMETERS ITEM.TYPE)
				  (QUOTE CHARACTERISTICS]
          [COND
	    ((EQ (GET.FIELDQ DATUM KIND ITEM.TYPE)
		 (QUOTE COMPOSITE))
	      (NCONC1 NODES (CONS (GET.FIELDQ DATUM SUBITEM.SPECS ITEM.TYPE)
				  (QUOTE EXPANSION]
          [COND
	    ((GET.FIELDQ DATUM OTHER ITEM.TYPE)
	      (NCONC1 NODES (CONS (GET.FIELDQ DATUM OTHER ITEM.TYPE)
				  (QUOTE OTHER]
          (RETURN NODES])

(ITEM.TYPE.GRAPH.SPEC.FN2
  [LAMBDA (FOREACH.SPEC)                                     (* DAHJr " 8-MAR-83 17:32")
    (for ELEM in (CDR FOREACH.SPEC) until (EQ ELEM (QUOTE DO)) collect ELEM])

(ITEM.TYPE.GRAPH.SPEC.FN3
  [LAMBDA (FOREACH.SPEC)                                     (* DAHJr " 8-MAR-83 17:29")
    (for ELEM on FOREACH.SPEC when (EQ (CAR ELEM)
				       (QUOTE DO))
       do (RETURN (CDR ELEM])

(ITEM.TYPE.GRAPH.SPEC.FN4
  [LAMBDA (EXPR)                                             (* DAHJr " 8-MAR-83 17:45")
    (COND
      ((LISTP EXPR)
	(CONCAT "(" (CAR EXPR)
		")"))
      (T EXPR])

(ITEM.TYPE.GRAPH.SPEC.FN5
  [LAMBDA (EXPR)                                             (* DAHJr " 8-MAR-83 17:44")
    (COND
      [(LISTP EXPR)
	(for ARG in (CDR EXPR) collect (CONS ARG (QUOTE EXPRESSION]
      (T NIL])

(ITEM.TYPE.WINDOW.CREATE
  [LAMBDA (ITYPE)                                            (* HaKo "25-Jul-84 17:42")
    (DECLARE (GLOBALVARS ITEM.TYPE.GRAPH.SPEC))
    (PROG (DESCRIPTION PARAMETERS ROOTS TITLE SPEC WINDOW)
          (SETQ DESCRIPTION (ITEM.TYPE.DESCRIPTION ITYPE))
          (SETQ PARAMETERS (GET.FIELDQ DESCRIPTION PARAMETERS ITEM.TYPE))
          (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Place the window for editing item.type " ITYPE)
          (SETQ TITLE (CONCAT "Editor for item.type " ITYPE))
          [SETQ ROOTS (LIST (CONS DESCRIPTION (QUOTE ITEM.TYPE]
          (SETQ WINDOW (MAKE.GRAPH NIL TITLE ITEM.TYPE.GRAPH.SPEC ROOTS DESCRIPTION
				   (FUNCTION ITEM.TYPE.WINDOW.LEFTBUTTONFN)
				   (FUNCTION ITEM.TYPE.WINDOW.MIDDLEBUTTONFN)))
          (WINDOWPROP WINDOW (QUOTE ITEM.TYPE)
		      ITYPE)
          (RETURN WINDOW])

(ITEM.TYPE.WINDOW.LEFTBUTTONFN
  [LAMBDA (NODE WINDOW)                                      (* HaKo "16-Aug-84 16:48")
    (COND
      (NODE (PROG (ITYPE DESCRIPTION ID PARAMETER TEMP)
	          (SETQ ITYPE (WINDOWPROP WINDOW (QUOTE ITEM.TYPE)))
	          (SETQ ID (fetch (GRAPHNODE NODEID) of NODE))
	          (COND
		    ((ATOM ID)
		      (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS ID))
		    (T (SELECTQ (CAR ID)
				(PARAMETER (SETQ PARAMETER (CDR ID))
					   (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS 
							      "The parameter "
							      (GET.FIELDQ PARAMETER NAME))
					   (SETQ TEMP (COPYALL PARAMETER))
					   (INSPECT TEMP))
				(SHOULDNT])

(ITEM.TYPE.WINDOW.MIDDLEBUTTONFN
  [LAMBDA (GRAPHNODE WINDOW)                                 (* HaKo "25-Jul-84 17:42")
    (COND
      ((NULL GRAPHNODE))
      ((NLISTP (MAKE.GRAPH.DATUM GRAPHNODE))
	(TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Can't edit this node: atomic"))
      (T (PROG (ITYPE STARTING.DATUM NEW.DATUM STARTING.DESCRIPTION)
	       (SETQ ITYPE (WINDOWPROP WINDOW (QUOTE ITEM.TYPE)))
	       (SETQ STARTING.DESCRIPTION (COPYALL (ITEM.TYPE.DESCRIPTION ITYPE)))
	       (SETQ STARTING.DATUM (MAKE.GRAPH.DATUM GRAPHNODE))
	       (SETQ NEW.DATUM (COPYALL STARTING.DATUM))
	       (SETQ NEW.DATUM (DEDIT.FORM NEW.DATUM))
	       (RETURN (COND
			 ((EQUAL STARTING.DATUM NEW.DATUM)
			   NIL)
			 (T (RPLNODE2 STARTING.DATUM NEW.DATUM)
			    (MODIFY.ITEM.TYPE ITYPE STARTING.DESCRIPTION (ITEM.TYPE.DESCRIPTION
						ITYPE))
			    (MAKE.GRAPH.UPDATE.WINDOW WINDOW)
			    ITYPE])

(MAKE.TRILLIUM.ICON
  [LAMBDA NIL                                                (* dls " 2-APR-84 16:04")

          (* Make up an ICON for the CURRENT.INTERFACE, comprised of the Trillium flower and the name of the interface, and 
	  cache it on the ICON property of the CURRENT.INTERFACE.WINDOW for future reference. This operation is done here, 
	  rather than in INTERFACE.WINDOW.CREATE, so that the construction isn't done unless needed.)


    (DECLARE (GLOBALVARS CURRENT.INTERFACE CURRENT.INTERFACE.WINDOW INTERFACE.WINDOWS.COUNT 
			 TRILLIUM.BITMAP TRILLIUM.ICON.LOCATION))
    (GLOBALVARS TRILLIUM.BITMAP TRILLIUM.ICON.LOCATION INTERFACE.WINDOWS.COUNT CURRENT.INTERFACE 
		CURRENT.INTERFACE.WINDOW)
    (OR (WINDOWPROP CURRENT.INTERFACE.WINDOW (QUOTE ICON))
	(PROG (FONT ICON.WINDOW)
	      [SETQ FONT (FONTCREATE (QUOTE (GACHA 10 BOLD]
	      (SETQ ICON.WINDOW (CREATEW (CREATEREGION (IDIFFERENCE (fetch LEFT of 
									   TRILLIUM.ICON.LOCATION)
								    (ITIMES (SUB1 
									  INTERFACE.WINDOWS.COUNT)
									    10))
						       (IDIFFERENCE (fetch BOTTOM of 
									   TRILLIUM.ICON.LOCATION)
								    (ITIMES (SUB1 
									  INTERFACE.WINDOWS.COUNT)
									    10))
						       (IPLUS (BITMAPWIDTH TRILLIUM.BITMAP)
							      (STRINGWIDTH "   " FONT)
							      (IMAX (STRINGWIDTH "Window for" FONT)
								    (STRINGWIDTH (GET.FIELDQ 
										CURRENT.INTERFACE 
											     NAME)
										 FONT)))
						       (IPLUS 5 (BITMAPHEIGHT TRILLIUM.BITMAP)))
					 NIL 3 T))
	      (DSPFONT FONT ICON.WINDOW)
	      (BITBLT TRILLIUM.BITMAP 0 0 ICON.WINDOW 0 0)
	      (DSPXPOSITION (IPLUS (STRINGWIDTH " " ICON.WINDOW)
				   (BITMAPWIDTH TRILLIUM.BITMAP))
			    ICON.WINDOW)
	      (DSPYPOSITION (IQUOTIENT (BITMAPHEIGHT TRILLIUM.BITMAP)
				       2)
			    ICON.WINDOW)
	      (printout ICON.WINDOW "Window for" T)
	      (DSPXPOSITION (IPLUS (STRINGWIDTH " " ICON.WINDOW)
				   (BITMAPWIDTH TRILLIUM.BITMAP))
			    ICON.WINDOW)
	      (printout ICON.WINDOW (GET.FIELDQ CURRENT.INTERFACE NAME))
	      (WINDOWPROP CURRENT.INTERFACE.WINDOW (QUOTE ICON)
			  ICON.WINDOW)
	      (RETURN ICON.WINDOW])

(OPEN.DEPENDENT.WINDOWS
  [LAMBDA (WINDOW)                                           (* DAHJr " 3-AUG-83 08:44")
    (for W in (DEPENDENT.WINDOWS WINDOW) do (OPENW W))
    (TOTOPW WINDOW])

(PROFILE.EDITOR.CREATE
  [LAMBDA (ITEM)                                             (* HaKo "27-Jul-84 12:49")
    (PROG (WINDOW DW)
          (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Indicate a location for a PROFILE EDITOR (window)")
          (SETQ WINDOW (INSPECTW.CREATE (COPY.ITEM ITEM)
					(FUNCTION EDIT.WINDOW.PROPERTIES)
					(FUNCTION EDIT.WINDOW.FETCHFN)
					(FUNCTION EDIT.WINDOW.STOREFN)
					(FUNCTION EDIT.WINDOW.PROPCOMMANDFN)
					(FUNCTION PROFILE.EDITOR.VALUECOMMANDFN.REFER)
					(FUNCTION PROFILE.EDITOR.TITLECOMMANDFN)
					"Profile editor"))
          (WINDOWPROP WINDOW (QUOTE TRILLIUM.WINDOW.TYPE)
		      (QUOTE PROFILE.EDITOR))
          (RETURN WINDOW])

(PROFILE.EDITOR.MAKE.CHANGES
  [LAMBDA (WINDOW)                                           (* HaKo "27-Jul-84 14:24")
    (DECLARE (GLOBALVARS TRILLIUM.PROFILE))
    (THINKING (INSPECTW.REDISPLAY WINDOW)
	      (SETQ TRILLIUM.PROFILE (WINDOWPROP WINDOW (QUOTE DATUM)))
	      (INSTALL.PROFILE TRILLIUM.PROFILE)
	      (TOTOPW WINDOW])

(PROFILE.EDITOR.TITLECOMMANDFN
  [LAMBDA (WINDOW ITEM)                                      (* kkm "19-Nov-84 16:16")
    (DECLARE (GLOBALVARS TRILLIUM.PROFILE))
    (PROG (COMMAND.MENU FFN)
          (TRILLIUM.CLEAR.ALL.PROMPTING)
          (SETQ COMMAND.MENU (GET.PROFILE.EDITOR.TITLECOMMANDFN.MENU))
          (SELECTQ (MENU COMMAND.MENU)
		   (NIL NIL)
		   (MAKE.CHANGES (PROFILE.EDITOR.MAKE.CHANGES WINDOW))
		   [SAVE.PROFILE (THINKING (PROFILE.EDITOR.MAKE.CHANGES WINDOW)
					   (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Saving profile ... ")
					   [SET (FILECOMS (QUOTE TRILLIUM-PROFILE))
						(QUOTE ((VARS TRILLIUM.PROFILE)
							 (P (COND
							      ((AND (BOUNDP (QUOTE 
								   TRILLIUM.PROFILE.EDITOR.WINDOW))
								    (WINDOWP 
								   TRILLIUM.PROFILE.EDITOR.WINDOW))
								(CLOSEW 
								   TRILLIUM.PROFILE.EDITOR.WINDOW)))
							    (SETQ TRILLIUM.PROFILE.EDITOR.WINDOW]
					   (SETQ FFN (PACKFILENAME (QUOTE HOST)
								   \CONNECTED.HOST
								   (QUOTE DIRECTORY)
								   \CONNECTED.DIR
								   (QUOTE NAME)
								   (QUOTE TRILLIUM-PROFILE)))
					   (COND
					     ((CONFIRM (CONCAT "Save PROFILE as " FFN " ?"))
					       (MAKEFILE FFN)
					       (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE "as " 
								  FFN))
					     (T (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE 
								   " aborted. "]
		   (SHOULDNT "Unrecognized keyword in PROFILE.EDITOR.TITLECOMMANDFN"])

(PROFILE.EDITOR.VALUECOMMANDFN
  [LAMBDA (VALUE FIELD ITEM WINDOW)                          (* HaKo "27-Jul-84 16:55")
    (DECLARE (GLOBALVARS AUTO.MAKE.CHANGES.FLG))
    (PROG (CHANGE.MADE)
          (TRILLIUM.CLEAR.ALL.PROMPTING)
          (COND
	    ((EQ FIELD (QUOTE ITEM.TYPE))
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Can't change the type of the profile"))
	    (T (SETQ CHANGE.MADE (EDIT.WINDOW.GET.NEW.VALUE (GET.PARAM ITEM FIELD)
							    FIELD ITEM WINDOW (
							      ITEM.TYPE.PARAMETER.TYPE (ITEM.TYPE
											 ITEM)
										       FIELD)))
	       (COND
		 ((AND CHANGE.MADE AUTO.MAKE.CHANGES.FLG)
		   (PROFILE.EDITOR.MAKE.CHANGES WINDOW])

(PROFILE.EDITOR.VALUECOMMANDFN.REFER
  [LAMBDA (VALUE FIELD ITEM WINDOW)                          (* DAHJr " 9-AUG-83 17:29")
                                                             (* "Top level of the editor")
    (TRILLIUM.MAKE.REFERRAL (LIST (QUOTE PROFILE.EDITOR.VALUECOMMANDFN)
				  (KWOTE VALUE)
				  (KWOTE FIELD)
				  (KWOTE ITEM)
				  (KWOTE WINDOW])

(PROPLIST.WINDOW.CREATE
  [LAMBDA (PROPLIST)                                         (* DAHJr "23-APR-83 13:09")
    (INSPECTW.CREATE PROPLIST (QUOTE PROPLIST.WINDOW.PROPERTIES)
		     (QUOTE LISTGET)
		     (QUOTE LISTPUT)
		     (QUOTE PROPLIST.WINDOW.PROPCOMMANDFN.REFER)
		     (QUOTE PROPLIST.WINDOW.VALUECOMMANDFN.REFER)
		     (QUOTE PROPLIST.WINDOW.TITLECOMMANDFN)
		     (QUOTE PROPLIST.WINDOW.TITLE])

(PROPLIST.WINDOW.PROPCOMMANDFN
  [LAMBDA (PROP PROPLIST WINDOW)                             (* HaKo "25-Jul-84 17:45")
                                                             (* "Top level of the editor")
    (SELECTQ (MENU (create MENU
			   ITEMS ←(QUOTE (ADD.PROP.BEFORE ADD.PROP.AFTER RENAME.PROP DELETE.PROP))
			   CENTERFLG ← T
			   CHANGEOFFSETFLG ← T))
	     (NIL NIL)
	     [ADD.PROP.BEFORE (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Adding new property of name: ")
			      (PROG ((NEW.NAME (PROMPT.READ)))
				    (COND
				      ((NULL NEW.NAME)
					(TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "ADD.PROP aborted"))
				      ((LISTGET PROPLIST NEW.NAME)
					(TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS NEW.NAME 
							   " is already a property of this list"))
				      (T (for ELEM on PROPLIST when (EQ (CAR ELEM)
									PROP)
					    do [RPLACD ELEM (CONS NIL (CONS (CAR ELEM)
									    (CDR ELEM]
					       (RPLACA ELEM NEW.NAME)
					       (RETURN))
					 (INSPECTW.REDISPLAY WINDOW]
	     [ADD.PROP.AFTER (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Adding new property of name: ")
			     (PROG ((NEW.NAME (PROMPT.READ)))
			           (COND
				     ((NULL NEW.NAME)
				       (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "ADD.PROP aborted"))
				     ((LISTGET PROPLIST NEW.NAME)
				       (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS NEW.NAME 
							  " is already a property of this list"))
				     (T (for ELEM on PROPLIST when (EQ (CAR ELEM)
								       PROP)
					   do [RPLACD (CDR ELEM)
						      (CONS NEW.NAME (CONS NIL (CDDR ELEM]
					      (RETURN))
					(INSPECTW.REDISPLAY WINDOW]
	     [RENAME.PROP (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Renaming property " PROP "; new name: ")
			  (PROG ((NEW.NAME (PROMPT.READ)))
			        (COND
				  ((NULL NEW.NAME)
				    (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "RENAME.PROP aborted"))
				  ((LISTGET PROPLIST NEW.NAME)
				    (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS NEW.NAME 
						       " is already a property of this list"))
				  (T (for ELEM on PROPLIST by (CDDR ELEM) when (EQ (CAR ELEM)
										   PROP)
					do (RPLACA ELEM NEW.NAME)
					   (RETURN))
				     (INSPECTW.REDISPLAY WINDOW]
	     [DELETE.PROP (COND
			    ((NLISTP (CDDR PROPLIST))
			      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS 
					  "Can't delete the last property: the list would vanish"))
			    ((NOT (CONFIRM (CONCAT "Delete property " PROP "?")))
			      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "RENAME.PROP aborted"))
			    ((EQ PROP (CAR PROPLIST))
			      (RPLACA PROPLIST (CADDR PROPLIST))
			      (RPLACD PROPLIST (CDDDR PROPLIST))
			      (INSPECTW.REDISPLAY WINDOW))
			    (T [for ELEM on (CDDR PROPLIST) by (CDDR ELEM) bind (PREV ← PROPLIST)
				  do (COND
				       ((EQ (CAR ELEM)
					    PROP)
					 (RPLACD (CDR PREV)
						 (CDDR ELEM))
					 (RETURN))
				       (T (SETQ PREV ELEM]
			       (INSPECTW.REDISPLAY WINDOW]
	     (SHOULDNT])

(PROPLIST.WINDOW.PROPCOMMANDFN.REFER
  [LAMBDA (PROP PROPLIST WINDOW)                             (* DAHJr "23-APR-83 13:08")
                                                             (* "Top level of the editor")
    (TRILLIUM.MAKE.REFERRAL (LIST (QUOTE PROPLIST.WINDOW.PROPCOMMANDFN)
				  (KWOTE PROP)
				  (KWOTE PROPLIST)
				  (KWOTE WINDOW])

(PROPLIST.WINDOW.PROPERTIES
  [LAMBDA (PROPLIST)                                         (* edited: "22-MAR-82 14:15")
    (PROPLIST.PROPERTIES PROPLIST])

(PROPLIST.WINDOW.TITLE
  [LAMBDA (PROPLIST)                                         (* edited: "12-MAR-82 11:40")
    (PROG (ITYPE)
          (SETQ ITYPE (LISTGET PROPLIST (QUOTE \TYPE)))
          (RETURN (COND
		    (ITYPE (CONCAT "Property List editor for an item of type " ITYPE))
		    (T "Property List editor"])

(PROPLIST.WINDOW.TITLECOMMANDFN
  [LAMBDA (WINDOW PROPLIST)                                  (* HaKo "25-Jul-84 17:46")
                                                             (* "Top level of the editor")
    (SELECTQ (MENU (create MENU
			   ITEMS ←(QUOTE (COMPRESS.PROPLIST REDISPLAY))
			   CENTERFLG ← T
			   CHANGEOFFSETFLG ← T))
	     (NIL NIL)
	     [COMPRESS.PROPLIST (COND
				  ((NLISTP (CDDR PROPLIST))
				    (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS 
					    "Can't compress a one-property list: it would vanish"))
				  (T (COMPRESS.PROPLIST PROPLIST)
				     (INSPECTW.REDISPLAY WINDOW]
	     (REDISPLAY (INSPECTW.REDISPLAY WINDOW))
	     (SHOULDNT])

(PROPLIST.WINDOW.VALUECOMMANDFN
  [LAMBDA (VALUE PROP PROPLIST WINDOW)                       (* HaKo "16-Aug-84 16:49")
                                                             (* "Top level of the editor")
    (SELECTQ (MENU (create MENU
			   ITEMS ←(QUOTE (SET EDIT))
			   CENTERFLG ← T
			   CHANGEOFFSETFLG ← T))
	     (NIL NIL)
	     (SET (TRILLIUM.PRINTOUT ON PROMPTWINDOW "New value (EXPR to be EVAL'd): ")
		  (LISTPUT PROPLIST PROP (EVAL (PROMPT.READ)))
		  (INSPECTW.REDISPLAY WINDOW))
	     (EDIT (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Editing value of property " PROP)
		   (INSPECT VALUE)
		   (INSPECTW.REDISPLAY WINDOW))
	     (SHOULDNT])

(PROPLIST.WINDOW.VALUECOMMANDFN.REFER
  [LAMBDA (VALUE PROP PROPLIST WINDOW)                       (* DAHJr "23-APR-83 13:09")
                                                             (* "Top level of the editor")
    (TRILLIUM.MAKE.REFERRAL (LIST (QUOTE PROPLIST.WINDOW.VALUECOMMANDFN)
				  (KWOTE VALUE)
				  (KWOTE PROP)
				  (KWOTE PROPLIST)
				  (KWOTE WINDOW])

(TRILLIUM
  [LAMBDA (POSITION)                                         (* DAHJr "21-JUN-83 18:21")
    (CONTROL.WINDOW.CREATE POSITION])

(TRILLIUM.HANDLE.REFERRALS
  [LAMBDA NIL                                                (* DAHJr "21-APR-83 16:32")
    (DECLARE (GLOBALVARS TRILLIUM.REFERRAL.FORM))
    (PROG (DONE)
          (until DONE when TRILLIUM.REFERRAL.FORM
	     do (EVAL TRILLIUM.REFERRAL.FORM)
		(SETQ TRILLIUM.REFERRAL.FORM)
		(BLOCK T])

(TRILLIUM.MAKE.REFERRAL
  [LAMBDA (FORM)                                             (* PH "31-May-84 09:03")

          (* * THE OLD WAY (ATOMICALLY (OR TRILLIUM.PROCESS (SETQ TRILLIUM.PROCESS (ADD.PROCESS (QUOTE 
	  (TRILLIUM.HANDLE.REFERRALS)) (QUOTE TRILLIUM) (QUOTE NO)))) (COND (TRILLIUM.REFERRAL.FORM 
	  (PRINTOUT PROMPTWINDOW "!")) (T (SETQ TRILLIUM.REFERRAL.FORM FORM) (WAKE.PROCESS TRILLIUM.PROCESS)))))



          (* * (EVAL.IN.TTY.PROCESS FORM))


    (EVAL.IN.TTY.PROCESS (LIST (QUOTE ERSETQ)
			       FORM])

(TRILLIUM.RESET.REFERRALS
  [LAMBDA NIL                                                (* DAHJr "22-APR-83 11:16")
    (DECLARE (GLOBALVARS TRILLIUM.PROCESS TRILLIUM.REFERRAL.FORM))
    (SETQ TRILLIUM.REFERRAL.FORM)
    (COND
      (TRILLIUM.PROCESS (DEL.PROCESS TRILLIUM.PROCESS)
			(SETQ TRILLIUM.PROCESS])

(WINDOW.DEPENDED.UPON
  [LAMBDA (WINDOW)
    (WINDOWPROP WINDOW (QUOTE WINDOW.DEPENDED.UPON])
)
(READVARS TRILLIUM.DESIGNER.MODE.BITMAP TRILLIUM.OPERATOR.MODE.BITMAP)
({(READBITMAP)(21 18
"OOOL@@@@"
"GOOOH@@@"
"COHGL@@@"
"COHCN@@@"
"COHCO@@@"
"COHCO@@@"
"COHAOH@@"
"COHAOH@@"
"COHAOH@@"
"COHAOH@@"
"COHAOH@@"
"COHAOH@@"
"COHCOH@@"
"COHCO@@@"
"COHCO@@@"
"COHGN@@@"
"GOOOL@@@"
"OOOO@@@@")}  {(READBITMAP)(20 18
"@AOH@@@@"
"@OOO@@@@"
"AO@OH@@@"
"CN@GL@@@"
"GN@GN@@@"
"GN@GN@@@"
"OL@CO@@@"
"OL@CO@@@"
"OL@CO@@@"
"OL@CO@@@"
"OL@CO@@@"
"OL@CO@@@"
"ON@GO@@@"
"GN@GN@@@"
"GN@GN@@@"
"CO@OL@@@"
"AOOOH@@@"
"@GON@@@@")})

(RPAQQ ITEM.TYPE.GRAPH.SPEC [ITEM.TYPE (DOC (THE WHOLE SPEC)
					    LABEL
					    (fetch (ITEM.TYPE NAME)
						   of DATUM)
					    SONS
					    (EVAL (ITEM.TYPE.GRAPH.SPEC.FN1 DATUM)))
				       COMMENT
				       (DOC (THE COMMENT)
					    LABEL
					    (QUOTE COMMENT)
					    SONS
					    ((LIST DATUM)
					     (QUOTE COMMENT.VALUE)))
				       COMMENT.VALUE
				       (DOC (THE COMMENT VALUE)
					    LABEL DATUM)
				       KIND
				       (DOC (THE KIND)
					    LABEL
					    (QUOTE KIND)
					    SONS
					    ((LIST DATUM)
					     (QUOTE KIND.VALUE)))
				       KIND.VALUE
				       (DOC (THE KIND VALUE)
					    LABEL DATUM)
				       CHARACTERISTICS
				       (DOC (THE CHARACTERISTICS)
					    LABEL
					    (QUOTE CHARACTERISTICS)
					    SONS
					    (DATUM (QUOTE CHARACTERISTIC)))
				       CHARACTERISTIC
				       [DOC (A CHARACTERISTIC)
					    LABEL
					    (fetch (PARAMETER NAME)
						   of DATUM)
					    SONS
					    (EVAL (LIST (CONS (fetch (PARAMETER COMMENT)
								     of DATUM)
							      (QUOTE CHAR.COMMENT))
							(CONS (fetch (PARAMETER TYPE)
								     of DATUM)
							      (QUOTE CHAR.TYPE))
							(CONS (fetch (PARAMETER DEFAULT)
								     of DATUM)
							      (QUOTE CHAR.DEFAULT]
				       CHAR.COMMENT
				       (DOC (A CHARACTERISTIC COMMENT)
					    LABEL
					    (QUOTE COMMENT)
					    SONS
					    ((LIST DATUM)
					     (QUOTE CHAR.COMMENT.VALUE)))
				       CHAR.COMMENT.VALUE
				       (DOC (A CHARACTERISTIC COMMENT VALUE)
					    LABEL DATUM)
				       CHAR.TYPE
				       (DOC (A CHARACTERISTIC TYPE)
					    LABEL
					    (QUOTE TYPE)
					    SONS
					    ((LIST DATUM)
					     (QUOTE CHAR.TYPE.VALUE)))
				       CHAR.TYPE.VALUE
				       (DOC (A CHARACTERISTIC TYPE VALUE)
					    LABEL DATUM)
				       CHAR.DEFAULT
				       (DOC (A CHARACTERISTIC DEFAULT)
					    LABEL
					    (QUOTE DEFAULT)
					    SONS
					    ((LIST DATUM)
					     (QUOTE CHAR.DEFAULT.VALUE)))
				       CHAR.DEFAULT.VALUE
				       (DOC (A CHARACTERISTIC DEFAULT VALUE)
					    LABEL DATUM)
				       EXPANSION
				       (DOC (THE SUBITEM.SPECS)
					    LABEL
					    (QUOTE EXPANSION)
					    SONS
					    (DATUM (CAR DATUM)))
				       ITEM
				       [DOC (AN ITEM SPEC)
					    LABEL
					    (QUOTE ITEM)
					    SONS
					    (EVAL (LIST (CONS (CADR DATUM)
							      (QUOTE NEW.ITEM.TYPE))
							(CONS (CDDR DATUM)
							      (QUOTE NEW.ITEM.CHARS]
				       NEW.ITEM.TYPE
				       (DOC (A NEW ITEM.TYPE)
					    LABEL
					    (QUOTE ITEM.TYPE)
					    SONS
					    ((LIST DATUM)
					     (QUOTE NEW.ITEM.TYPE.VALUE)))
				       NEW.ITEM.TYPE.VALUE
				       (DOC (A NEW ITEM.TYPE VALUE)
					    LABEL DATUM)
				       NEW.ITEM.CHARS
				       (DOC (A NEW ITEM.TYPE)
					    LABEL
					    (QUOTE CHARACTERISTICS)
					    SONS
					    (DATUM (QUOTE NEW.ITEM.CHAR)))
				       NEW.ITEM.CHAR
				       (DOC (A NEW ITEM.TYPE CHARACTERISTIC)
					    LABEL
					    (CAR DATUM)
					    SONS
					    ((LIST (CADR DATUM))
					     (QUOTE NEW.ITEM.CHAR.VALUE)))
				       NEW.ITEM.CHAR.VALUE
				       (DOC (A NEW ITEM.TYPE CHARACTERISTIC VALUE)
					    LABEL
					    (ITEM.TYPE.GRAPH.SPEC.FN4 DATUM)
					    SONS
					    (EVAL (ITEM.TYPE.GRAPH.SPEC.FN5 DATUM)))
				       EXPRESSION
				       (DOC (AN EXPRESSION)
					    LABEL
					    (ITEM.TYPE.GRAPH.SPEC.FN4 DATUM)
					    SONS
					    (EVAL (ITEM.TYPE.GRAPH.SPEC.FN5 DATUM)))
				       FOREACH
				       [DOC (A FOREACH SPEC)
					    LABEL
					    (QUOTE FOREACH)
					    SONS
					    (EVAL (LIST (CONS DATUM (QUOTE ITERATORS))
							(CONS DATUM (QUOTE FOREACH.BODY]
				       ITERATORS
				       (DOC (THE ITERATORS)
					    LABEL
					    (QUOTE ITERATORS)
					    SONS
					    ((ITEM.TYPE.GRAPH.SPEC.FN2 DATUM)
					     (QUOTE ITERATOR)))
				       ITERATOR
				       (DOC (AN ITERATOR)
					    LABEL DATUM)
				       FOREACH.BODY
				       (DOC (THE BODY)
					    LABEL
					    (QUOTE BODY)
					    SONS
					    ((ITEM.TYPE.GRAPH.SPEC.FN3 DATUM)
					     (CAR DATUM)))
				       LABEL
				       (DOC (A LABEL SPEC)
					    LABEL
					    (QUOTE LABEL)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       SELECT
				       (DOC (A SELECT SPEC)
					    LABEL
					    (QUOTE SELECT)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       IF
				       (DOC (AN IF SPEC)
					    LABEL
					    (QUOTE IF)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       INCREMENT
				       (DOC (AN ITEM)
					    LABEL
					    (QUOTE INCREMENT)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       EVAL
				       (DOC (AN ITEM)
					    LABEL
					    (QUOTE EVAL)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       HELP
				       (DOC (AN ITEM)
					    LABEL
					    (QUOTE HELP)
					    ?SONS
					    (DATUM (QUOTE EXPANSION.SPEC)))
				       OTHER
				       (DOC (OTHER STUFF)
					    LABEL
					    (QUOTE OTHER)
					    ?SONS
					    ((fetch (ITEM.TYPE OTHER)
						    of DATUM)
					     (QUOTE CHARACTERISTIC])

(RPAQ TRILLIUM.ICON.LOCATION (CREATEREGION 607 515 10 10))

(RPAQQ INTERFACE.WINDOWS.COUNT 0)

(RPAQQ PROFILE.EDITOR.TITLECOMMANDFN.MENU NIL)

(RPAQQ TRILLIUM.MODE T)

(RPAQQ FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU NIL)

(RPAQQ TRILLIUM.PROCESS NIL)

(RPAQQ TRILLIUM.REFERRAL.FORM NIL)

(RPAQQ CONTROL.WINDOW.COMMAND.MENU NIL)

(RPAQQ EDIT.WINDOW.VALUECOMMAND.MENU NIL)
(PUTPROPS TRI-WINDOWS COPYRIGHT ("Xerox Corporation" 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (3003 51634 (ADD.DEPENDENT.WINDOW 3013 . 3430) (ADJUST.INTERFACE.WINDOWS.COUNT 3432 . 
3834) (CLOSE.DEPENDENT.WINDOWS 3836 . 4029) (CONTROL.WINDOW.CREATE 4031 . 5918) (CONTROL.WINDOW.HELPFN
 5920 . 6730) (CONTROL.WINDOW.WHENSELECTEDFN 6732 . 9782) (CONTROL.WINDOW.WHENSELECTEDFN.REFER 9784 . 
10145) (DELETE.DEPENDENT.WINDOW 10147 . 10460) (DELETE.DEPENDENT.WINDOWS 10462 . 10767) (
DEPENDENT.WINDOWS 10769 . 10934) (EDIT.WINDOW.CREATE 10936 . 11669) (EDIT.WINDOW.FETCHFN 11671 . 12002
) (EDIT.WINDOW.GET.NEW.VALUE 12004 . 15370) (EDIT.WINDOW.MAKE.CHANGES 15372 . 16243) (
EDIT.WINDOW.PROPCOMMANDFN 16245 . 17620) (EDIT.WINDOW.PROPERTIES 17622 . 17820) (EDIT.WINDOW.STOREFN 
17822 . 17917) (EDIT.WINDOW.TITLE 17919 . 18111) (EDIT.WINDOW.TITLECOMMANDFN 18113 . 18410) (
EDIT.WINDOW.VALUECOMMANDFN 18412 . 19344) (EDIT.WINDOW.VALUECOMMANDFN.REFER 19346 . 19725) (
EXPOSE.ITEM.EDITORS 19727 . 20137) (FIX.PROC 20139 . 20443) (FRAME.GRAPH.WINDOW.LEFTBUTTONFN 20445 . 
21260) (GET.CHECK.DIALOG.MENU 21262 . 21805) (GET.CONTROL.WINDOW.COMMAND.MENU 21807 . 23567) (
GET.EDIT.WINDOW.VALUECOMMAND.MENU 23569 . 24213) (GET.FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU 24215 . 
24799) (GET.PROFILE.EDITOR.TITLECOMMANDFN.MENU 24801 . 25361) (GRAPH.FRAMES.FRIENDS.SONS 25363 . 25851
) (GRAPH.LEFTBUTTONFN 25853 . 26268) (GRAPH.MIDDLEBUTTONFN 26270 . 26469) (GRAPH.WINDOW.CURSORINFN 
26471 . 26995) (GRAY.WINDOW 26997 . 27243) (INTERFACE.WINDOW.BUTTONEVENTFN 27245 . 28144) (
INTERFACE.WINDOW.BUTTONEVENTFN.REFER 28146 . 28471) (INTERFACE.WINDOW.CHANGE.TITLE 28473 . 29336) (
INTERFACE.WINDOW.CLOSEFN 29338 . 29631) (INTERFACE.WINDOW.CREATE 29633 . 32075) (
INTERFACE.WINDOW.LEFTBUTTONFN 32077 . 33237) (INTERFACE.WINDOW.LOWERLEFT 33239 . 33467) (
INTERFACE.WINDOW.REPAINTFN 33469 . 33705) (INTERFACE.WINDOW.RESHAPEFN 33707 . 34036) (
ITEM.TYPE.GRAPH.SPEC.FN1 34038 . 34763) (ITEM.TYPE.GRAPH.SPEC.FN2 34765 . 34985) (
ITEM.TYPE.GRAPH.SPEC.FN3 34987 . 35232) (ITEM.TYPE.GRAPH.SPEC.FN4 35234 . 35434) (
ITEM.TYPE.GRAPH.SPEC.FN5 35436 . 35676) (ITEM.TYPE.WINDOW.CREATE 35678 . 36535) (
ITEM.TYPE.WINDOW.LEFTBUTTONFN 36537 . 37219) (ITEM.TYPE.WINDOW.MIDDLEBUTTONFN 37221 . 38123) (
MAKE.TRILLIUM.ICON 38125 . 40324) (OPEN.DEPENDENT.WINDOWS 40326 . 40538) (PROFILE.EDITOR.CREATE 40540
 . 41227) (PROFILE.EDITOR.MAKE.CHANGES 41229 . 41574) (PROFILE.EDITOR.TITLECOMMANDFN 41576 . 43036) (
PROFILE.EDITOR.VALUECOMMANDFN 43038 . 43730) (PROFILE.EDITOR.VALUECOMMANDFN.REFER 43732 . 44117) (
PROPLIST.WINDOW.CREATE 44119 . 44537) (PROPLIST.WINDOW.PROPCOMMANDFN 44539 . 47547) (
PROPLIST.WINDOW.PROPCOMMANDFN.REFER 47549 . 47917) (PROPLIST.WINDOW.PROPERTIES 47919 . 48081) (
PROPLIST.WINDOW.TITLE 48083 . 48409) (PROPLIST.WINDOW.TITLECOMMANDFN 48411 . 49100) (
PROPLIST.WINDOW.VALUECOMMANDFN 49102 . 49776) (PROPLIST.WINDOW.VALUECOMMANDFN.REFER 49778 . 50168) (
TRILLIUM 50170 . 50318) (TRILLIUM.HANDLE.REFERRALS 50320 . 50660) (TRILLIUM.MAKE.REFERRAL 50662 . 
51211) (TRILLIUM.RESET.REFERRALS 51213 . 51533) (WINDOW.DEPENDED.UPON 51535 . 51632)))))
STOP