(FILECREATED "13-Feb-87 10:51:46" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH197.;4 24868  

      changes to:  (VARS RHTPATCH197COMS)

      previous date: "11-Feb-87 15:08:58" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH197.;3)


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

(PRETTYCOMPRINT RHTPATCH197COMS)

(RPAQQ RHTPATCH197COMS ((* * This is to clean up the way the notefile icon left button title bar 
			     menus were being handled. They are now computed in a separate function. 
			     This also happens to fix the problem of having no menus if you reload 
			     NCINTERFACE.)
			  (* * New stuff for NCINTERFACE)
			  (FNS NC.MakeNoteFileIconOperationsMenus)
			  (GLOBALVARS NC.NoteFileIconOperationsMenuItems 
				      NC.NoteFileIconOpenOperations NC.NoteFileIconCloseOperations)
			  (ADDVARS (NC.NoteFileIconOperationsMenuItems (Open NIL 
									   "Opens this NoteFile."
									     (SUBITEMS (
Read-only% Open NIL "Opens this NoteFile for read-only.")))
								       (Checkpoint NIL 
						"Checkpoint this NoteFile, saving changed cards.")
								       (Close NIL 
									  "Closes this NoteFile.")
								       (Abort NIL 
					      "Close NF, deleting changes since last checkpoint.")
								       (Compact NIL 
							  "Compacts a NoteFile to a target file."
										(SUBITEMS
										  (
Compact% To% Target% File NIL "Compacts this NoteFile to a target file.")
										  (Compact% In% Place
										    NIL 
							       "Compacts this NoteFile in place.")))
								       (Inspect&Repair
									 NIL 
						 "Inspects and optionally repairs this NoteFile."
									 (SUBITEMS (Read% Substances
										     NIL 
"Inspects and optionally repairs a Notefile, but reads every substance.  This slows it WAY down.")))
								       (Copy NIL 
							 "Copies this notefile to a target file.")
								       (Rename NIL 
									   "Rename this NoteFile")
								       (Delete NIL 
									 "Deletes this NoteFile."))
				   (NC.NoteFileIconOpenOperations Open Checkpoint Close Abort)
				   (NC.NoteFileIconCloseOperations Open Compact Read-only% Open 
								   Inspect&Repair Read% Substances 
								   Copy Rename Delete 
								   Compact% To% Target% File 
								   Compact% In% Place))
			  (* * Changes for NCINTERFACE)
			  (FNS NC.MakeMainMenu NC.NoteFileOperations 
			       NC.NoteFileTitleLeftWhenSelectedFn NC.DoNoteFileOp)))
(* * This is to clean up the way the notefile icon left button title bar menus were being 
handled. They are now computed in a separate function. This also happens to fix the problem of 
having no menus if you reload NCINTERFACE.)

(* * New stuff for NCINTERFACE)

