(FILECREATED "16-May-86 16:28:43" {QV}<NOTECARDS>1.3K>KIRKPATCH002.;1 7668 changes to: (VARS KIRKPATCH002COMS foo)) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT KIRKPATCH002COMS) (RPAQQ KIRKPATCH002COMS ((FNS NC.SelectSource NC.SelectDestination NC.ChooseCloseOrDelete NC.MoveOrCopyBranch))) (DEFINEQ (NC.SelectSource (LAMBDA (Prompt) (* kirk: "21-Apr-86 12:38") (* * Select a root. To be expanded to allow multiple roots by selecting white space in the card to get all of its contents or middle button to get arbitrary cards / right button to extend a range.) (LET (Window ImageObj card) (RESETFORM (CURSOR CROSSHAIRS) (AND Prompt (NC.PrintMsg NIL T Prompt)) (until (OR (MOUSESTATE LEFT) (MOUSESTATE MIDDLE) (MOUSESTATE RIGHT)) do (BLOCK)) (TOTOPW (SETQ Window (WHICHW))) (RESETFORM (INVERTW Window) (SETQ ImageObj (if (NOT (INSIDEP (DSPCLIPPINGREGION NIL (WINDOWPROP Window (QUOTE DSP))) (LASTMOUSEX Window) (LASTMOUSEY Window))) then (until (OR (MOUSESTATE UP) (NEQ Window (WHICHW)) (INSIDEP (DSPCLIPPINGREGION NIL (WINDOWPROP Window (QUOTE DSP))) (LASTMOUSEX Window) (LASTMOUSEY Window))) do (BLOCK)) (if (MOUSESTATE UP) then (NC.MakeCardImageObject (WINDOWPROP Window (QUOTE NoteCardObject)))) elseif (AND (SETQ CopyButtonEventFn (WINDOWPROP Window (QUOTE OldCopyButtonEventFn))) (NEQ CopyButtonEventFn (QUOTE NC.CopyButtonEventFn))) then (APPLY* CopyButtonEventFn Window) elseif (SETQ CopyButtonEventFn (WINDOWPROP Window (QUOTE BUTTONEVENTFN))) then (APPLY* CopyButtonEventFn Window))) (SETQ card (COND ((NC.LinkIconImageObjP ImageObj) (fetch (Link DestinationCard) of ( NC.FetchLinkFromLinkIcon ImageObj))) ((NC.CardImageObjP ImageObj) (IMAGEOBJPROP ImageObj (QUOTE OBJECTDATUM)))))) card)))) (NC.SelectDestination (LAMBDA (Prompt) (* kirk: " 6-Mar-86 23:55") (* * Select a a destination position in a desktop, NoteFile, or card.) (LET (Window ImageObj card) (RESETFORM (CURSOR NCCURSOR) (AND Prompt (NC.PrintMsg NIL T Prompt)) (until (OR (MOUSESTATE LEFT) (MOUSESTATE MIDDLE) (MOUSESTATE RIGHT)) do (BLOCK)) (TOTOPW (SETQ Window (WHICHW))) (RESETFORM (INVERTW Window) (SETQ ImageObj (if (NOT (INSIDEP (DSPCLIPPINGREGION NIL (WINDOWPROP Window (QUOTE DSP))) (LASTMOUSEX Window) (LASTMOUSEY Window))) then (until (OR (MOUSESTATE UP) (NEQ Window (WHICHW)) (INSIDEP (DSPCLIPPINGREGION NIL (WINDOWPROP Window (QUOTE DSP))) (LASTMOUSEX Window) (LASTMOUSEY Window))) do (BLOCK)) (if (MOUSESTATE UP) then (NC.MakeCardImageObject (WINDOWPROP Window (QUOTE NoteCardObject)))) elseif (AND (SETQ CopyButtonEventFn (WINDOWPROP Window (QUOTE OldCopyButtonEventFn))) (NEQ CopyButtonEventFn (QUOTE NC.CopyButtonEventFn))) then (APPLY* CopyButtonEventFn Window) elseif (SETQ CopyButtonEventFn (WINDOWPROP Window (QUOTE BUTTONEVENTFN))) then (APPLY* CopyButtonEventFn Window))) (SETQ card (COND ((NC.LinkIconImageObjP ImageObj) (fetch (Link DestinationCard) of ( NC.FetchLinkFromLinkIcon ImageObj))) ((NC.CardImageObjP ImageObj) (IMAGEOBJPROP ImageObj (QUOTE OBJECTDATUM)))))) card)))) (NC.ChooseCloseOrDelete (LAMBDA (NoteFile) (* rht: "18-Nov-85 20:16") (* * Asks the user whether a delete or close is desired an calls the appropriate function to do the work.) (* * rht 11/18/85: Added NoteFile argument so that MainMenu could be found.) (PROG ((Font (FONTCREATE (QUOTE HELVETICA) 12 (QUOTE BOLD))) (MainMenu (fetch (NoteFile Menu) of NoteFile)) W Z Menu) (SETQ Menu (OR (AND (BOUNDP (QUOTE NC.BrowseOrSearchMenu)) (type? MENU NC.BrowseOrSearchMenu) NC.BrowseOrSearchMenu) (SETQ NC.BrowseOrSearchMenu (create MENU ITEMS ← (QUOTE ((Close% Cards (QUOTE Close% Cards) "Close selected cards.") (Delete% Cards (QUOTE Delete% Cards) "Delete selected cards.") )) MENUFONT ← Font ITEMHEIGHT ← (IPLUS 2 (FONTPROP Font (QUOTE HEIGHT))) TITLE ← "Which?")))) (SETQ W (MENUITEMREGION (CAR (NTH (fetch (MENU ITEMS) of MainMenu) 1)) MainMenu)) (SETQ Z (WINDOWPROP (WFROMMENU MainMenu) (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))))) (RETURN (SELECTQ (MENU Menu) (Close% Cards (NC.CloseNoteCards)) (Delete% Cards (NC.DeleteNoteCards NIL T)) NIL))))) (NC.MoveOrCopyBranch (LAMBDA (FromCard ToCard TraversalSpecs) (* kirk: " 6-Mar-86 01:02") (* * Ask whether to move or copy a branch. branch and do whichever is requested.) (SELECTQ (NC.AskMoveOrCopyNoteCards (CONCAT "A unique card cannot currently be in more than one NoteFile. Do you wish to move or copy this structure to " (fetch (NoteFile FullFileName) of (fetch (Card NoteFile) of FromCard)) "?") " " (QUOTE Cancel) NIL (NC.FetchWindow FromCard)) (Copy (NC.CopyStructure FromCard ToCard (OR TraversalSpecs (NC.AskTraversalSpecs FromCard)))) (Move (NC.MoveStructure FromCard ToCard (OR TraversalSpecs (NC.AskTraversalSpecs FromCard)))) NIL))) ) (PUTPROPS KIRKPATCH002 COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (359 7585 (NC.SelectSource 369 . 2593) (NC.SelectDestination 2595 . 4687) ( NC.ChooseCloseOrDelete 4689 . 6713) (NC.MoveOrCopyBranch 6715 . 7583))))) STOP