(FILECREATED " 6-Mar-85 13:49:17" 
{PHYLUM}<TRILLIUM>BIRTHDAY84>ENHANCEMENTS>RECORDS-NHB>TRI-RECORD-WINDOWS.;8 6797   

      changes to:  (FNS INTERFACE.WINDOW.CHANGE.TITLE INTERFACE.WINDOW.CREATE MAKE.TRILLIUM.ICON)

      previous date: " 1-Mar-85 16:03:26" 
{PHYLUM}<TRILLIUM>BIRTHDAY84>ENHANCEMENTS>RECORDS-NHB>TRI-RECORD-WINDOWS.;7)


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

(PRETTYCOMPRINT TRI-RECORD-WINDOWSCOMS)

(RPAQQ TRI-RECORD-WINDOWSCOMS ((FNS INTERFACE.WINDOW.CHANGE.TITLE INTERFACE.WINDOW.CREATE 
				    MAKE.TRILLIUM.ICON)))
(DEFINEQ

(INTERFACE.WINDOW.CHANGE.TITLE
  [LAMBDA (INTERFACE.WINDOW)                                 (* N.H.Briggs " 1-Mar-85 14:36")
    (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 (fetch.interface.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
				((fetch.frame.fieldq FRAME FROZEN)
				  ";  frozen,  ")
				(T ";  "))
			      FRAME.STATUS])

(INTERFACE.WINDOW.CREATE
  [LAMBDA (INTERFACE NEW.REGION NEW.FRAME.NAME NEW.MACHINE)
                                                             (* N.H.Briggs " 5-Mar-85 11:09")
    (DECLARE (GLOBALVARS CHANGE.FRAME.SPECIFICATIONS FRAME.STATUS))
    (THINKING (PROG (WINDOW REGION INTERFACE.NAME FIRST.FRAME.NAME FIRST.FRAME)
		    (SETQ REGION (OR NEW.REGION (fetch.interface.fieldq INTERFACE REGION)))
		    (SETQ INTERFACE.NAME (fetch.interface.fieldq INTERFACE NAME))
		    (SETQ FIRST.FRAME.NAME (OR NEW.FRAME.NAME (fetch.interface.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))
			(replace.interface.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])

(MAKE.TRILLIUM.ICON
  [LAMBDA NIL                                                (* N.H.Briggs "22-Feb-85 09:32")

          (* 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 (
fetch.interface.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 (fetch.interface.fieldq CURRENT.INTERFACE NAME))
	      (WINDOWPROP CURRENT.INTERFACE.WINDOW (QUOTE ICON)
			  ICON.WINDOW)
	      (RETURN ICON.WINDOW])
)
(PUTPROPS TRI-RECORD-WINDOWS COPYRIGHT ("Xerox Corporation" 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (586 6703 (INTERFACE.WINDOW.CHANGE.TITLE 596 . 1565) (INTERFACE.WINDOW.CREATE 1567 . 
4328) (MAKE.TRILLIUM.ICON 4330 . 6701)))))
STOP