(FILECREATED "18-Mar-85 15:07:17" 
{PHYLUM}<TRILLIUM>BIRTHDAY84>ENHANCEMENTS>RECORDS-NHB>TRI-RECORD-EDITITEM.;3 10056  

      changes to:  (FNS RESET.6LISTS)

      previous date: " 6-Mar-85 13:52:28" 
{PHYLUM}<TRILLIUM>BIRTHDAY84>ENHANCEMENTS>RECORDS-NHB>TRI-RECORD-EDITITEM.;2)


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

(PRETTYCOMPRINT TRI-RECORD-EDITITEMCOMS)

(RPAQQ TRI-RECORD-EDITITEMCOMS ((FNS ADD.NEW.ITEM ADD.TO.ARTWORK ADD.TO.DISPLAYERS 
				     ADD.TO.IMPLICATIONS ADD.TO.INHIBITORS ADD.TO.INITIALIZATION 
				     ADD.TO.SENSORS BUILD.6LISTS BURY.ITEM FLIP.ALL.ITEMS 
				     REMOVE.FROM.ARTWORK REMOVE.FROM.DISPLAYERS 
				     REMOVE.FROM.IMPLICATIONS REMOVE.FROM.INHIBITORS 
				     REMOVE.FROM.INITIALIZATION REMOVE.FROM.SENSORS DELETE.OLD.ITEM 
				     REMOVE.ITEM RESET.6LISTS)))
