(FILECREATED "19-Nov-84 18:30:27" {AZTEC}<TRILLIUM>BIRTHDAY84>RERELEASE>TRI-EDITFRAME.;2 39737  

      changes to:  (FNS COPY.FRAME RENAME.FRAME EDIT.FRAME GET.FRAME.EDITOR.COMMAND.MENU.LONG 
			GET.FRAME.EDITOR.COMMAND.MENU.SHORT)

      previous date: "13-Sep-84 14:17:37" {AZTEC}<TRILLIUM>BIRTHDAY84>RERELEASE>TRI-EDITFRAME.;1)


(* Copyright (c) 1984 by Xerox Corporation)

(PRETTYCOMPRINT TRI-EDITFRAMECOMS)

(RPAQQ TRI-EDITFRAMECOMS ((FNS ACQUIRE.FRAME.NAMES ADD.NEW.FRAME COPY.FRAME CREATE.NEW.FRAME 
			       DELETE.FRAME EDIT.FRAME FORGET.FRAME.CLASS 
			       FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN FREEZE.FRAME 
			       GET.FRAME.EDITOR.COMMAND.MENU GET.FRAME.EDITOR.COMMAND.MENU.LONG 
			       GET.FRAME.EDITOR.COMMAND.MENU.SHORT GET.GRAPH.FRAMES.MENU 
			       GET.MANIPULATE.FRAMES.COMMAND.MENU GET.RENAME.FRAME.MENU 
			       GRAPH.FRAME.SUPERFRAMES GRAPH.FRAMES 
			       GRAPH.FRAMES.MENTION.AS.SUPERFRAME GRAPH.FRAMES.MENTIONED.FRAMES 
			       INTERACT&ADD.FRAME.CLASS INTERACT&COPY.FRAME INTERACT&FREEZE.FRAME 
			       INTERACT&RETRIEVE.FRAME INTERACT&THAW.FRAME MANIPULATE.FRAMES 
			       MOVE.TO.FRAME PRINT.FRAME.CLASSES PRINT.FRAMES PUSH.TO.FRAME 
			       RENAME.FRAME RENAME.FRAME.IN.OBJECT RESET.FRAME RESET.FRAMES 
			       RESET.PRIMITIVE.LISTS SET.CURRENT.BITMAP.FRAMES 
			       SET.CURRENT.FRAME.NAMES SORT.FRAMES THAW.FRAME TOP.ADD.SUPERFRAME 
			       TOP.ANALYZE.FRAME TOP.DISPLAY.FRAME TOP.EDIT.ITEM 
			       TOP.FORGET.SUPERFRAMES TOP.HARDCOPY TOP.INITIALIZE.FRAME)
	(VARS CHANGE.FRAME.STRUCTURE.GRAPH.SPEC FRAME.FRIENDS.GRAPH.SPEC (CURRENT.FRAME.NAMES)
	      (CURRENT.BITMAP.FRAMES)
	      (FRAME.EDITOR.COMMAND.MENU)
	      (FRAME.NAME.MENU)
	      (RENAME.FRAME.MENU)
	      (GRAPH.FRAMES.MENU)
	      (MANIPULATE.FRAMES.COMMAND.MENU)
	      (TRILLIUM.SAVED.FRAME))))
