(FILECREATED " 5-Jul-86 14:10:21" {QV}<NOTECARDS>1.3K>FGHPATCH088.;2 4248   

      changes to:  (FNS NC.SetUpNoteFileInterface)
		   (VARS FGHPATCH088COMS)

      previous date: " 5-Jul-86 14:02:40" {QV}<NOTECARDS>1.3K>FGHPATCH088.;1)


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

(PRETTYCOMPRINT FGHPATCH088COMS)

(RPAQQ FGHPATCH088COMS ((* * Adds version number to title of NF menus)
			  (FNS NC.SetUpNoteFileInterface)))
(* * Adds version number to title of NF menus)

(DEFINEQ

(NC.SetUpNoteFileInterface
  (LAMBDA (NoteFile Position)                                (* fgh: " 5-Jul-86 14:05")

          (* * Create the NoteCards control menu for a NoteFile)



          (* * kirk 13Jan85 Decreased the size of the NoteFile Menu)



          (* * fgh 1/22/86 Fixed the ghost box size when position menu.)



          (* * rht 5/6/86: Now restores the menu's WhenSelectedFn and ungrays its items if already existed.)



          (* * fgh 6/27/86 Added position argument)


    (LET ((Font (FONTCREATE (QUOTE HELVETICA)
			      10
			      (QUOTE BOLD)))
	  (TitleFont (FONTCREATE (QUOTE HELVETICA)
				   12
				   (QUOTE BOLD)))
	  NoteFileMenuWindow NoteFileMenu FullFileName)      (* Main Menu)
         (SETQ FullFileName (fetch (NoteFile FullFileName) of NoteFile))
         (if (SETQ NoteFileMenu (fetch (NoteFile Menu) of NoteFile))
	     then (for Item in (fetch (MENU ITEMS) of NoteFileMenu)
		       do (SHADEITEM Item NoteFileMenu WHITESHADE))
		    (replace (MENU WHENSELECTEDFN) of NoteFileMenu
		       with (FUNCTION NC.NoteFileMenuWhenSelectedFn))
	   else (PROGN (SETQ NoteFileMenu (create MENU
							  ITEMS ←(QUOTE ((NewCards NIL 
		       "Create a new Text card (left button) or other card type (middle button).")
									    (Show% Box NIL 
							"Bring up one of the standard FileBoxes.")))
							  WHENSELECTEDFN ←(FUNCTION 
							    NC.NoteFileMenuWhenSelectedFn)
							  CENTERFLG ← T
							  MENUBORDERSIZE ← 1
							  MENUOUTLINESIZE ← 2
							  MENUCOLUMNS ← 2
							  MENUFONT ← Font
							  TITLE ←(CONCAT (FILENAMEFIELD
									     FullFileName
									     (QUOTE NAME))
									   ";"
									   (FILENAMEFIELD
									     FullFileName
									     (QUOTE VERSION)))
							  ITEMHEIGHT ←(IPLUS 6 (FONTPROP
										 Font
										 (QUOTE HEIGHT)))
							  ITEMWIDTH ←(IPLUS (STRINGWIDTH
										(QUOTE NewCards)
										Font)
									      10)
							  MENUTITLEFONT ← TitleFont))
			   (replace (MENU MENUPOSITION) of NoteFileMenu
			      with (OR (POSITIONP Position)
					   (GETBOXPOSITION (fetch (MENU IMAGEWIDTH)
								of NoteFileMenu)
							     (fetch (MENU IMAGEHEIGHT)
								of NoteFileMenu)
							     NIL NIL NIL 
					    "Please indicate location for NoteFile control menu.")))))
         (if (WINDOWP (SETQ NoteFileMenuWindow (WFROMMENU NoteFileMenu)))
	     then (FLASHWINDOW NoteFileMenuWindow)
	   else (SETQ NoteFileMenuWindow (ADDMENU NoteFileMenu NIL (GETMENUPROP NoteFileMenu
											(QUOTE
											  OldPosition)
											))))
         (WINDOWPROP NoteFileMenuWindow (QUOTE NoteFile)
		       NoteFile)
         (replace (NoteFile Menu) of NoteFile with NoteFileMenu)
         (WINDOWPROP NoteFileMenuWindow (QUOTE RESHAPEFN)
		       (QUOTE DON'T))
         (WINDOWPROP NoteFileMenuWindow (QUOTE BUTTONEVENTFN)
		       (FUNCTION NC.NoteFileIconButtonEventFn))
         (WINDOWPROP NoteFileMenuWindow (QUOTE SHRINKFN)
		       (QUOTE DON'T))
         (WINDOWADDPROP NoteFileMenuWindow (QUOTE CLOSEFN)
			  (FUNCTION (LAMBDA (Window)
			      (PUTMENUPROP (CAR (WINDOWPROP Window (QUOTE MENU)))
					     (QUOTE OldPosition)
					     (WINDOWPOSITION Window)))))
         (NC.MoveWindowOntoScreen NoteFileMenuWindow))))
)
(PUTPROPS FGHPATCH088 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (512 4166 (NC.SetUpNoteFileInterface 522 . 4164)))))
STOP