@style(spacing 1)

@make(manual)
@flushright(C.D.Lane  1/83)
@heading(MULTIW)

@b(MULTIW.LSP) contains the basic functions necessary for a hierarchical
window environment.  The functions provide both the means to link windows
and the changes to the standard window functions to handle multiwindows in
a reasonable way.  Only the minimal support is incorporated since it is
unclear how multiwindows will be used in different settings.

Windows that @i(belong) to other windows will move, close, shrink and open
when their @i(super) window does.  A @i(super) window is not affected
by the window functions of its sub windows (but can be made to be).
Sub windows can be moved, closed, shrunk, opened, and so forth as normal
windows.
When buried, multiwindows bury as a group, retaining their 
relative layering, but going below unrelated windows.

To get the full support for  multiwindows, (MULTIWADVICE) must be
invoked.  This function advises several standard window functions to reset
the window layers after they perform their operations.  Multiwindows can
be used @i(without) advice, but the windows will have to be explicitly
reset.  Currently the functions being advised are 
(BURYW CLEARW MOVEW OPENW SHRINKW).
Where possible, functions on the windows property list were changed rather
than advising the existing ones, to keep
the system as compatible as possible with any environment its used in.

If @i(SuperWindow), or @i(SubWindowLst) are NIL in following functions,
they are prompted for with \MULTIWPROMPT.

@b<MULTIW (@i{SuperWindow SubWindowLst})> @>[@i(function)]

@i(SubWindowLst) can be a list of windows or a window.
MULTIW adds windows in @i(SubWindowLst) to @i(SuperWindow)'s
SUBWINDOWLST property
if it exits, creates it otherwise (WINDOWADDPROP). Also, @i(SuperWindow) gets
added to the SUPERWINDOWLST property
of each element of the @i(SubWindowLst), providing
pointers in both directions (currently, the multiwindow package does not use
the backward pointers, they are provided for the user's convienence).
@i(Superwindow) also gets its window function (see \MULTIWNEWFNS)
properties redefined
to the multiwindow versions.

@b<@u(WARNING:)> Window structures @u(must) be DAGs (directed acyclic graphs),
there should be no way
a window can reach itself by following out the pointers to its subwindows.
Recursive window structures will cause infinite looping of the window
functions.

@b<MULTIWFREE (@i{SuperWindow SubWindowLst})> @>[@i(function)]

@i(SubWindowLst) can be a list of windows, a single window, T or NIL.
MULTIWFREE frees the links from @i{SuperWindow} to the windows in
@i(SubWindowLst) as well as the pointers back.  If @i(SubWindowLst) is T,
then @i(SuperWindow) is freed of all its subwindows (and they of it).

@b<MULTIWADVICE ()> @>[@i(function)]

MULTIWADVICE advises functions based on the @i(scripts) in 
\MULTIWADVISEDFNS. The function returns a list of the advised functions
which should be saved if one wishes to UNADVISE the functions (which is
recommended before another call to (MULTIWADVICE)).

@b<MULTIWGRAPH (@i{SuperWindow DisplayWindow})> @>[@i(function)]

MULTIWGRAPH graphs a window relation structure in @i(DisplayWindow)
(which can be 
NIL).  Useful in debugging relationships between windows.  The 
GRAPHER package must be loaded to use this function.

@b<\MULTIWGRAPH (@i{NodeWindow})> @>[@i(function)]

Function MULTIWGRAPH uses to recursively follow down the window links.

@subheading(MultiWindow Window Functions)

Most are functionally identical to the normal window functions except they
perform the proper task on all of the subwindows and reset the window
structure.

@b<\MULTIWMOVEFN (@i{Window NewPosition})> @>[@i(function)]

@b<\MULTIWCLOSEFN (@i{Window})> @>[@i(function)]

@b<\MULTIWSHRINKFN (@i{Window})> @>[@i(function)]

@b<\MULTIWEXPANDFN (@i{Window})> @>[@i(function)]

@b<\MULTIWTOTOPFN (@i{Window})> @>[@i(function)]

@b<\MULTIWBURYFN (@i{Window})> @>[@i(function)]

@b<\MULTIWPROMPT (@i{PromptString})> @>[@i(function)]

Prints @i(PromptString) in PROMPTWINDOW and returns a 
(WHICHW (GETPOSITION))

@b(@u{NOTE:}) A demonstration of multiwindows can be found in
@b(MULTIW.DEMO).  The GRAPHER package should be loaded, as well
as @b(MULTIW.LSP).  The call (DEMO MULTIWDEMO) starts the demo.