(DEFINEQ

(NC.MakeNoteFileIconOperationsMenus
  (LAMBDA NIL                                                (* rht: "11-Feb-87 14:28")

          (* * Rebuild the menus NC.OpenedNoteFileMenu and NC.ClosedNoteFileMenu smashing any current values.)


    (DECLARE (GLOBALVARS NC.OpenedNoteFileMenu NC.ClosedNoteFileMenu 
			     NC.NoteFileIconOperationsMenuItems NC.MenuFont 
			     NC.NoteFileIconOpenOperations NC.NoteFileIconCloseOperations))
                                                             (* First, make two identical menus.)
    (SETQ NC.OpenedNoteFileMenu (create MENU
					    ITEMS ← NC.NoteFileIconOperationsMenuItems
					    CHANGEOFFSETFLG ←(QUOTE Y)
					    MENUOFFSET ←(CONS -1 0)
					    CENTERFLG ← NIL
					    TITLE ← "NoteFile Ops"
					    MENUTITLEFONT ← NC.MenuFont
					    MENUFONT ← NC.MenuFont
					    ITEMHEIGHT ←(IPLUS (FONTPROP NC.MenuFont
									     (QUOTE HEIGHT))
								 1)
					    WHENSELECTEDFN ←(FUNCTION 
					      NC.NoteFileTitleLeftWhenSelectedFn)))
    (SETQ NC.ClosedNoteFileMenu (create MENU
					    ITEMS ← NC.NoteFileIconOperationsMenuItems
					    CHANGEOFFSETFLG ←(QUOTE Y)
					    MENUOFFSET ←(CONS -1 0)
					    CENTERFLG ← NIL
					    TITLE ← "NoteFile Ops"
					    MENUTITLEFONT ← NC.MenuFont
					    MENUFONT ← NC.MenuFont
					    ITEMHEIGHT ←(IPLUS (FONTPROP NC.MenuFont
									     (QUOTE HEIGHT))
								 1)
					    WHENSELECTEDFN ←(FUNCTION 
					      NC.NoteFileTitleLeftWhenSelectedFn)))
                                                             (* Now, shade the appropriate inaccessible items of 
							     each.)
    (for Item in (fetch (MENU ITEMS) of NC.OpenedNoteFileMenu)
       do (SHADEITEM Item NC.OpenedNoteFileMenu (if (MEMB (CAR Item)
								  NC.NoteFileIconOpenOperations)
							then WHITESHADE
						      else GRAYSHADE)))
    (for Item in (fetch (MENU ITEMS) of NC.ClosedNoteFileMenu)
       do (SHADEITEM Item NC.ClosedNoteFileMenu (if (MEMB (CAR Item)
								  NC.NoteFileIconCloseOperations)
							then WHITESHADE
						      else GRAYSHADE)))
    (replace (MENU IMAGE) of NC.OpenedNoteFileMenu with NIL)
    (replace (MENU IMAGE) of NC.ClosedNoteFileMenu with NIL)))
)
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.NoteFileIconOperationsMenuItems NC.NoteFileIconOpenOperations 
	    NC.NoteFileIconCloseOperations)
)

(ADDTOVAR NC.NoteFileIconOperationsMenuItems (Open NIL "Opens this NoteFile."
						     (SUBITEMS (Read-only% Open NIL 
							     "Opens this NoteFile for read-only.")))
					       (Checkpoint NIL 
						"Checkpoint this NoteFile, saving changed cards.")
					       (Close NIL "Closes this NoteFile.")
					       (Abort NIL 
					      "Close NF, deleting changes since last checkpoint.")
					       (Compact NIL "Compacts a NoteFile to a target file."
							(SUBITEMS (Compact% To% Target% File NIL 
						       "Compacts this NoteFile to a target file.")
								  (Compact% In% Place NIL 
							       "Compacts this NoteFile in place.")))
					       (Inspect&Repair NIL 
						 "Inspects and optionally repairs this NoteFile."
							       (SUBITEMS (Read% Substances NIL 
"Inspects and optionally repairs a Notefile, but reads every substance.  This slows it WAY down.")))
					       (Copy NIL "Copies this notefile to a target file.")
					       (Rename NIL "Rename this NoteFile")
					       (Delete NIL "Deletes this NoteFile."))

(ADDTOVAR NC.NoteFileIconOpenOperations Open Checkpoint Close Abort)

(ADDTOVAR NC.NoteFileIconCloseOperations Open Compact Read-only% Open Inspect&Repair 
						Read% Substances Copy Rename Delete 
						Compact% To% Target% File Compact% In% Place)
(* * Changes for NCINTERFACE)