(DEFINEQ

(ADD.NEW.ITEM
  [LAMBDA (FRAME NEW.ITEM AT.FRONT)                          (* HK "15-JUL-82 12:28")
    (PROG ((ITEMS (fetch.frame.fieldq FRAME ITEMS)))
          (COND
	    ((OR AT.FRONT (NULL ITEMS))
	      (replace.frame.fieldq FRAME ITEMS (CONS NEW.ITEM ITEMS)))
	    (T (NCONC1 ITEMS NEW.ITEM])

(ADD.TO.ARTWORK
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HK "15-JUL-82 13:20")
    (PROG ((ARTWORKS (fetch.frame.fieldq FRAME ARTWORK)))
          (COND
	    ((OR AT.BEGINNING (NULL ARTWORKS))
	      (replace.frame.fieldq FRAME ARTWORK (CONS ITEM ARTWORKS)))
	    (T (NCONC1 ARTWORKS ITEM])

(ADD.TO.DISPLAYERS
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HaKo "27-Jul-84 16:21")
    (PROG ((DISPLAYERS (fetch.frame.fieldq FRAME DISPLAYERS))
	   (NEW.DISPLAYER (LIST (OR (GET.PARAMQ ITEM CELL)
				    (GET.PARAMQ ITEM CELLS))
				ITEM)))
          (COND
	    ((OR AT.BEGINNING (NULL DISPLAYERS))
	      (replace.frame.fieldq FRAME DISPLAYERS (CONS NEW.DISPLAYER DISPLAYERS)))
	    (T (NCONC1 DISPLAYERS NEW.DISPLAYER])

(ADD.TO.IMPLICATIONS
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HaKo "27-Jul-84 16:16")
    (PROG ((IMPLICATIONS (fetch.frame.fieldq FRAME IMPLICATIONS))
	   (NEW.IMPLICATION (LIST (GET.PARAMQ ITEM CELL)
				  ITEM)))
          (COND
	    ((OR AT.BEGINNING (NULL IMPLICATIONS))
	      (replace.frame.fieldq FRAME IMPLICATIONS (CONS NEW.IMPLICATION IMPLICATIONS)))
	    (T (NCONC1 IMPLICATIONS NEW.IMPLICATION])

(ADD.TO.INHIBITORS
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HaKo "27-Jul-84 16:16")
    (PROG ((INHIBITORS (fetch.frame.fieldq FRAME INHIBITORS))
	   (NEW.INHIBITOR (LIST (GET.PARAMQ ITEM CELL)
				ITEM)))
          (COND
	    ((OR AT.BEGINNING (NULL INHIBITORS))
	      (replace.frame.fieldq FRAME INHIBITORS (CONS NEW.INHIBITOR INHIBITORS)))
	    (T (NCONC1 INHIBITORS NEW.INHIBITOR])

(ADD.TO.INITIALIZATION
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HK "15-JUL-82 13:23")
    (PROG ((INITIALIZATIONS (fetch.frame.fieldq FRAME INITIALIZATION)))
          (COND
	    ((OR AT.BEGINNING (NULL INITIALIZATIONS))
	      (replace.frame.fieldq FRAME INITIALIZATION (CONS ITEM INITIALIZATIONS)))
	    (T (NCONC1 INITIALIZATIONS ITEM])

(ADD.TO.SENSORS
  [LAMBDA (ITEM FRAME AT.BEGINNING)                          (* HK "15-JUL-82 13:26")
    (PROG ((SENSORS (fetch.frame.fieldq FRAME SENSORS)))
          (COND
	    ((OR AT.BEGINNING (NULL SENSORS))
	      (replace.frame.fieldq FRAME SENSORS (CONS ITEM SENSORS)))
	    (T (NCONC1 SENSORS ITEM])

(BUILD.6LISTS
  [LAMBDA (FRAME)                                            (* N.H.Briggs " 6-Mar-85 13:20")
                                                             (* DAHJr "16-SEP-83 15:54")
                                                             (* RECOMPUTE THE REDUNDANT LISTS OF THE SIX PRIMITIVE 
							     TYPES FOR THIS FRAME)
    (DECLARE (SPECVARS ARTWORK DISPLAYERS IMPLICATIONS INHIBITORS INITIALIZATIONS SENSORS))
    (PROG ((ARTWORK (CONS))
	   (INITIALIZATIONS (CONS))
	   (SENSORS (CONS))
	   (INHIBITORS (CONS))
	   (DISPLAYERS (CONS))
	   (IMPLICATIONS (CONS)))
          (for ITEM in (fetch.frame.fieldq FRAME ITEMS) do (ADD.TO.6LISTS ITEM))
          (replace.frame.fieldq FRAME INITIALIZATION (CAR INITIALIZATIONS))
          (replace.frame.fieldq FRAME ARTWORK (CAR ARTWORK))
          (replace.frame.fieldq FRAME SENSORS (CAR SENSORS))
          (replace.frame.fieldq FRAME INHIBITORS (CAR INHIBITORS))
          (replace.frame.fieldq FRAME DISPLAYERS (CAR DISPLAYERS))
          (replace.frame.fieldq FRAME IMPLICATIONS (CAR IMPLICATIONS))
          (replace.frame.fieldq FRAME PRIMITIVES.CACHED? T])

(BURY.ITEM
  [LAMBDA (FRAME)                                            (* PI "23-Aug-84 10:52")
                                                             (* DAHJr " 5-DEC-83 12:01")
    (PROG ((ITEM (ACQUIRE.ITEM FRAME "Point out item to be buried")))
          (COND
	    ((NULL ITEM)
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS 
				 "Cannot find any item where you pointed; BURY.ITEM aborted"))
	    ((NOT (TYPE.DEFINEDP ITEM))
	      (TRILLIUM.PRINTOUT ON TRILLIUM.WARNINGS 
				 "Cannot bury that item, as its type is undefined"))
	    (T (THINKING [replace.frame.fieldq FRAME ITEMS (CONS ITEM (DREMOVE ITEM (
									       fetch.frame.fieldq
										 FRAME ITEMS]
			 (UPDATE&DISPLAY.FRAME FRAME))
	       (RETURN ITEM])

(FLIP.ALL.ITEMS
  [LAMBDA (FRAME FROM.SUPERFRAMES.TOO ITYPE)                 (* DAHJr "18-APR-83 18:22")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE))
    [COND
      (FROM.SUPERFRAMES.TOO (for SUPERFRAME.NAME in (fetch.frame.fieldq FRAME SUPERFRAMES)
			       do (FLIP.ALL.ITEMS (FIND.FRAME CURRENT.INTERFACE SUPERFRAME.NAME)
						  FROM.SUPERFRAMES.TOO ITYPE]
    (for ITEM in (fetch.frame.fieldq FRAME ITEMS) when (OR (NULL ITYPE)
							   (EQ ITYPE (ITEM.TYPE ITEM)))
       do (FLIP.ITEM ITEM])

(REMOVE.FROM.ARTWORK
  [LAMBDA (ITEM FRAME)                                       (* edited: "23-JUN-82 12:10")
    (replace.frame.fieldq FRAME ARTWORK (DREMOVE ITEM (fetch.frame.fieldq FRAME ARTWORK])

(REMOVE.FROM.DISPLAYERS
  [LAMBDA (ITEM FRAME)                                       (* HK "20-JUL-82 10:30")
    (PROG ((DISPLAYERS (fetch.frame.fieldq FRAME DISPLAYERS)))
          (for DISPLAYER in DISPLAYERS when (EQ ITEM (CADR DISPLAYER))
	     do (COND
		  ((EQ DISPLAYER (CAR DISPLAYERS))
		    (replace.frame.fieldq FRAME DISPLAYERS (CDR DISPLAYERS)))
		  (T (DREMOVE DISPLAYER DISPLAYERS)))
		(RETURN])

(REMOVE.FROM.IMPLICATIONS
  [LAMBDA (ITEM FRAME)                                       (* HK "20-JUL-82 10:22")
    (PROG ((IMPLICATIONS (fetch.frame.fieldq FRAME IMPLICATIONS)))
          (for IMPLICATION in IMPLICATIONS when (EQ ITEM (CADR IMPLICATION))
	     do (COND
		  ((EQ IMPLICATION (CAR IMPLICATIONS))
		    (replace.frame.fieldq FRAME IMPLICATIONS (CDR IMPLICATIONS)))
		  (T (DREMOVE IMPLICATION IMPLICATIONS)))
		(RETURN])

(REMOVE.FROM.INHIBITORS
  [LAMBDA (ITEM FRAME)                                       (* HK "20-JUL-82 10:40")
    (PROG ((INHIBITORS (fetch.frame.fieldq FRAME INHIBITORS)))
          (for INHIBITOR in INHIBITORS when (EQ ITEM (CADR INHIBITOR))
	     do (COND
		  ((EQ INHIBITOR (CAR INHIBITORS))
		    (replace.frame.fieldq FRAME INHIBITORS (CDR INHIBITORS)))
		  (T (DREMOVE INHIBITOR INHIBITORS)))
		(RETURN])

(REMOVE.FROM.INITIALIZATION
  [LAMBDA (ITEM FRAME)                                       (* edited: "23-JUN-82 12:16")
    (replace.frame.fieldq FRAME INITIALIZATION (DREMOVE ITEM (fetch.frame.fieldq FRAME INITIALIZATION]
)

(REMOVE.FROM.SENSORS
  [LAMBDA (ITEM FRAME)                                       (* edited: "23-JUN-82 12:20")
    (replace.frame.fieldq FRAME SENSORS (DREMOVE ITEM (fetch.frame.fieldq FRAME SENSORS])

(DELETE.OLD.ITEM
  [LAMBDA (FRAME ITEM)                                       (* DAHJr "24-JUN-83 10:53")
    (DECLARE (GLOBALVARS CURRENT.INTERFACE CURRENT.INTERFACE.WINDOW))
    (PROG (ITEMS NEWLIST EDIT.WINDOWS CORRESPONDING.EDIT.WINDOW)
          (REMOVE.ITEM ITEM FRAME)
          (SETQ ITEMS (fetch.frame.fieldq FRAME ITEMS))
          (SETQ NEWLIST (DREMOVE ITEM ITEMS))
          (OR NEWLIST (replace.frame.fieldq FRAME ITEMS NIL))
          (MARK.FRAME.CONTEXT.OBSOLETE FRAME)
          (MARK.INTERFACE CURRENT.INTERFACE)
          (for WINDOW in (DEPENDENT.WINDOWS CURRENT.INTERFACE.WINDOW)
	     when (AND (EQ (WINDOWPROP WINDOW (QUOTE TRILLIUM.WINDOW.TYPE))
			   (QUOTE ITEM.EDITOR))
		       (EQ (WINDOWPROP WINDOW (QUOTE DATUM))
			   ITEM))
	     do (DELETE.DEPENDENT.WINDOW CURRENT.INTERFACE.WINDOW WINDOW)
		(CLOSEW WINDOW])

(REMOVE.ITEM
  [LAMBDA (ITEM FRAME)                                       (* N.H.Briggs " 6-Mar-85 13:20")
    (replace.frame.fieldq FRAME PRIMITIVES.CACHED? NIL])

(RESET.6LISTS
  [LAMBDA (FRAME)                                            (* N.H.Briggs "18-Mar-85 13:51")
    (replace.frame.fieldq FRAME INITIALIZATION NIL)
    (replace.frame.fieldq FRAME ARTWORK NIL)
    (replace.frame.fieldq FRAME SENSORS NIL)
    (replace.frame.fieldq FRAME INHIBITORS NIL)
    (replace.frame.fieldq FRAME DISPLAYERS NIL)
    (replace.frame.fieldq FRAME IMPLICATIONS NIL)
    (replace.frame.fieldq FRAME PRIMITIVES.CACHED? NIL])
)
(PUTPROPS TRI-RECORD-EDITITEM COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (840 9966 (ADD.NEW.ITEM 850 . 1181) (ADD.TO.ARTWORK 1183 . 1528) (ADD.TO.DISPLAYERS 1530
 . 2016) (ADD.TO.IMPLICATIONS 2018 . 2485) (ADD.TO.INHIBITORS 2487 . 2932) (ADD.TO.INITIALIZATION 2934
 . 3328) (ADD.TO.SENSORS 3330 . 3671) (BUILD.6LISTS 3673 . 4905) (BURY.ITEM 4907 . 5692) (
FLIP.ALL.ITEMS 5694 . 6267) (REMOVE.FROM.ARTWORK 6269 . 6482) (REMOVE.FROM.DISPLAYERS 6484 . 6955) (
REMOVE.FROM.IMPLICATIONS 6957 . 7452) (REMOVE.FROM.INHIBITORS 7454 . 7925) (REMOVE.FROM.INITIALIZATION
 7927 . 8162) (REMOVE.FROM.SENSORS 8164 . 8377) (DELETE.OLD.ITEM 8379 . 9329) (REMOVE.ITEM 9331 . 9502
) (RESET.6LISTS 9504 . 9964)))))
STOP