(DEFINEQ

(ACQUIRE.FRAME.NAMES
  [LAMBDA (MESSAGE)                                          (* HaKo "25-Jul-84 16:27")
                                                             (* HaKo " 9-SEP-83 11:01")
                                                             (* PT "5-AUG-83 13:23")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE))
    (PROG ((NOT.DONE T)
	   (FRAME.LIST)
	   FRAME.NAME)
          (OR (NOT MESSAGE)
	      (TRILLIUM.PRINTOUT ON PROMPTWINDOW T MESSAGE T))
          (while NOT.DONE
	     do (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME CURRENT.INTERFACE))
		[SETQ FRAME.LIST (COND
		    ((NULL FRAME.NAME)
		      FRAME.LIST)
		    (T (CONS FRAME.NAME FRAME.LIST]
		(SETQ NOT.DONE (CONFIRM "ANY MORE FRAMES?")))
          (RETURN FRAME.LIST])

(ADD.NEW.FRAME
  [LAMBDA (INTERFACE NEW.FRAME)                              (* DAHJr " 5-DEC-83 11:51")
    (DECLARE (GLOBALVARS CURRENT.FRAME.NAMES))
    (PROG (NAMES)
          (SETQ NAMES (MERGEINSERT (GET.FIELDQ NEW.FRAME NAME FRAME)
				   CURRENT.FRAME.NAMES))
          (SORT (NCONC1 (GET.FIELDQ INTERFACE FRAMES INTERFACE)
			NEW.FRAME)
		(QUOTE SORT.FRAMES))
          (SET.CURRENT.FRAME.NAMES NAMES])

(COPY.FRAME
  [LAMBDA (FRAME)                                            (* T.Bigham "12-Nov-84 10:56")
                                                             (* copies the classes now.)
    (PROG (NAME SUPERFRAMES ITEMS CLASSES)
          (SETQ NAME (GET.FIELDQ FRAME NAME))
          (SETQ SUPERFRAMES (COPY (GET.FIELDQ FRAME SUPERFRAMES)))
          (SETQ CLASSES (COPY (GET.FIELDQ FRAME CLASSES)))
          (SETQ ITEMS (for ITEM in (GET.FIELDQ FRAME ITEMS) collect (COPY.ITEM ITEM)))
          (RETURN (ITEM.CREATE FRAME (NAME NAME)
			       (SUPERFRAMES SUPERFRAMES)
			       (CLASSES CLASSES)
			       (ITEMS ITEMS])

(CREATE.NEW.FRAME
  [LAMBDA (INTERFACE)                                        (* HaKo "25-Jul-84 16:27")
    (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Creating new frame; Name of new frame: ")
    (PROG ((NEW.NAME (PROMPT.READ)))
          (COND
	    ((NOT (ATOM NEW.NAME))
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Name must be one word"))
	    ((FIND.FRAME INTERFACE NEW.NAME)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "The name " NEW.NAME " is already in use"))
	    (T (ADD.NEW.FRAME INTERFACE (ITEM.CREATE FRAME (NAME NEW.NAME)))
	       (MARK.INTERFACE INTERFACE)
	       (RETURN NEW.NAME])

(DELETE.FRAME
  [LAMBDA (INTERFACE FRAME.NAME)                             (* HaKo " 8-Jun-84 15:32")
                                                             (* edited: "15-APR-83 17:53")
    (DECLARE (GLOBALVARS CURRENT.FRAME.NAMES))
    (DREMOVE (FIND.FRAME INTERFACE FRAME.NAME)
	     (GET.FIELDQ INTERFACE FRAMES INTERFACE))
    (SET.CURRENT.FRAME.NAMES (DREMOVE FRAME.NAME CURRENT.FRAME.NAMES))
    (MARK.INTERFACE INTERFACE])

(EDIT.FRAME
  [LAMBDA (INTERFACE.WINDOW)                                 (* T.Bigham "16-Oct-84 03:47")
                                                             (* "Top level of the editor")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE))
    (PROG [(FRAME (WINDOWPROP INTERFACE.WINDOW (QUOTE CURRENT.FRAME]
          (SELECTQ (MENU (GET.FRAME.EDITOR.COMMAND.MENU))
		   (NIL NIL)
		   (CREATE.NEW.ITEM (CREATE.NEW.ITEM NIL FRAME))
		   (COPY.ITEM (INTERACT&COPY.ITEM (ACQUIRE.ITEM FRAME)
						  FRAME))
		   (MOVE.ITEM (MOVE.ITEM FRAME))
		   (SHAPE.ITEM (SHAPE.ITEM (ACQUIRE.ITEM FRAME)
					   FRAME))
		   (NAME.ITEM (NAME.ITEM FRAME))
		   [EDIT.ITEM (COND
				((KEYDOWNP (QUOTE LSHIFT))
				  (REFORM.ITEM FRAME))
				(T (INTERACT&EDIT.ITEM FRAME]
		   (PRINT.ITEMS (PRINT.ITEMS FRAME))
		   (GRAPH.ITEMS (GRAPH.ITEMS FRAME))
		   (EXPAND.ITEM (EXPAND.ITEM FRAME))
		   (DELETE.ITEM (DELETE.ITEM FRAME))
		   (BURY.ITEM (BURY.ITEM FRAME))
		   (FREEZE.ITEM (INTERACT&FREEZE.ITEM FRAME))
		   (THAW.ITEM (INTERACT&THAW.ITEM FRAME))
		   (GROUP.ITEMS (GROUP.ITEMS FRAME))
		   (ALIGN.ITEMS (ALIGN.ITEMS FRAME))
		   (MODIFY.ITEMS (MODIFY.ITEMS FRAME))
		   (SAVE.ITEM (SAVE.ITEM FRAME))
		   (RETRIEVE.SAVED.ITEM (RETRIEVE.SAVED.ITEM FRAME))
		   (MANIPULATE.SUPERFRAMES (MANIPULATE.SUPERFRAMES FRAME))
		   (ADD.SUPERFRAME (ADD.SUPERFRAME FRAME)
				   (DISPLAY.FRAME FRAME))
		   (FORGET.SUPERFRAME (FORGET.SUPERFRAMES FRAME)
				      (DISPLAY.FRAME FRAME))
		   (PRINT.SUPERFRAMES (PRINT.SUPERFRAMES FRAME))
		   (ADD.FRAME.CLASS (ADD.FRAME.CLASS FRAME))
		   (ADD.CLASS.TO.CURRENT.FRAME (ADD.CLASS.TO.CURRENT.FRAME FRAME))
		   (DELETE.CLASS.FROM.CURRENT.FRAME (DELETE.CLASS.FROM.CURRENT.FRAME FRAME))
		   (FORGET.FRAME.CLASS (FORGET.FRAME.CLASS FRAME))
		   (PRINT.FRAME.CLASSES (PRINT.FRAME.CLASSES FRAME))
		   (EXPOSE.ITEM.EDITORS (EXPOSE.ITEM.EDITORS))
		   (FORGET.ITEM.EDITORS (THINKING (FORGET.EDIT.WINDOWS)))
		   (DEFINE.ITEM.TYPE (DEFINE.ITEM.TYPE))
		   (MANIPULATE.FRAMES (MANIPULATE.FRAMES))
		   (MANIPULATE.CLASSES (MANIPULATE.CLASSES))
		   (MANIPULATE.INTERFACE (MANIPULATE.INTERFACE CURRENT.INTERFACE))
		   (ANALYZE.FRAME (THINKING (RESET.FRAME FRAME)
					    (ANALYZE.FRAME.IF.NECESSARY* FRAME)
					    (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
					    (DISPLAY.FRAME FRAME)))
		   (INITIALIZE.FRAME (THINKING (DISPLAY.FRAME FRAME T)))
		   (DISPLAY.FRAME (THINKING (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
					    (DISPLAY.FRAME FRAME)))
		   (HARDCOPY.FRAME (THINKING (HARDCOPY.FRAME FRAME)))
		   (INSPECT.FRAME (INSPECT/PLIST FRAME))
		   (SHOULDNT "Unrecognized command in EDIT.FRAME"])

(FORGET.FRAME.CLASS
  [LAMBDA (FRAME)                                            (* HaKo "25-Jul-84 16:28")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE FRAME.NAME.MENU))
    (PROG (FRAME.NAME CLASSES CLASS.NAME)
          (SETQ FRAME.NAME (GET.FIELDQ FRAME NAME FRAME))
          (SETQ CLASSES (GET.FIELDQ FRAME CLASSES))
          (COND
	    ((NULL CLASSES)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "This frame has no classes; can't forget one"))
	    (T (SETQ CLASS.NAME
		 (MENU (create MENU
			       ITEMS ← CLASSES
			       TITLE ← "Classes"
			       CENTERFLG ← T
			       CHANGEOFFSETFLG ← T)))
	       (COND
		 ((AND CLASS.NAME (CONFIRM (CONCAT "Forget class" CLASS.NAME "?")))
		   (SET.FIELDQ FRAME CLASSES (REMOVE CLASS.NAME CLASSES))
		   (MARK.INTERFACE CURRENT.INTERFACE)
		   (SETQ FRAME.NAME.MENU)
		   (RETURN T))
		 (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "FORGET.FRAME.CLASS command aborted"])

(FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN
  [LAMBDA (GRAPHNODE GRAPH.WINDOW)                           (* HaKo "26-Jul-84 15:57")
                                                             (* DAHJr "25-JUN-83 17:30")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE CURRENT.INTERFACE.WINDOW))
    (PROG (COMMAND.MENU COMMAND INTERFACE.WINDOW INTERFACE FRAME NEW.WINDOW)
          (COND
	    (GRAPHNODE (SETQ INTERFACE.WINDOW (WINDOWPROP GRAPH.WINDOW (QUOTE INTERFACE.WINDOW)))
		       (SETQ COMMAND.MENU (GET.FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN.MENU))
		       (SETQ COMMAND (MENU COMMAND.MENU))
		       (SELECTQ COMMAND
				(NIL NIL)
				(MAKE.SUBGRAPH (SETQ NEW.WINDOW (MAKE.GRAPH.MAKE.SUBGRAPH GRAPHNODE 
										     GRAPH.WINDOW))
					       (WINDOWPROP NEW.WINDOW (QUOTE INTERFACE.WINDOW)
							   INTERFACE.WINDOW)
					       (WINDOWPROP NEW.WINDOW (QUOTE TRILLIUM.WINDOW.TYPE)
							   (QUOTE GRAPH.FRAME.WINDOW))
					       (ADD.DEPENDENT.WINDOW INTERFACE.WINDOW NEW.WINDOW))
				((MOVE.TO.FRAME PUSH.TO.FRAME POP.TO.FRAME)
				  (TOTOPW INTERFACE.WINDOW)
				  (COND
				    ((NEQ INTERFACE.WINDOW CURRENT.INTERFACE.WINDOW)
				      (RESTORE.INTERFACE.CONTEXT INTERFACE.WINDOW)))
				  (SETQ FRAME (MAKE.GRAPH.DATUM GRAPHNODE))
				  (SELECTQ COMMAND
					   (MOVE.TO.FRAME (MOVE.TO.FRAME CURRENT.INTERFACE FRAME))
					   (PUSH.TO.FRAME (PUSH.TO.FRAME CURRENT.INTERFACE FRAME))
					   (POP.TO.FRAME (POP.TO.FRAME CURRENT.INTERFACE FRAME))
					   (SHOULDNT))
				  (TOTOPW GRAPH.WINDOW))
				(INSPECT (INSPECT (MAKE.GRAPH.DATUM GRAPHNODE)))
				(SHOULDNT])

(FREEZE.FRAME
  [LAMBDA (FRAME)                                            (* HaKo "16-Aug-84 14:46")
    (DECLARE (GLOBALVARS REPORT.FRAMES))
    (COND
      ((NOT (GET.FIELDQ FRAME FROZEN FRAME))
	(PROG ((PRIMITIVES (CONS)))
	      (AND REPORT.FRAMES (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Freezing frame: "
						    (GET.FIELDQ FRAME NAME)
						    ". . ."))
	      (FREEZE.SUBITEMS PRIMITIVES (GET.FIELDQ FRAME ITEMS))
	      (RESET.FRAME FRAME T)
	      (SET.FIELDQ FRAME FROZEN (GET.FIELDQ FRAME ITEMS))
	      (SET.FIELDQ FRAME ITEMS (CAR PRIMITIVES))
	      (AND REPORT.FRAMES (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.LINE " done."))
	      (RETURN T])

(GET.FRAME.EDITOR.COMMAND.MENU
  [LAMBDA NIL                                                (* DAHJr " 5-DEC-83 12:44")

          (* * EVAL THIS WHEN MENU IS CHANGED (SETQ FRAME.EDITOR.COMMAND.MENU))


    (DECLARE (GLOBALVARS FRAME.EDITOR.COMMAND.MENU FULL.MENU))
    (OR FRAME.EDITOR.COMMAND.MENU (SETQ FRAME.EDITOR.COMMAND.MENU (COND
	    (FULL.MENU (GET.FRAME.EDITOR.COMMAND.MENU.LONG))
	    (T (GET.FRAME.EDITOR.COMMAND.MENU.SHORT])

(GET.FRAME.EDITOR.COMMAND.MENU.LONG
  [LAMBDA NIL                                                (* T.Bigham "16-Oct-84 04:02")
    (create MENU
	    TITLE ← "Frame editor commands"
	    ITEMS ←(QUOTE ((CREATE.NEW.ITEM (QUOTE CREATE.NEW.ITEM)
					    "For adding a new item to the frame")
			    (COPY.ITEM (QUOTE COPY.ITEM)
				       "For making a copy of an item in the frame")
			    (MOVE.ITEM (QUOTE MOVE.ITEM)
				       "For repositioning an item in the frame")
			    (SHAPE.ITEM (QUOTE SHAPE.ITEM)
					"For reshaping/repositioning an item in the frame")
			    (NAME.ITEM (QUOTE NAME.ITEM)
				       "For attaching a name to an item")
			    (EDIT.ITEM (QUOTE EDIT.ITEM)
				       "For opening an editor window for an item in the frame")
			    (DELETE.ITEM (QUOTE DELETE.ITEM)
					 "For removing an item from the frame")
			    (EXPAND.ITEM (QUOTE EXPAND.ITEM)
					 
		 "For replacing an item with the set of items which is its first-level expansion")
			    (BURY.ITEM (QUOTE BURY.ITEM)
				       "For changing the overlaying of items in the frame")
			    (FREEZE.ITEM (QUOTE FREEZE.ITEM)
					 "For freezing (condensing) an item")
			    (THAW.ITEM (QUOTE THAW.ITEM)
				       "For restoring a FROZEN item")
			    (SAVE.ITEM (QUOTE SAVE.ITEM)
				       
				 "For saving a copy of an item in the frame in the SAVE register")
			    (RETRIEVE.SAVED.ITEM (QUOTE RETRIEVE.SAVED.ITEM)
						 
			       "For adding of copy of the item in the SAVE register to the frame")
			    ("" NIL)
			    (GROUP.ITEMS (QUOTE GROUP.ITEMS)
					 
			    "For creating an item of type GROUP from a set of items in the frame")
			    (ALIGN.ITEMS (QUOTE ALIGN.ITEMS)
					 "Pops up a menu for aligning items.")
			    (MODIFY.ITEMS (QUOTE MODIFY.ITEMS)
					  "For changing all items match a pattern in a uniform way")
			    (PRINT.ITEMS (QUOTE PRINT.ITEMS)
					 "For browsing the items in the frame")
			    (GRAPH.ITEMS (QUOTE GRAPH.ITEMS)
					 "Produces a graph of the items in the frame")
			    (" " NIL)
			    (DEFINE.ITEM.TYPE (QUOTE DEFINE.ITEM.TYPE)
					      "For defining a new item.type from an example")
			    (" " NIL)
			    (MANIPULATE.SUPERFRAMES (QUOTE MANIPULATE.SUPERFRAMES)
						    "For general manipulation of SUPERFRAMES")
			    (ADD.SUPERFRAME (QUOTE ADD.SUPERFRAME)
					    
			   "For including in this frame all items in another frame (recursively)")
			    (FORGET.SUPERFRAME (QUOTE FORGET.SUPERFRAME)
					       "For removing a superframe from this frame")
			    (PRINT.SUPERFRAMES (QUOTE PRINT.SUPERFRAMES)
					       "For showing the superframes of this frame")
			    (" " NIL)
			    (MANIPULATE.CLASSES (QUOTE MANIPULATE.CLASSES)
						
	 "For entering the section of TRILLIUM used for manipulating frames within the interface")
			    (ADD.CLASS.TO.CURRENT.FRAME (QUOTE ADD.CLASS.TO.CURRENT.FRAME)
							"For adding a CLASS to the Current Frame")
			    (DELETE.CLASS.FROM.CURRENT.FRAME (QUOTE DELETE.CLASS.FROM.CURRENT.FRAME)
							     
						      "For deleting a CLASS to the Current Frame")
			    (PRINT.FRAME.CLASSES (QUOTE PRINT.FRAME.CLASSES)
						 "For showing the classes of this frame")
			    (" " NIL)
			    (EXPOSE.ITEM.EDITORS (QUOTE EXPOSE.ITEM.EDITORS)
						 
				  "For displaying the item editor windows for items in the frame")
			    (FORGET.ITEM.EDITORS (QUOTE FORGET.ITEM.EDITORS)
						 
			      "For destroying all the item editor windows for items in the frame")
			    (" " NIL)
			    (MANIPULATE.FRAMES (QUOTE MANIPULATE.FRAMES)
					       
	 "For entering the section of TRILLIUM used for manipulating frames within the interface")
			    (MANIPULATE.INTERFACE (QUOTE MANIPULATE.INTERFACE)
						  "For operating on the interface as a whole")
			    (" " NIL)
			    (ANALYZE.FRAME (QUOTE ANALYZE.FRAME)
					   
			 "For re-expanding all the items in the frame; a reset/cleanup operation")
			    (INITIALIZE.FRAME (QUOTE INITIALIZE.FRAME)
					      "Run the initializations and re-display the frame")
			    (DISPLAY.FRAME (QUOTE DISPLAY.FRAME)
					   "For re-displaying the frame")
			    (HARDCOPY.FRAME (QUOTE HARDCOPY.FRAME)
					    "For making hardcopy of the frame")
			    (INSPECT.FRAME (QUOTE INSPECT.FRAME)
					   
			    "For opening an INSPECT window on the frame; a maintenance operation")))
	    CENTERFLG ← T
	    CHANGEOFFSETFLG ← T])

(GET.FRAME.EDITOR.COMMAND.MENU.SHORT
  [LAMBDA NIL                                                (* DAHJr " 8-DEC-83 16:41")
    (create MENU
	    TITLE ← "Frame editor commands"
	    ITEMS ←(QUOTE ((CREATE.NEW.ITEM (QUOTE CREATE.NEW.ITEM)
					    "For adding a new item to the frame")
			    (COPY.ITEM (QUOTE COPY.ITEM)
				       "For making a copy of an item in the frame")
			    (MOVE.ITEM (QUOTE MOVE.ITEM)
				       "For repositioning an item in the frame")
			    (SHAPE.ITEM (QUOTE SHAPE.ITEM)
					"For reshaping/repositioning an item in the frame")
			    (EDIT.ITEM (QUOTE EDIT.ITEM)
				       "For opening an editor window for an item in the frame")
			    (DELETE.ITEM (QUOTE DELETE.ITEM)
					 "For removing an item from the frame")
			    (EXPAND.ITEM (QUOTE EXPAND.ITEM)
					 
		 "For replacing an item with the set of items which is its first-level expansion")
			    (GROUP.ITEMS (QUOTE GROUP.ITEMS)
					 
			    "For creating an item of type GROUP from a set of items in the frame")
			    (PRINT.ITEMS (QUOTE PRINT.ITEMS)
					 "For browsing the items in the frame")
			    (" " NIL)
			    (MANIPULATE.FRAMES (QUOTE MANIPULATE.FRAMES)
					       
	 "For entering the section of TRILLIUM used for manipulating frames within the interface")
			    (DEFINE.ITEM.TYPE (QUOTE DEFINE.ITEM.TYPE)
					      "For defining a new item.type from an example")
			    (" " NIL)
			    (ANALYZE.FRAME (QUOTE ANALYZE.FRAME)
					   
			 "For re-expanding all the items in the frame; a reset/cleanup operation")))
	    CENTERFLG ← T
	    CHANGEOFFSETFLG ← T])

(GET.GRAPH.FRAMES.MENU
  [LAMBDA NIL                                                (* DAHJr "29-MAR-83 16:28")
                                                             (* USE WHEN CHANGING THE MENU 
							     (SETQ GRAPH.FRAMES.MENU))
    (DECLARE (GLOBALVARS GRAPH.FRAMES.MENU))
    (OR GRAPH.FRAMES.MENU (SETQ GRAPH.FRAMES.MENU (create MENU
							  TITLE ← "Graph type"
							  ITEMS ←(QUOTE (CHANGE.FRAME.STRUCTURE
									  SUPERFRAME.STRUCTURE 
									  THIS.FRAME.AND.FRIENDS))
							  CENTERFLG ← T
							  CHANGEOFFSETFLG ← T])

(GET.MANIPULATE.FRAMES.COMMAND.MENU
  [LAMBDA NIL                                                (* HaKo "26-Jul-84 16:06")
                                                             (* WHEN MENU CHANGES EVAL: (SETQ 
							     MANIPULATE.FRAMES.COMMAND.MENU NIL))
    (DECLARE (GLOBALVARS MANIPULATE.FRAMES.COMMAND.MENU))
    (OR MANIPULATE.FRAMES.COMMAND.MENU
	(SETQ MANIPULATE.FRAMES.COMMAND.MENU
	  (create MENU
		  ITEMS ←(QUOTE (PUSH.TO.FRAME MOVE.TO.FRAME POP.TO.FRAME SHOW.FRAME.STACK 
					       CLEAR.FRAME.STACK CREATE.NEW.FRAME COPY.FRAME 
					       RENAME.FRAME DELETE.FRAME SAVE.FRAME RETRIEVE.FRAME 
					       FREEZE.FRAME THAW.FRAME SET.FIRST.FRAME GRAPH.FRAMES 
					       QUIT))
		  TITLE ← "Frame manipulation"
		  CENTERFLG ← T
		  CHANGEOFFSETFLG ← T])

(GET.RENAME.FRAME.MENU
  [LAMBDA NIL                                                (* edited: "17-May-84 10:18")
    (DECLARE (GLOBALVARS RENAME.FRAME.MENU))
    (OR RENAME.FRAME.MENU (SETQ RENAME.FRAME.MENU (create MENU
							  TITLE ← "Change All Item References"
							  ITEMS ←(QUOTE ((YES T 
			       "Change references to the old frame in all items of the interface")
									  (NO (QUOTE NIL)
									      
							      "Only change the name of the frame")))
							  CENTERFLG ← T])

(GRAPH.FRAME.SUPERFRAMES
  [LAMBDA (FRAME INTERFACE)                                  (* DAHJr "29-MAR-83 17:23")
    (for FRAME.NAME in (GET.FIELDQ FRAME SUPERFRAMES) bind FRAME when (SETQ FRAME (FIND.FRAME 
											INTERFACE 
										       FRAME.NAME))
       collect FRAME])

(GRAPH.FRAMES
  [LAMBDA NIL                                                (* HaKo "26-Jul-84 16:10")
                                                             (* DAHJr "25-JUN-83 17:07")
    (DECLARE (GLOBALVARS CHANGE.FRAME.STRUCTURE.GRAPH.SPEC CURRENT.FRAME CURRENT.INTERFACE 
			 CURRENT.INTERFACE.WINDOW FRAME.FRIENDS.GRAPH.SPEC 
			 SUPERFRAME.STRUCTURE.GRAPH.SPEC))
    (PROG (NAME COMMAND.MENU COMMAND ITYPES GRAPH.SPEC FRAMES POSSIBLE.ROOTS REAL.ROOTS TITLE DEPTH 
		GRAPH.FRAME.WINDOW)
          (SETQ COMMAND.MENU (GET.GRAPH.FRAMES.MENU))
          (SETQ COMMAND (MENU COMMAND.MENU))
          (COND
	    ((NULL COMMAND)
	      (RETURN)))
          (THINKING (SETQ FRAMES (GET.FIELDQ CURRENT.INTERFACE FRAMES INTERFACE))
		    (SELECTQ COMMAND
			     (CHANGE.FRAME.STRUCTURE (SETQ GRAPH.SPEC 
						       CHANGE.FRAME.STRUCTURE.GRAPH.SPEC)
						     [SETQ POSSIBLE.ROOTS (for FRAME in FRAMES
									     collect
									      (CONS FRAME
										    (QUOTE FRAME]
						     (SETQ REAL.ROOTS (MAKE.GRAPH.FIND.ROOTS 
										       GRAPH.SPEC 
										   POSSIBLE.ROOTS 
										CURRENT.INTERFACE))
						     (SETQ TITLE (CONCAT 
							  "Change frame structure for interface "
									 (GET.FIELDQ 
										CURRENT.INTERFACE 
										     NAME)))
						     (SETQ DEPTH 10))
			     (SUPERFRAME.STRUCTURE (SETQ GRAPH.SPEC SUPERFRAME.STRUCTURE.GRAPH.SPEC)
						   [SETQ POSSIBLE.ROOTS (for FRAME in FRAMES
									   collect
									    (CONS FRAME (QUOTE FRAME]
						   (SETQ REAL.ROOTS (MAKE.GRAPH.FIND.ROOTS GRAPH.SPEC 
										   POSSIBLE.ROOTS 
										CURRENT.INTERFACE))
						   (SETQ TITLE (CONCAT 
							    "Superframe structure for interface "
								       (GET.FIELDQ CURRENT.INTERFACE 
										   NAME)))
						   (SETQ DEPTH 10))
			     (THIS.FRAME.AND.FRIENDS (SETQ GRAPH.SPEC FRAME.FRIENDS.GRAPH.SPEC)
						     [SETQ REAL.ROOTS (LIST (CONS CURRENT.FRAME
										  (QUOTE FRAME]
						     (SETQ TITLE (CONCAT "Friends of frame "
									 (GET.FIELDQ CURRENT.FRAME 
										     NAME)))
						     (SETQ DEPTH 10))
			     (ERROR COMMAND ": unrecognized command in GRAPH.FRAMES"))
		    (SETQ GRAPH.FRAME.WINDOW (MAKE.GRAPH NIL TITLE GRAPH.SPEC REAL.ROOTS 
							 CURRENT.INTERFACE NIL (QUOTE 
								FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN)
							 NIL DEPTH))
		    (WINDOWPROP GRAPH.FRAME.WINDOW (QUOTE INTERFACE.WINDOW)
				CURRENT.INTERFACE.WINDOW)
		    (WINDOWPROP GRAPH.FRAME.WINDOW (QUOTE TRILLIUM.WINDOW.TYPE)
				(QUOTE GRAPH.FRAME.WINDOW))
		    (ADD.DEPENDENT.WINDOW CURRENT.INTERFACE.WINDOW GRAPH.FRAME.WINDOW))
          (RETURN GRAPH.FRAME.WINDOW])

(GRAPH.FRAMES.MENTION.AS.SUPERFRAME
  [LAMBDA (FRAME INTERFACE)                                  (* DAHJr "29-MAR-83 17:26")
    (PROG (FRAMES.NAMES)
          (SETQ FRAMES.NAMES (USED.AS.SUPERFRAME.BY (GET.FIELDQ FRAME NAME)
						    INTERFACE))
          (SETQ FRAMES.NAMES (INTERSECTION FRAMES.NAMES FRAMES.NAMES))
          (SETQ FRAMES.NAMES (SORT FRAMES.NAMES))
          (RETURN (for FRAME.NAME in FRAMES.NAMES bind FRAME when (SETQ FRAME (FIND.FRAME INTERFACE 
										       FRAME.NAME))
		     collect FRAME])

(GRAPH.FRAMES.MENTIONED.FRAMES
  [LAMBDA (FRAME INTERFACE)                                  (* SGK " 9-AUG-83 10:20")
    (PROG (FRAMES.NAMES)
          (SETQ FRAMES.NAMES (GET.FRAME.SONS FRAME))
          (SETQ FRAMES.NAMES (INTERSECTION FRAMES.NAMES FRAMES.NAMES))
          (SETQ FRAMES.NAMES (SORT FRAMES.NAMES))
          (RETURN (for FRAME.NAME in FRAMES.NAMES bind FRAME when (SETQ FRAME (FIND.FRAME INTERFACE 
										       FRAME.NAME))
		     collect FRAME])

(INTERACT&ADD.FRAME.CLASS
  [LAMBDA (FRAME)                                            (* HaKo "25-Jul-84 16:29")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE))
    (PROG (FRAME.NAME CLASSES CLASS SUPER.FRAME)
          (SETQ FRAME.NAME (GET.FIELDQ FRAME NAME FRAME))
          (SETQ CLASSES (GET.FIELDQ FRAME CLASSES))
          (SETQ CLASS (ACQUIRE.CLASS.NAME CURRENT.INTERFACE))
          (COND
	    ((NULL CLASS)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "ADD.FRAME.CLASS command aborted"))
	    (T (ADD.FRAME.CLASS FRAME CLASS)
	       (MARK.INTERFACE CURRENT.INTERFACE)
	       (RETURN T])

(INTERACT&COPY.FRAME
  [LAMBDA (INTERFACE FRAME)                                  (* HaKo "16-Aug-84 14:47")
    (PROG (NEW.NAME NEW.FRAME)
          (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Copying frame " (GET.FIELDQ FRAME NAME FRAME))
          (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Name of copy: ")
          (SETQ NEW.NAME (PROMPT.READ))
          (COND
	    ((NULL NEW.NAME)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Copy command aborted"))
	    ((NOT (ATOM NEW.NAME))
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Name must be one word"))
	    ((FIND.FRAME INTERFACE NEW.NAME)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "The name " NEW.NAME " is already in use"))
	    (T (SETQ NEW.FRAME (COPY.FRAME FRAME))
	       (SET.FIELDQ NEW.FRAME NAME NEW.NAME)
	       (ADD.NEW.FRAME INTERFACE NEW.FRAME)
	       (MARK.INTERFACE INTERFACE)
	       (RETURN NEW.NAME])

(INTERACT&FREEZE.FRAME
  [LAMBDA (INTERFACE)                                        (* HaKo "25-Jul-84 16:31")
    (PROG (FRAME (FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE)))
          (COND
	    [(AND FRAME.NAME (SETQ FRAME (FIND.FRAME INTERFACE FRAME.NAME)))
	      (THINKING (COND
			  ((FREEZE.FRAME FRAME)
			    (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
			    (MARK.INTERFACE INTERFACE))
			  (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Frame " FRAME.NAME 
						" is already frozen."]
	    (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "FREEZE.FRAME aborted."])

(INTERACT&RETRIEVE.FRAME
  [LAMBDA (INTERFACE)                                        (* HaKo "25-Jul-84 16:32")
    (DECLARE (GLOBALVARS TRILLIUM.SAVED.FRAME))
    (TRILLIUM.PRINTOUT ON PROMPTWINDOW "Retrieving a copy of the saved frame; name for the copy: ")
    (PROG ((NEW.NAME (PROMPT.READ))
	   NEW.FRAME)
          (COND
	    ((NULL NEW.NAME)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Retrieve command aborted"))
	    ((NOT (ATOM NEW.NAME))
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Name must be one word"))
	    ((FIND.FRAME INTERFACE NEW.NAME)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "The name " NEW.NAME " is already in use"))
	    (T (SETQ NEW.FRAME (COPY.FRAME TRILLIUM.SAVED.FRAME))
	       (SET.FIELDQ NEW.FRAME NAME NEW.NAME FRAME)
	       (ADD.NEW.FRAME INTERFACE NEW.FRAME)
	       (MARK.INTERFACE INTERFACE)
	       (RETURN NEW.NAME])

(INTERACT&THAW.FRAME
  [LAMBDA (INTERFACE)                                        (* HaKo "16-Aug-84 14:47")
    (PROG (FRAME (FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE)))
          (COND
	    [(AND FRAME.NAME (SETQ FRAME (FIND.FRAME INTERFACE FRAME.NAME)))
	      (THINKING (COND
			  ((THAW.FRAME FRAME INTERFACE)
			    (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
			    (MARK.INTERFACE INTERFACE)
			    (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Frame " FRAME.NAME " thawed."))
			  (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Frame " FRAME.NAME 
						" couldn't be thawed."]
	    (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "THAW.FRAME aborted."])

(MANIPULATE.FRAMES
  [LAMBDA NIL                                                (* HaKo "16-Aug-84 14:48")
                                                             (* edited: "19-Jul-84 21:34")
    (DECLARE (GLOBALVARS CURRENT.FRAME CURRENT.INTERFACE CURRENT.INTERFACE.WINDOW 
			 TRILLIUM.SAVED.FRAME))
    (PROG (INTERFACE COMMAND.MENU COMMAND FRAME.NAME OLD.FRAME.NAME NEW.FRAME.NAME REFERENCES.TOO 
		     FRAME STACK SUBFRAMES)
          (SETQ INTERFACE CURRENT.INTERFACE)
          (SETQ COMMAND.MENU (GET.MANIPULATE.FRAMES.COMMAND.MENU))
          (do (SETQ COMMAND (MENU COMMAND.MENU))
	      (TRILLIUM.CLEAR.ALL.PROMPTING)
	      (SELECTQ COMMAND
		       (NIL)
		       (QUIT (RETURN))
		       [PUSH.TO.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				      (COND
					(FRAME.NAME (SETQ FRAME (FIND.FRAME INTERFACE FRAME.NAME))
						    (FRAME.DO.PUSH FRAME)
						    (START.FRAME FRAME T]
		       [MOVE.TO.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				      (COND
					(FRAME.NAME (SETQ FRAME (FIND.FRAME INTERFACE FRAME.NAME))
						    (FRAME.DO.GOTO FRAME)
						    (START.FRAME FRAME]
		       [POP.TO.FRAME [SETQ FRAME.NAME (MENU (create MENU
								    TITLE ← "Stack frames"
								    ITEMS ←(CDR (WINDOWPROP
										  
									 CURRENT.INTERFACE.WINDOW
										  (QUOTE 
										   TRILLIUM.STACK]
				     (COND
				       (FRAME.NAME (SETQ FRAME (FRAME.DO.POP (FIND.FRAME INTERFACE 
										       FRAME.NAME)))
						   (COND
						     (FRAME (START.FRAME FRAME]
		       (SHOW.FRAME.STACK (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Frame stack: ")
					 (for FRAME.NAME in (WINDOWPROP CURRENT.INTERFACE.WINDOW
									(QUOTE TRILLIUM.STACK))
					    do (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE SAME.BLOCK 1 
								  FRAME.NAME)))
		       (CLEAR.FRAME.STACK (WINDOWPROP CURRENT.INTERFACE.WINDOW (QUOTE TRILLIUM.STACK)
						      (LIST (GET.FIELDQ CURRENT.FRAME NAME FRAME)))
					  (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE 
							     "Frame stack is now empty"))
		       [COPY.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				   (COND
				     (FRAME.NAME (INTERACT&COPY.FRAME INTERFACE (FIND.FRAME INTERFACE 
										       FRAME.NAME]
		       [RENAME.FRAME (SETQ OLD.FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				     (COND
				       (OLD.FRAME.NAME (TRILLIUM.PRINTOUT "New Frame Name: ")
						       (SETQ NEW.FRAME.NAME (PROMPT.READ))
						       (COND
							 (NEW.FRAME.NAME (SETQ REFERENCES.TOO
									   (MENU (
GET.RENAME.FRAME.MENU)))
									 (RENAME.FRAME OLD.FRAME.NAME 
										   NEW.FRAME.NAME 
										       INTERFACE 
										   REFERENCES.TOO]
		       [DELETE.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				     (COND
				       ((NULL FRAME.NAME))
				       [(SETQ SUBFRAMES (USED.AS.SUPERFRAME.BY FRAME.NAME INTERFACE))
					 (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "Frame " FRAME.NAME 
							    " is used as a superframe on "
							    T)
					 (for FRAME.NAME in SUBFRAMES
					    do (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS SAME.LINE " " 
								  FRAME.NAME))
					 (COND
					   ((CONFIRM (CONCAT "Frame " FRAME.NAME 
							    " used as superframe; delete anyway?"))
					     (DELETE.FRAME INTERFACE FRAME.NAME]
				       ((CONFIRM (CONCAT "Delete frame named " FRAME.NAME "?"))
					 (DELETE.FRAME INTERFACE FRAME.NAME]
		       (CREATE.NEW.FRAME (CREATE.NEW.FRAME INTERFACE))
		       [SAVE.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
				   (COND
				     (FRAME.NAME (THINKING (SETQ FRAME (FIND.FRAME INTERFACE 
										   FRAME.NAME))
							   (SETQ TRILLIUM.SAVED.FRAME (COPY.FRAME
							       FRAME)))
						 (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE "Frame " 
								    FRAME.NAME "saved"]
		       [RETRIEVE.FRAME (COND
					 (TRILLIUM.SAVED.FRAME (SETQ FRAME.NAME (
								   INTERACT&RETRIEVE.FRAME INTERFACE))
							       )
					 (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "No saved frame"]
		       (FREEZE.FRAME (INTERACT&FREEZE.FRAME INTERFACE))
		       (THAW.FRAME (INTERACT&THAW.FRAME INTERFACE))
		       [SET.FIRST.FRAME (SETQ FRAME.NAME (ACQUIRE.FRAME.NAME INTERFACE))
					(COND
					  (FRAME.NAME (SET.FIELDQ INTERFACE FIRST.FRAME FRAME.NAME 
								  DIALOG)
						      (TRILLIUM.PRINTOUT ON TRILLIUM.TRACE 
									 "First frame is now "
									 FRAME.NAME]
		       (GRAPH.FRAMES (GRAPH.FRAMES))
		       (SHOULDNT])

(MOVE.TO.FRAME
  [LAMBDA (DIALOG FRAME)                                     (* HaKo "25-Jul-84 16:36")
    (COND
      (FRAME (FRAME.DO.GOTO FRAME)
	     (START.FRAME FRAME)
	     (GET.FIELDQ FRAME NAME FRAME))
      (T (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS "I find no frame with that name")
	 NIL])

(PRINT.FRAME.CLASSES
  [LAMBDA (FRAME)                                            (* PH "13-Sep-84 14:14")
    (PROG (FRAME.NAME CLASSES)
          (SETQ FRAME.NAME (GET.FIELDQ FRAME NAME FRAME))
          (SETQ CLASSES (GET.FIELDQ FRAME CLASSES))
          (COND
	    (CLASSES (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS "Classes of frame " FRAME.NAME ": ")
		     (for CLASS in CLASSES do (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS 3 CLASS)))
	    (T (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS FRAME.NAME " has no classes")))
          (RETURN])

(PRINT.FRAMES
  [LAMBDA (FRAMES INTERFACE)                                 (* HaKo "16-Aug-84 14:49")
                                                             (* PT " 5-AUG-83 13:14")
    (DECLARE (GLOBALVARS CURRENT.FRAME.NAMES CURRENT.INTERFACE))
    (OR INTERFACE (SETQ INTERFACE CURRENT.INTERFACE))
    (OR FRAMES (SETQ FRAMES CURRENT.FRAME.NAMES))
    (PROG (SELECTED.SUPERS FLG SUPERFRAMES (FRAME.LIST))
          (CLRPROMPT)
          (SETQ SELECTED.SUPERS (ACQUIRE.FRAME.NAMES "Select SUPERFRAME names"))
          [THINKING (for FRAME.NAME in FRAMES
		       do (SETQ FLG T)
			  (SETQ SUPERFRAMES (GET.FIELDQ (FIND.FRAME INTERFACE FRAME.NAME)
							SUPERFRAMES))
			  (for SUPER.FRAME in SELECTED.SUPERS do (OR (MEMB SUPER.FRAME SUPERFRAMES)
								     (SETQ FLG NIL))
			     while FLG)
			  (AND FLG (SETQ FRAME.LIST (CONS FRAME.NAME FRAME.LIST]
          (CLRPROMPT)
          (COND
	    ((NULL FRAME.LIST)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS "No FRAMES have the following SUPERFRAMES:")
	      (for SUPER.FRAME in SELECTED.SUPERS do (TRILLIUM.PRINTOUT 3 SUPER.FRAME)))
	    (T (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS "FRAMES containing the SUPERFRAME(S):")
	       (for SUPER.FRAME in SELECTED.SUPERS do (TRILLIUM.PRINTOUT 3 SUPER.FRAME))
	       (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS " ")
	       (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS "Are the following:")
	       (for FRAME in FRAME.LIST do (TRILLIUM.PRINTOUT ON TRILLIUM.DESCRIPTIONS 3 FRAME])

(PUSH.TO.FRAME
  [LAMBDA (DIALOG FRAME)                                     (* edited: "22-DEC-82 10:22")
    (FRAME.DO.PUSH FRAME)
    (START.FRAME FRAME])

(RENAME.FRAME
  [LAMBDA (OLD.FRAME.NAME NEW.FRAME.NAME INTERFACE REFERENCES.TOO)
                                                             (* T.Bigham "17-Oct-84 08:53")
                                                             (* added Thinking Cursor)
    (DECLARE (GLOBALVARS FRAME.NAME.MENU))
    (THINKING (PROG (FRAME SUPERFRAME.NAMES)
		    (SETQ FRAME (FIND.FRAME INTERFACE OLD.FRAME.NAME))
		    (SET.FIELDQ FRAME NAME NEW.FRAME.NAME)
		    (SETQ FRAME.NAME.MENU NIL)
		    [COND
		      (REFERENCES.TOO (for FRAME in (GET.FIELDQ INTERFACE FRAMES)
					 do (WALK.FRAME FRAME NIL (FUNCTION RENAME.FRAME.IN.OBJECT)
							(CONS OLD.FRAME.NAME NEW.FRAME.NAME))
					    (SETQ SUPERFRAME.NAMES (GET.FIELDQ FRAME SUPERFRAMES))
					    (DSUBST NEW.FRAME.NAME OLD.FRAME.NAME SUPERFRAME.NAMES]
		    (RETURN NEW.FRAME.NAME])

(RENAME.FRAME.IN.OBJECT
  [LAMBDA (OBJECT PTYPE CONTEXT ACTIONFN ACTIONFNARG)        (* HaKo "15-Aug-84 15:00")
    [PROG ((OLD.NAME (CAR ACTIONFNARG))
	   (NEW.NAME (CDR ACTIONFNARG))
	   (PNAME (CAR CONTEXT))
	   (ITEM (CADR CONTEXT)))
          (COND
	    ((LISTP PTYPE)
	      (SELECTQ (CAR PTYPE)
		       [FRAME (COND
				((AND (EQ OBJECT OLD.NAME)
				      (LITATOM PNAME))
				  (SET.PARAM ITEM PNAME NEW.NAME]
		       (FORM (DSUBST NEW.NAME OLD.NAME OBJECT))
		       NIL]
    NIL])

(RESET.FRAME
  [LAMBDA (FRAME RESET.ITEMS)                                (* DAHJr " 5-DEC-83 15:41")
    (AND RESET.ITEMS (for ITEM in (GET.FIELDQ FRAME ITEMS FRAME)
			do (RESET.ITEM ITEM)
			   (COMPRESS.PROPLIST ITEM)))
    (RESET.6LISTS FRAME)
    (SET.FIELDQ FRAME ANALYZED NIL FRAME)
    (COMPRESS.PROPLIST FRAME])

(RESET.FRAMES
  [LAMBDA (FRAMES RESET.ITEMS)                               (* edited: " 6-JUL-82 22:56")
    (for FRAME in FRAMES do (RESET.FRAME FRAME RESET.ITEMS])

(RESET.PRIMITIVE.LISTS
  [LAMBDA (FRAME)                                            (* DAHJr " 7-FEB-83 12:00")
    (SET.FIELDQ FRAME INITIALIZATION NIL)
    (SET.FIELDQ FRAME ARTWORK NIL)
    (SET.FIELDQ FRAME SENSORS NIL)
    (SET.FIELDQ FRAME INHIBITORS NIL)
    (SET.FIELDQ FRAME DISPLAYERS NIL)
    (SET.FIELDQ FRAME IMPLICATIONS NIL)
    (COMPRESS.PROPLIST FRAME])

(SET.CURRENT.BITMAP.FRAMES
  [LAMBDA NIL                                                (* HaKo "27-Jul-84 12:25")
    (DECLARE (GLOBALVARS CURRENT.BITMAP.FRAMES CURRENT.INTERFACE))
    (SETQ CURRENT.BITMAP.FRAMES (for FRAME in (GET.FIELDQ CURRENT.INTERFACE FRAMES)
				   when (OR (MEMB (QUOTE BITMAPS)
						  (GET.FIELDQ FRAME CLASSES))
					    (MEMB (QUOTE BITMAP.FRAMES)
						  (GET.FIELDQ FRAME CLASSES)))
				   collect FRAME))
    [COND
      [(NULL CURRENT.BITMAP.FRAMES)
	(SETQ CURRENT.BITMAP.FRAMES (LIST (FIND.FRAME CURRENT.INTERFACE (QUOTE BITMAPS]
      (T (SETQ CURRENT.BITMAP.FRAMES (INTERSECTION CURRENT.BITMAP.FRAMES CURRENT.BITMAP.FRAMES]
    CURRENT.BITMAP.FRAMES])

(SET.CURRENT.FRAME.NAMES
  [LAMBDA (NAMES)                                            (* PH "17-May-84 13:21")
    (DECLARE (GLOBALVARS CURRENT.BITMAP.FRAMES CURRENT.FRAME.NAMES FRAME.NAME.MENU))
    (SETQ CURRENT.FRAME.NAMES NAMES)
    (SETQ CURRENT.BITMAP.FRAMES)
    (SETQ FRAME.NAME.MENU])

(SORT.FRAMES
  [LAMBDA (A B)                                              (* edited: "23-JUN-82 12:29")
    (ALPHORDER (GET.FIELDQ A NAME FRAME)
	       (GET.FIELDQ B NAME FRAME])

(THAW.FRAME
  [LAMBDA (FRAME INTERFACE)                                  (* HaKo "29-AUG-83 14:47")
    (PROG ((ORIGITEMS (GET.FIELDQ FRAME FROZEN)))
          (COND
	    ((AND ORIGITEMS (NEQ ORIGITEMS T))
	      (SET.FIELDQ FRAME ITEMS ORIGITEMS)
	      (SET.FIELDQ FRAME FROZEN NIL)
	      (RESET.FRAME FRAME T)
	      (RETURN T])

(TOP.ADD.SUPERFRAME
  [LAMBDA (FRAME)
    (ADD.SUPERFRAME FRAME)
    (DISPLAY.FRAME FRAME])

(TOP.ANALYZE.FRAME
  [LAMBDA (FRAME)                                            (* edited: "24-Jun-84 13:09")
    (THINKING (RESET.FRAME FRAME)
	      (ANALYZE.FRAME.IF.NECESSARY* FRAME)
	      (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
	      (DISPLAY.FRAME FRAME])

(TOP.DISPLAY.FRAME
  [LAMBDA (FRAME)                                            (* edited: "24-Jun-84 13:11")
    (THINKING (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
	      (DISPLAY.FRAME FRAME])

(TOP.EDIT.ITEM
  [LAMBDA (FRAME)
    (COND
      ((KEYDOWNP (QUOTE LSHIFT))
	(REFORM.ITEM FRAME))
      (T (INTERACT&EDIT.ITEM FRAME])

(TOP.FORGET.SUPERFRAMES
  [LAMBDA (FRAME)
    (FORGET.SUPERFRAMES FRAME)
    (DISPLAY.FRAME FRAME])

(TOP.HARDCOPY
  [LAMBDA (FRAME)                                            (* edited: "24-Jun-84 13:12")
    (THINKING (HARDCOPY.WINDOW])

(TOP.INITIALIZE.FRAME
  [LAMBDA (FRAME)                                            (* edited: "24-Jun-84 13:10")
    (THINKING (DISPLAY.FRAME FRAME T])
)

(RPAQQ CHANGE.FRAME.STRUCTURE.GRAPH.SPEC [FRAME (LABEL (GET.FIELDQ DATUM NAME)
						       SONS
						       ((GRAPH.FRAMES.MENTIONED.FRAMES DATUM CONTEXT)
							(QUOTE FRAME])

(RPAQQ FRAME.FRIENDS.GRAPH.SPEC [FRAME (LABEL (GET.FIELDQ DATUM NAME)
					      SONS
					      (EVAL (GRAPH.FRAMES.FRIENDS.SONS DATUM CONTEXT)))
				       REFERENCES
				       (LABEL (QUOTE REFERENCES)
					      SONS
					      (DATUM (QUOTE FRAME)))
				       SUPERFRAMES
				       (LABEL (QUOTE SUPERFRAMES)
					      SONS
					      (DATUM (QUOTE FRAME])

(RPAQQ CURRENT.FRAME.NAMES NIL)

(RPAQQ CURRENT.BITMAP.FRAMES NIL)

(RPAQQ FRAME.EDITOR.COMMAND.MENU NIL)

(RPAQQ FRAME.NAME.MENU NIL)

(RPAQQ RENAME.FRAME.MENU NIL)

(RPAQQ GRAPH.FRAMES.MENU NIL)

(RPAQQ MANIPULATE.FRAMES.COMMAND.MENU NIL)

(RPAQQ TRILLIUM.SAVED.FRAME NIL)
(PUTPROPS TRI-EDITFRAME COPYRIGHT ("Xerox Corporation" 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1832 38790 (ACQUIRE.FRAME.NAMES 1842 . 2616) (ADD.NEW.FRAME 2618 . 3044) (COPY.FRAME 
3046 . 3702) (CREATE.NEW.FRAME 3704 . 4318) (DELETE.FRAME 4320 . 4776) (EDIT.FRAME 4778 . 7443) (
FORGET.FRAME.CLASS 7445 . 8385) (FRAME.GRAPH.WINDOW.MIDDLEBUTTONFN 8387 . 9988) (FREEZE.FRAME 9990 . 
10668) (GET.FRAME.EDITOR.COMMAND.MENU 10670 . 11132) (GET.FRAME.EDITOR.COMMAND.MENU.LONG 11134 . 15501
) (GET.FRAME.EDITOR.COMMAND.MENU.SHORT 15503 . 17092) (GET.GRAPH.FRAMES.MENU 17094 . 17667) (
GET.MANIPULATE.FRAMES.COMMAND.MENU 17669 . 18479) (GET.RENAME.FRAME.MENU 18481 . 18994) (
GRAPH.FRAME.SUPERFRAMES 18996 . 19307) (GRAPH.FRAMES 19309 . 21984) (
GRAPH.FRAMES.MENTION.AS.SUPERFRAME 21986 . 22536) (GRAPH.FRAMES.MENTIONED.FRAMES 22538 . 23036) (
INTERACT&ADD.FRAME.CLASS 23038 . 23648) (INTERACT&COPY.FRAME 23650 . 24538) (INTERACT&FREEZE.FRAME 
24540 . 25110) (INTERACT&RETRIEVE.FRAME 25112 . 26003) (INTERACT&THAW.FRAME 26005 . 26656) (
MANIPULATE.FRAMES 26658 . 31195) (MOVE.TO.FRAME 31197 . 31506) (PRINT.FRAME.CLASSES 31508 . 32077) (
PRINT.FRAMES 32079 . 33662) (PUSH.TO.FRAME 33664 . 33828) (RENAME.FRAME 33830 . 34690) (
RENAME.FRAME.IN.OBJECT 34692 . 35193) (RESET.FRAME 35195 . 35536) (RESET.FRAMES 35538 . 35727) (
RESET.PRIMITIVE.LISTS 35729 . 36107) (SET.CURRENT.BITMAP.FRAMES 36109 . 36824) (
SET.CURRENT.FRAME.NAMES 36826 . 37131) (SORT.FRAMES 37133 . 37320) (THAW.FRAME 37322 . 37666) (
TOP.ADD.SUPERFRAME 37668 . 37763) (TOP.ANALYZE.FRAME 37765 . 38036) (TOP.DISPLAY.FRAME 38038 . 38235) 
(TOP.EDIT.ITEM 38237 . 38375) (TOP.FORGET.SUPERFRAMES 38377 . 38480) (TOP.HARDCOPY 38482 . 38627) (
TOP.INITIALIZE.FRAME 38629 . 38788)))))
STOP