(DEFINEQ

(NC.MakeMainMenu
  (LAMBDA (DatabaseTitle)                                    (* rht: "11-Feb-87 11:57")

          (* * Create the NoteCards menus)



          (* * rht 8/1/84: Added def'n for new menu: NC.SelectingFileBoxChildrenMenu)



          (* * rht 2/4/85: The browser source menu now accepts multiple selections.)



          (* * fkr 10/29/85: Now moves window onto screen.)



          (* * fgh 11/14/85 Eliminated NC Main Menu which was replaced by per NoteFile menus.)



          (* * pmi 12/4/86 Added menus for left button title bar of NoteFile Icons, one for open NoteFile and one for closed 
	  NoteFile)



          (* * pmi 12/19/86 Removed menu items "Compact" and "Inspect&Repair" from NC.OpenedNoteFileMenu.)



          (* * rht 2/11/87: Moved stuff for creating NC.OpenedNoteFileMenu and NC.ClosedNoteFileMenu out of here and into a 
	  separate function.)


    (DECLARE (GLOBALVARS NC.MainMenuPosition NC.SelectingSourcesMenu NC.SelectingContentsMenu 
			     NC.SelectingSingleCardMenu NC.SelectingCardMenu 
			     NC.SelectingMultipleCardsMenu NC.DeleteSelectingMenu 
			     NC.SelectingParentsMenu NC.SelectingBrowserSourceMenu 
			     NC.SelectingFileBoxChildrenMenu NC.SelectingCardsMenu WHITESHADE 
			     GRAYSHADE))
    (PROG (X (Font (FONTCREATE (QUOTE HELVETICA)
				   12
				   (QUOTE BOLD)))
	       (TitleFont (FONTCREATE (QUOTE HELVETICA)
					10
					(QUOTE BOLD)))
	       (Position (OR (POSITIONP NC.MainMenuPosition)
			       (create POSITION
					 XCOORD ← 350
					 YCOORD ← 650))))    (* Main Menu)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((NoSource NIL 
						   "Indicates that this note card has no source.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL "Indicates that selection is completed."))
						)
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Source(s)"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingSourcesMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel card closing.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL "Indicates that selection is completed."))
						)
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting File Box(es)"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingContentsMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((New% Card NIL "Make a new note card.")
						  (Cancel NIL "Cancel this selection.")))
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Note Card"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 2
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingSingleCardMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this selection.")))
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Single Card"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 1
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingCardMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this selection.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL "Indicates that selection is completed."))
						)
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Note Cards"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingMultipleCardsMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this selection.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL "Indicates that selection is completed."))
						)
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting cards to close or delete"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.DeleteSelectingMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this selection.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL "Indicates that selection is completed."))
						)
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting FileBox(s)"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingParentsMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this selection.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL 
						    "Indicates that this operation is completed.")))
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Starting Card(s)/Box(s)"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingBrowserSourceMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this operation.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL 
						    "Indicates that this operation is completed.")))
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting cards to file"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingFileBoxChildrenMenu X)
	    (SETQ X (create MENU
				ITEMS ←(QUOTE ((Cancel NIL "Cancel this operation.")
						  (Undo NIL "Backup over last selection.")
						  (Done NIL 
						    "Indicates that this operation is completed.")))
				WHENSELECTEDFN ←(FUNCTION NC.SelectionMenusWhenSelectedFn)
				TITLE ← "Selecting Cards"
				CENTERFLG ← T
				MENUBORDERSIZE ← 1
				MENUOUTLINESIZE ← 1
				MENUCOLUMNS ← 3
				MENUFONT ← Font
				ITEMHEIGHT ←(IPLUS 10 (FONTPROP Font (QUOTE HEIGHT)))
				MENUPOSITION ← Position
				MENUTITLEFONT ← TitleFont))
	    (SETQ NC.SelectingCardsMenu X))))

