(FILECREATED " 7-Jun-86 00:56:57" {QV}<NOTECARDS>1.3K>KIRKPATCH006.;1 5104 changes to: (VARS KIRKPATCH006COMS foo)) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT KIRKPATCH006COMS) (RPAQQ KIRKPATCH006COMS ((FNS NC.NoteFileOperations))) (DEFINEQ (NC.NoteFileOperations (LAMBDA (NoteFile) (* kirk: " 6-Jun-86 21:48") (* Ask usere 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) (LET ((NoteFileMenu (fetch (NoteFile Menu) of NoteFile)) (Font (FONTCREATE (QUOTE HELVETICA) 10 (QUOTE BOLD))) (FullFileName (fetch (NoteFile FullFileName) of NoteFile)) NoteFileMenuWindow Menu W Z) (SPAWN.MOUSE) (SETQ NoteFileMenuWindow (WFROMMENU NoteFileMenu)) (OR (SETQ Menu (WINDOWPROP NoteFileMenuWindow (QUOTE DatabaseOperationsMenu))) (WINDOWPROP NoteFileMenuWindow (QUOTE DatabaseOperationsMenu) (SETQ Menu (create MENU ITEMS ← (BQUOTE ((Checkpoint (NC.CheckpointDatabase , NoteFile) "Checkpoint this NoteFile, saving changed cards.") (Close (NC.CloseDatabaseFile , NoteFile) "Closes this NoteFile." (SUBITEMS ("Close NoteFile" (NC.CloseDatabaseFile , NoteFile) "Closes this NoteFile.") ("Close Cards" (NC.CloseNoteCards) "Closes Cards you SHIFT-select") (Delete% Changes (NC.AbortSession , NoteFile) "Throws away all changes to this NoteFile since last open or checkpoint."))) (Parameters (PROGN (FLASHW PROMPTWINDOW) (NC.PrintMsg NIL T "No NoteFile dependant parameters currently. Use NoteCards icon.") (FLASHW PROMPTWINDOW)) "Bring up editor to change parameters.") (Compact (NC.CompactNoteFile , NoteFile) "Compacts a NoteFile to a target file." (SUBITEMS (Compact% To% Target% File ( NC.CompactNoteFile , NoteFile) "Compacts this NoteFile to a target file.") (Compact% In% Place (NC.CompactNoteFile , NoteFile NIL T) "Compacts this NoteFile in place."))) (Copy (NC.CopyNoteFile , NoteFile) "Copies this notefile to a target file.") (Inspect&Repair (NC.InspectAndRepairNoteFile , NoteFile) "Inspects and optionally repairs this NoteFile." (SUBITEMS (Read% Substances ( NC.InspectAndRepairNoteFile , NoteFile T) "Inspects and optionally repairs a Notefile, but reads every substance. This slows it WAY down."))) (Open (NC.OpenDatabaseFile , NoteFile) "Opens this NoteFile.") (Delete (NC.DeleteDatabaseFile (QUOTE , (PACKFILENAME (QUOTE VERSION) NIL (QUOTE BODY) FullFileName)) NoteFileMenuWindow) "Deletes the oldest version of this NoteFile." (SUBITEMS (Delete% NoteFile (NC.DeleteDatabaseFile (QUOTE , (PACKFILENAME (QUOTE VERSION) NIL (QUOTE BODY) FullFileName))) "Deletes the oldest version of this NoteFile.") (Delete% Cards (NC.DeleteNoteCards NIL T) "Deletes cards you SHIFT-select.") (Delete% Changes (NC.AbortSession , NoteFile T) "Throws away all changes to this NoteFile since last open or checkpoint."))))) CENTERFLG ← NIL TITLE ← FullFileName MENUTITLEFONT ← Font MENUFONT ← Font MENUCOLUMNS ← 2 ITEMHEIGHT ← (IPLUS (FONTPROP Font (QUOTE HEIGHT)) 1))))) (SETQ W (MENUITEMREGION (CAR (NTH (fetch (MENU ITEMS) of NoteFileMenu) 2)) NoteFileMenu)) (SETQ Z (WINDOWPROP (WFROMMENU NoteFileMenu) (QUOTE REGION))) (replace MENUPOSITION of Menu with (CONS (IPLUS (fetch (REGION LEFT) of W) (fetch (REGION LEFT) of Z)) (IPLUS (fetch (REGION TOP) of W) (fetch (REGION BOTTOM) of Z) (IMINUS (fetch (MENU IMAGEHEIGHT) of Menu))))) (MENU Menu)))) ) (PUTPROPS KIRKPATCH006 COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (296 5021 (NC.NoteFileOperations 306 . 5019))))) STOP