(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP")
(FILECREATED " 3-Mar-88 19:17:14" {QV}<NOTECARDS>1.3LNEXT>RHTPATCH312.;2 4709   

      changes to%:  (FNS NC.GetGraphEditMenu)
                    (VARS RHTPATCH312COMS)

      previous date%: " 3-Mar-88 19:15:13" {QV}<NOTECARDS>1.3LNEXT>RHTPATCH312.;1)


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

(PRETTYCOMPRINT RHTPATCH312COMS)

(RPAQQ RHTPATCH312COMS ((DECLARE%: DONTCOPY (PROPS (RHTPATCH312 MAKEFILE-ENVIRONMENT)
                                                   (RHTPATCH312 FILETYPE)))
                        [DECLARE%: FIRST (P (NC.LoadFileFromDirectories 'NCBROWSERCARD]
                        
          
          (* ;; "Fixes bug in dwmpatch002.  Card var was unbound.")

                        
          
          (* ;; "Change to NCBROWSERCARD")

                        (FNS NC.GetGraphEditMenu)))
(DECLARE%: DONTCOPY 

(PUTPROPS RHTPATCH312 MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP"))

(PUTPROPS RHTPATCH312 FILETYPE :TCOMPL)
)
(DECLARE%: FIRST 
(NC.LoadFileFromDirectories 'NCBROWSERCARD)
)



(* ;; "Fixes bug in dwmpatch002.  Card var was unbound.")




(* ;; "Change to NCBROWSERCARD")

(DEFINEQ

(NC.GetGraphEditMenu
  [LAMBDA (Window)                                           (* ; "Edited  3-Mar-88 19:16 by Trigg")
          
          (* ;; "Create, if necessary, and bring up the graph editor menu.")
          
          (* ;; "pmi 3/25/87: Added NC.MenuFont to all menus")
          
          (* ;; 
          "rht 1/14/88: Now ensures that both menus are computed rather than just the one needed.")
          
          (* ;; "dwm 1/27/88: Added ReadOnly stuff")
          
          (* ;; "rht 3/3/88: Fixed bug in dwm fix.  Card var was unbound.")

    (DECLARE (GLOBALVARS NC.MenuFont NC.GraphEditMenuItems NC.GraphEditUnfixedMenuItems))
    (LET ((GraphEditUnfixableMenu (WINDOWPROP Window 'GRAPHEDITUNFIXABLEMENU))
          (GraphEditFixableMenu (WINDOWPROP Window 'GRAPHEDITFIXABLEMENU))
          (Card (NC.CoerceToCard Window))
          GraphEditFixedMenuWin)
         [OR GraphEditUnfixableMenu (WINDOWPROP Window 'GRAPHEDITUNFIXABLEMENU
                                           (SETQ GraphEditUnfixableMenu
                                            (create MENU
                                                   ITEMS ← NC.GraphEditMenuItems
                                                   TITLE ← "Editor Menu"
                                                   WHENSELECTEDFN ← (FUNCTION 
                                                                     NC.GraphEditMenuWhenSelectedFn)
                                                   CHANGEOFFSETFLG ← T
                                                   CENTERFLG ← T
                                                   MENUOFFSET ← (CONS -1 0)
                                                   MENUFONT ← NC.MenuFont
                                                   ITEMHEIGHT ← (IPLUS (FONTPROP NC.MenuFont
                                                                              'HEIGHT)
                                                                       1]
         [OR GraphEditFixableMenu (WINDOWPROP Window 'GRAPHEDITFIXABLEMENU
                                         (SETQ GraphEditFixableMenu
                                          (create MENU using GraphEditUnfixableMenu ITEMS ← 
                                                             NC.GraphEditUnfixedMenuItems]
          
          (* ;; "If menu is already up, then put up a menu without the FIXMENU option, otherwise, allow user to fix menu.")

         (if [SETQ GraphEditFixedMenuWin (for Win in (ATTACHEDWINDOWS Window)
                                            thereis (AND (OPENWP Win)
                                                         (WINDOWPROP Win 'GRAPHEDITMENUFLG]
             then (if (NC.FetchUserDataProp Card 'ReadOnly)
                      then (REMOVEWINDOW GraphEditFixedMenuWin)
                           (WINDOWPROP Window 'RIGHTBUTTONFN NIL)
                    else (PUTMENUPROP GraphEditUnfixableMenu 'MAINWINDOW Window)
                         (MENU GraphEditUnfixableMenu))
           else (if (NC.FetchUserDataProp Card 'ReadOnly)
                    then (WINDOWPROP Window 'RIGHTBUTTONFN NIL)
                  else (PUTMENUPROP GraphEditFixableMenu 'MAINWINDOW Window)
                       (MENU GraphEditFixableMenu])
)
(PUTPROPS RHTPATCH312 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (1265 4626 (NC.GetGraphEditMenu 1275 . 4624)))))
STOP