(NC.NoteFileOperations
  (LAMBDA (NoteFile)                                         (* rht: "11-Feb-87 12:05")
                                                             (* Ask user to choose which database operation.
							     Called from main menu whenselected fn.)

          (* * fgh 11/14/85 Updated to handle NoteFile object and per NoteFile menus.)



          (* * kirk 14Jan86 Added Close/Delete cards and changed the format)



          (* * fgh 6/13/86 Now sets BusyOperation of NF menu to something interesting.)



          (* * kirk 3Jul86 passed NoteFileMenuWindow to NC.CompactNoteFile)



          (* * fgh 7/5/86 Fixed above fix and put NoteFileMenuWindow is all calls.)



          (* * rht 7/5/86: Added read-only open to notefileops menu.)



          (* * kirk 7/14/86 Took comma out of FullFileName in NC.DeleteDatabaseFile call)



          (* * kirk 15Jul86 Added Grey shade to non-functional items when file is open/closed)



          (* * kef 8/6/86: Added SPAWN.MOUSE towards the end to eliminate the extraneous printing of "NoteFile Busy" which 
	  seemed to be constantly occurring for remote NoteFiles.)



          (* * pmi 12/4/86 Removed menu creation and shading of operations for open or closed NoteFile.
	  Now just uses appropriate pre-defined menu, depending on whether NoteFile is open or closed.)



          (* * rht 2/11/87: Now makes sure NC.OpenedNoteFileMenu and NC.ClosedNoteFileMenu are non-nil.)


    (DECLARE (GLOBALVARS NC.OpenedNoteFileMenu NC.ClosedNoteFileMenu))
    (if (OR (NULL NC.OpenedNoteFileMenu)
		(NULL NC.ClosedNoteFileMenu))
	then (NC.MakeNoteFileIconOperationsMenus))
    (LET (Menu)
         (if (NC.NoteFileOpenP NoteFile)
	     then (SETQ Menu NC.OpenedNoteFileMenu)
	   else (SETQ Menu NC.ClosedNoteFileMenu))
         (PUTMENUPROP Menu (QUOTE NoteFile)
			NoteFile)
         (SPAWN.MOUSE)
         (MENU Menu))))

(NC.NoteFileTitleLeftWhenSelectedFn
  (LAMBDA (Item Menu Button)                                 (* rht: "11-Feb-87 15:02")

          (* * WhenSelectedFn for the menus NC.OpenedNoteFileMenu and NC.ClosedNoteFileMenu. These operations used to be 
	  performed by NC.NoteFileOperations. Provides faster Left-button title bar menu on NoteFile icons.)



          (* * rht 2/11/87: Now handles possibly extra unanticipated menu items.)



          (* * rht 2/11/87: Removed useless call to DEFAULTWHENSELECTEDFN.)


    (DECLARE (GLOBALVARS NC.NoteFilesHashArray NC.NoteFileIconCloseOperations 
			     NC.NoteFileIconOpenOperations NC.MsgDelay))
    (LET ((NoteFile (GETMENUPROP Menu (QUOTE NoteFile)))
	  (Operation (CAR Item))
	  NoteFileMenuWindow)
         (SETQ NoteFileMenuWindow (WFROMMENU (fetch (NoteFile Menu) of NoteFile)))
         (WINDOWPROP NoteFileMenuWindow (QUOTE BusyOperation)
		       Operation)
         (COND
	   ((AND (NC.NoteFileOpenP NoteFile)
		   (NOT (FMEMB Operation NC.NoteFileIconOpenOperations)))
	     (NC.PrintMsg NoteFileMenuWindow T "Can't " Operation " an open notefile."
			    (CHARACTER 13))
	     (DISMISS NC.MsgDelay)
	     (NC.ClearMsg NoteFileMenuWindow T))
	   ((AND (NOT (NC.NoteFileOpenP NoteFile))
		   (NOT (FMEMB (CAR Item)
				   NC.NoteFileIconCloseOperations)))
	     (NC.PrintMsg NoteFileMenuWindow T "Can't " Operation " a closed notefile."
			    (CHARACTER 13))
	     (DISMISS NC.MsgDelay)
	     (NC.ClearMsg NoteFileMenuWindow T))
	   (T (SELECTQ Operation
			 (Open (NC.OpenNoteFile NoteFile NC.NoteFilesHashArray NIL NIL NIL NIL NIL 
						  NIL NIL NoteFileMenuWindow))
			 (Read-only% Open (NC.OpenNoteFile NoteFile NC.NoteFilesHashArray NIL NIL 
							     NIL NIL NIL NIL NIL NoteFileMenuWindow 
							     NIL NIL NIL NIL T))
			 (Checkpoint (NC.CheckpointNoteFile NoteFile NIL NIL NIL NIL 
							      NoteFileMenuWindow))
			 (Close (NC.CloseNoteFile NoteFile NoteFileMenuWindow))
			 (Abort (NC.AbortSession NoteFile NoteFileMenuWindow))
			 (Compact (NC.CompactNoteFile NoteFile NIL NIL NoteFileMenuWindow))
			 (Compact% To% Target% File (NC.CompactNoteFile NoteFile NIL NIL 
									  NoteFileMenuWindow))
			 (Compact% In% Place (NC.CompactNoteFile NoteFile NIL T NoteFileMenuWindow))
			 (Inspect&Repair (NC.InspectAndRepairNoteFile NoteFile NIL 
									NoteFileMenuWindow))
			 (Read% Substances (NC.InspectAndRepairNoteFile NoteFile T 
									  NoteFileMenuWindow))
			 (Copy (NC.CopyNoteFile NoteFile NIL NoteFileMenuWindow))
			 (Rename (NC.RenameNoteFile NoteFile))
			 (Delete (NC.DeleteDatabaseFile NoteFile NoteFileMenuWindow))
			 (APPLY* (CADR Item)
				   NoteFile NoteFileMenuWindow)))))))

