(FILECREATED "27-Sep-84 15:23:42" {CSLI}PS:<LANE>MULTIW.LSP;8 5246   

      changes to:  (FNS MULTIW MULTIWFREE \MULTIWCLOSEFN \MULTIWEXPANDFN \MULTIWTOTOPFN \MULTIWBURYFN 
			\MULTIWGRAPH)

      previous date: "30-Jul-84 16:18:49" {CSLI}PS:<LANE>MULTIW.LSP;7)


(PRETTYCOMPRINT MULTIWCOMS)

(RPAQQ MULTIWCOMS ((* * USER FUNCTIONS)
		   (FNS MULTIW MULTIWFREE MULTIWADVICE MULTIWGRAPH)
		   (* * INTERNAL WINDOW FUNCTIONS)
		   (FNS * MULTIWINTERNAL)
		   (* * SCRIPTS)
		   (VARS \MULTIWADVISEDFNS \MULTIWNEWFNS)
		   (GLOBALVARS \MULTIWADVISEDFNS \MULTIWNEWFNS)))
(* * USER FUNCTIONS)

(DEFINEQ

(MULTIW
  [LAMBDA (SuperWindow SubWindowLst)                         (* cdl "27-Sep-84 15:16")
    [COND
      ((NULL SuperWindow)
	(SETQ SuperWindow (\MULTIWPROMPT "BUTTON SUPER WINDOW"]
    [for ACTION in \MULTIWNEWFNS do (COND
				      ((ATOM (CDR ACTION))
					(WINDOWADDPROP SuperWindow (CAR ACTION)
						       (CDR ACTION)))
				      (T (WINDOWPROP SuperWindow (CAR ACTION)
						     (CADR ACTION]
    [COND
      ((NULL SubWindowLst)
	(SETQ SubWindowLst (\MULTIWPROMPT "BUTTON SUB WINDOW"]
    (for WINDOW inside SubWindowLst
       do (WINDOWADDPROP SuperWindow 'SUBWINDOWLST WINDOW)
	  (WINDOWADDPROP WINDOW 'SUPERWINDOWLST SuperWindow))
    SuperWindow])

(MULTIWFREE
  [LAMBDA (SuperWindow SubWindowLst)                         (* cdl "27-Sep-84 15:17")
    [COND
      ((NULL SuperWindow)
	(SETQ SuperWindow (\MULTIWPROMPT "BUTTON SUPER WINDOW"]
    [COND
      ((NULL SubWindowLst)
	(SETQ SubWindowLst (\MULTIWPROMPT "BUTTON SUB WINDOW")))
      ((EQ T SubWindowLst)
	(SETQ SubWindowLst (WINDOWPROP SuperWindow 'SUBWINDOWLST]
    (for WINDOW inside SubWindowLst
       do (WINDOWDELPROP WINDOW 'SUPERWINDOWLST SuperWindow)
	  (WINDOWDELPROP SuperWindow 'SUBWINDOWLST WINDOW])

(MULTIWADVICE
  [LAMBDA NIL                                   (* cdl "13-JAN-83 09:28")
    (for FN in \MULTIWADVISEDFNS collect (ADVISE (CAR FN)
						 (CADR FN)
						 NIL
						 (CADDR FN])

(MULTIWGRAPH
  [LAMBDA (SuperWindow DisplayWindow)           (* cdl "14-JAN-83 10:53")
    (SHOWGRAPH (LAYOUTSEXPR (\MULTIWGRAPH (OR SuperWindow (\MULTIWPROMPT 
						   "BUTTON WINDOW TO GRAPH")))
			    (QUOTE VERTICAL))
	       DisplayWindow])
)
(* * INTERNAL WINDOW FUNCTIONS)


(RPAQQ MULTIWINTERNAL (\MULTIWMOVEFN \MULTIWAFTERMOVEFN \MULTIWCLOSEFN \MULTIWSHRINKFN 
				     \MULTIWEXPANDFN \MULTIWTOTOPFN \MULTIWBURYFN \MULTIWGRAPH 
				     \MULTIWPROMPT))
(DEFINEQ

(\MULTIWMOVEFN
  [LAMBDA (Window NewPosition)                               (* cdl "30-Jul-84 15:19")
    [with REGION (WINDOWPROP Window 'REGION)
	  (WINDOWPROP Window '\MULTIWRELPOS (with POSITION NewPosition (create POSITION
									       XCOORD ←(IDIFFERENCE
										 XCOORD LEFT)
									       YCOORD ←(IDIFFERENCE
										 YCOORD BOTTOM]
    NewPosition])

(\MULTIWAFTERMOVEFN
  [LAMBDA (Window NewPosition)                               (* cdl "13-OCT-83 11:59")
    (PROG [(RELPOS (WINDOWPROP Window '\MULTIWRELPOS]
          (COND
	    (RELPOS (for W in (WINDOWPROP Window 'SUBWINDOWLST) do (RELMOVEW W RELPOS])

(\MULTIWCLOSEFN
  [LAMBDA (WINDOW)                                           (* cdl "27-Sep-84 15:19")
    (in (WINDOWPROP WINDOW 'SUBWINDOWLST) do CLOSEW])

(\MULTIWSHRINKFN
  [LAMBDA (WINDOW)
    (\MULTIWCLOSEFN WINDOW])

(\MULTIWEXPANDFN
  [LAMBDA (WINDOW)                                           (* cdl "27-Sep-84 15:19")
    (in (WINDOWPROP WINDOW 'SUBWINDOWLST) do OPENW)
    (\MULTIWTOTOPFN WINDOW])

(\MULTIWTOTOPFN
  [LAMBDA (WINDOW)                                           (* cdl "27-Sep-84 15:20")
    (TOTOPW WINDOW)
    (in (WINDOWPROP WINDOW 'SUBWINDOWLST) do \MULTIWTOTOPFN])

(\MULTIWBURYFN
  [LAMBDA (WINDOW)                                           (* cdl "27-Sep-84 15:20")
    (in (WINDOWPROP WINDOW 'SUBWINDOWLST) do BURYW])

(\MULTIWGRAPH
  [LAMBDA (NodeWindow)                                       (* cdl "27-Sep-84 15:20")
    (CONS (OR (WINDOWPROP NodeWindow 'TITLE)
	      NodeWindow)
	  (in (WINDOWPROP NodeWindow 'SUBWINDOWLST) collect \MULTIWGRAPH])

(\MULTIWPROMPT
  [LAMBDA (PromptString)                                     (* cdl "30-Jul-84 15:14")
    (bind WINDOW
       do (CLRPROMPT)
	  (CENTERPRINTINREGION PromptString NIL PROMPTWINDOW)
       repeatuntil (SETQ WINDOW (WHICHW (GETPOSITION)))
       finally (CLRPROMPT)
	       (RETURN WINDOW])
)
(* * SCRIPTS)


(RPAQQ \MULTIWADVISEDFNS ((OPENW AFTER (\MULTIWTOTOPFN WINDOW))
			  (CLEARW AFTER (\MULTIWTOTOPFN WINDOW))
			  (BURYW BEFORE (\MULTIWBURYFN WINDOW))
			  (SHAPEW AFTER (\MULTIWTOTOPFN WINDOW))))

(RPAQQ \MULTIWNEWFNS ((CLOSEFN . \MULTIWCLOSEFN)
		      (SHRINKFN . \MULTIWSHRINKFN)
		      (EXPANDFN . \MULTIWEXPANDFN)
		      (MOVEFN . \MULTIWMOVEFN)
		      (AFTERMOVEFN . \MULTIWAFTERMOVEFN)
		      (BUTTONEVENTFN \MULTIWTOTOPFN)))
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS \MULTIWADVISEDFNS \MULTIWNEWFNS)
)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (603 2354 (MULTIW 613 . 1322) (MULTIWFREE 1324 . 1874) (MULTIWADVICE 1876 . 2088) (
MULTIWGRAPH 2090 . 2352)) (2579 4666 (\MULTIWMOVEFN 2589 . 2978) (\MULTIWAFTERMOVEFN 2980 . 3257) (
\MULTIWCLOSEFN 3259 . 3431) (\MULTIWSHRINKFN 3433 . 3505) (\MULTIWEXPANDFN 3507 . 3711) (
\MULTIWTOTOPFN 3713 . 3913) (\MULTIWBURYFN 3915 . 4085) (\MULTIWGRAPH 4087 . 4335) (\MULTIWPROMPT 4337
 . 4664)))))
STOP