MENUEDWINDOWAn INTERLISP package for manipulating windows with attached menues.Written by: Steve GadolGeneral CommentsMENUEDWINDOW is a package designed to make it easy to manipulate a window and an associated menu as aunit. Standard operations like MOVE, RESHAPE, OPEN and CLOSE are done in a way that it appears to theuser as if the window and its menu are a single entity. This kind of facility is especially useful for applicationsbased on browsers and editing. A generalization of the browser window in Lafite was the in fact the primarymotivation for creating the package.OperationMENUEDWINDOW is found on {Phylum}MENUEDWINDOW.DCOMThis file is complete and does not load any other code.The entry point to the facility is the function MAKEMENUEDWINDOW. Its parameters are described below in callingsequence.ITEMS: The items to appear in the menu can be specified as a simple list where eachelement is a label, or each element can itself be a list in which the CAR is the labelto appear in the menu.WINDOWTITLE: The title for the main window is specified as a string. A value of NILis allowed. If an existing window is passed as the value of WINDOWSPEC, the title ofthe that window will be preserved when WINDOWTITLE is NIL.LOCATION: The position of the menu relative to the main window may be specified asTOP, BOTTOM, RIGHT or LEFT. WINDOWSPEC: If this parameter is NIL the user will be prompted to specify aregion for the menued window. The caller may, however, supply either a region or anexisting window in this position.MENUWINDOWTITLE: A separate title for the menu window may be supplied as astring. For menus at the left or right of the main window doing this producessomething that looks reasonable. In the case where the menu is in this position andno title is supplied , the title bar from the main window is extened into the menu area.It isn't recommended that a title be supplied for menus across the top or bottom ofthe main window though. FONT: The caller may specify a font to be used in making the menu. The default fontis HELVETICA 10 in BOLD face.MAKEMENUEDWINOW contains heuristics that constrain the size and shape of the both main and menuwindows so that the titles and menu items will fit. Thus the caller need not be concerned that a region orexisting window will be too small, or that the user may specify something that is not useable.This function returns the main window of the pair. The binding between the window and the menu is donewith WINDOWPROPS as described next.NotesThe main and menu windows are bound togeter by WINDOWPROPS. The menu is stored under theWINDOWMENU property of the main window, and the window containing the menu is under the MENUWINDOWproperty. Given the menu window you can get to the main window by retrieving its MAINWINDOW property. bApF%_q \prp7 W S_q Or p@ Ni08 M, j KW J$ Eq Br p2 @7 >JFp = 9T78P64^G 3 2"1</h+'.*+D *r>)4!&J%|'($>T#)/!!3  @ (8 Q ^  ] $ )q pV pF 3'? 4 =Y(2The main window has other properties that are used by the remaining function in the package. The minimumwidth for the menu and reletive position of the menu window are saved under the menu window's MINWIDTHand MENUPOSITION properties. The properties AFTERMOVEFN, RESHAPEFN, CLOSEFN, OPENFN, SHRINKFN,and EXPANDFN contain code that implements the corresponding window manipulation functions. Care should beused in modifying or replacing these properties.Ngp a$F _] ^_ ]KC' \1 [= 3 HELVETICA HELVETICA HELVETICA j/  n2MENUEDWINDOW.TTYFebruary 7, 1983 2:35 PM