(NC.DoNoteFileOp
  (LAMBDA (Op)                                               (* rht: "11-Feb-87 14:04")

          (* * Do a NoteFile op chosen from NC icon menu)



          (* * rht 7/2/86: Now calls NC.AbortSession with NC.NoteCardsIconWindow arg.)



          (* * rht 7/5/86: Added Read-only% Open entry.)



          (* * rht 7/17/86: Now calls NC.InspectAndRepairNoteFile instead of NC.ScavengerPhase1.)



          (* * pmi 12/4/86: Added NC.NoteCardsIconWindow argument to calls to NC.ListOfNoteFilesMenu for "Delete" and 
"Rename" operations)



          (* * rht 2/11/87: Now handles case when Op has unexpected value.)


    (SELECTQ Op
	       (Open% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL NC.NoteCardsIconWindow
									 (QUOTE Open% NoteFile))))
				    (if (NULL NoteFile)
					then NIL
				      else (if (EQ NoteFile (QUOTE NEW))
						 then (SETQ NoteFile NIL))
					     (NC.OpenDatabaseFile NoteFile NIL NIL NIL NIL NIL NIL 
								    NIL NIL NIL 
								    NC.NoteCardsIconWindow))))
	       (Read-only% Open (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL 
									  NC.NoteCardsIconWindow
									  (QUOTE Open% NoteFile))))
				     (if (NULL NoteFile)
					 then NIL
				       else (if (EQ NoteFile (QUOTE NEW))
						  then (SETQ NoteFile NIL))
					      (NC.OpenDatabaseFile NoteFile (QUOTE INPUT)
								     NIL NIL NIL NIL NIL NIL NIL NIL 
								     NC.NoteCardsIconWindow))))
	       (Checkpoint% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu NIL T 
									   NC.NoteCardsIconWindow
									       (QUOTE 
									     Checkpoint% NoteFile))))
				          (if NoteFile
					      then (NC.CheckpointDatabase NoteFile NIL NIL NIL 
									      NIL 
									   NC.NoteCardsIconWindow))))
	       (Close% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu NIL T 
									  NC.NoteCardsIconWindow
									  (QUOTE Close% NoteFile))))
				     (if NoteFile
					 then (NC.CloseDatabaseFile NoteFile 
									NC.NoteCardsIconWindow))))
	       (Abort% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu NIL T 
									  NC.NoteCardsIconWindow
									  (QUOTE Abort% NoteFile))))
				     (if NoteFile
					 then (NC.AbortSession NoteFile NC.NoteCardsIconWindow))))
	       (Compact% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL 
									   NC.NoteCardsIconWindow
									    (QUOTE 
										Compact% NoteFile))))
				       (if (NULL NoteFile)
					   then NIL
					 else (if (EQ NoteFile (QUOTE NEW))
						    then (SETQ NoteFile NIL))
						(NC.CompactNoteFile NoteFile NIL NIL 
								      NC.NoteCardsIconWindow))))
	       (Compact% In% Place (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL 
									   NC.NoteCardsIconWindow
									     (QUOTE 
										Compact% NoteFile))))
				        (if (NULL NoteFile)
					    then NIL
					  else (if (EQ NoteFile (QUOTE NEW))
						     then (SETQ NoteFile NIL))
						 (NC.CompactNoteFile NoteFile NIL T 
								       NC.NoteCardsIconWindow))))
	       (Inspect&Repair% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL 
									   NC.NoteCardsIconWindow
										   (QUOTE 
									 Inspect&Repair% NoteFile))))
					      (if (NULL NoteFile)
						  then NIL
						else (if (EQ NoteFile (QUOTE NEW))
							   then (SETQ NoteFile NIL))
						       (NC.InspectAndRepairNoteFile NoteFile NIL 
									   NC.NoteCardsIconWindow))))
	       (Read% Substances (LET ((NoteFile (NC.ListOfNoteFilesMenu T NIL 
									   NC.NoteCardsIconWindow
									   (QUOTE 
									 Inspect&Repair% NoteFile))))
				      (if (NULL NoteFile)
					  then NIL
					else (if (EQ NoteFile (QUOTE NEW))
						   then (SETQ NoteFile NIL))
					       (NC.InspectAndRepairNoteFile NoteFile T 
									   NC.NoteCardsIconWindow))))
	       (Copy% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T (QUOTE CLOSED)
									 NC.NoteCardsIconWindow
									 (QUOTE Copy% NoteFile))))
				    (if (NULL NoteFile)
					then NIL
				      else (if (EQ NoteFile (QUOTE NEW))
						 then (SETQ NoteFile NIL))
					     (NC.CopyNoteFile NoteFile NIL NC.NoteCardsIconWindow)))
			       )
	       (Rename% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T (QUOTE CLOSED)
									   NC.NoteCardsIconWindow
									   (QUOTE Rename% NoteFile))
						 ))
				      (if (NULL NoteFile)
					  then NIL
					else (if (EQ NoteFile (QUOTE NEW))
						   then (SETQ NoteFile NIL))
					       (NC.RenameNoteFile NoteFile NIL 
								    NC.NoteCardsIconWindow))))
	       (Delete% NoteFile (LET ((NoteFile (NC.ListOfNoteFilesMenu T (QUOTE CLOSED)
									   NC.NoteCardsIconWindow
									   (QUOTE Delete% NoteFile))
						 ))
				      (if (NULL NoteFile)
					  then NIL
					else (if (EQ NoteFile (QUOTE NEW))
						   then (SETQ NoteFile NIL))
					       (NC.DeleteDatabaseFile NoteFile 
									NC.NoteCardsIconWindow))))
	       (Create% NoteFile (NC.CreateDatabaseFile NIL NIL NIL NIL NIL NIL 
							  NC.NoteCardsIconWindow))
	       (LET ((NoteFile (NC.ListOfNoteFilesMenu NIL T NC.NoteCardsIconWindow (QUOTE 
										  Close% NoteFile))))
		    (if NoteFile
			then (APPLY* Op NoteFile NC.NoteCardsIconWindow))))))
)
(PUTPROPS RHTPATCH197 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2694 5110 (NC.MakeNoteFileIconOperationsMenus 2704 . 5108)) (6617 24786 (
NC.MakeMainMenu 6627 . 14129) (NC.NoteFileOperations 14131 . 16170) (
NC.NoteFileTitleLeftWhenSelectedFn 16172 . 19063) (NC.DoNoteFileOp 19065 . 24784)))))
STOP