(FILECREATED "27-Apr-87 16:20:24" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH248.;2 4602
changes to: (VARS RHTPATCH248COMS)
(FNS NC.BrowserCardQuitFn NC.AddBrowserCard)
previous date: "25-Apr-87 18:08:56" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH248.;1)
(* Copyright (c) 1987 by Xerox Corporation. All rights reserved.)
(PRETTYCOMPRINT RHTPATCH248COMS)
(RPAQQ RHTPATCH248COMS ((* * In order to fix a browser card storage leak, I had to add this crufty
QuitFn. It runs over the entire graph setting UserData of UIDs to NIL.)
(DECLARE: FIRST (P (LOAD? (NC.FindFile (QUOTE NCBROWSERCARD)))))
(* * New function for NCBROWSERCARD)
(FNS NC.BrowserCardQuitFn)
(* * Change to NCBROWSERCARD)
(FNS NC.AddBrowserCard)))
(* * In order to fix a browser card storage leak, I had to add this crufty QuitFn. It runs
over the entire graph setting UserData of UIDs to NIL.)
(DECLARE: FIRST
(LOAD? (NC.FindFile (QUOTE NCBROWSERCARD)))
)
(* * New function for NCBROWSERCARD)
(DEFINEQ
(NC.BrowserCardQuitFn
(LAMBDA (Card) (* rht: "25-Apr-87 17:57")
(* * This clears all UserData fields of Graph node UIDs. I ONLY HAVE TO DO THIS BECAUSE INTERLISP WON'T GC CYCLES!)
(for GraphNode in (fetch (GRAPH GRAPHNODES) of (NC.FetchSubstance Card))
do (LET ((GraphNodeID (NC.CoerceToGraphNodeIDOrLabel GraphNode)))
(AND (type? UID GraphNodeID)
(NC.UIDSetPropList GraphNodeID NIL))))
(NCP.ApplySuperTypeFn QuitFn Card)))
)
(* * Change to NCBROWSERCARD)
(DEFINEQ
(NC.AddBrowserCard
(LAMBDA NIL (* rht: "25-Apr-87 17:58")
(* * fgh 11/14/85 Updated to handle merge of card and substance types.)
(* * rht 4/7/86: Added middle button menu items.)
(* * rht 4/25/87: Added QuitFn)
(NC.AddCardType (QUOTE Browser)
(QUOTE Graph)
(BQUOTE ((MakeFn , (FUNCTION NC.MakeBrowserCard))
(EditFn , (FUNCTION NC.BringUpBrowserCard))
(PutFn , (FUNCTION NC.PutBrowserSubstance))
(GetFn , (FUNCTION NC.GetBrowserSubstance))
(DeleteLinksFn , (FUNCTION NC.DelReferencesToCardFromBrowser))
(QuitFn , (FUNCTION NC.BrowserCardQuitFn))))
(BQUOTE ((LinkDisplayMode Title)
(DefaultHeight 350)
(DefaultWidth 500)
(DisplayedInMenuFlg , T)
(LeftButtonMenuItems , (for Item in (NC.GetCardTypeField
LeftButtonMenuItems
(QUOTE Graph))
collect (if (EQ (CAR Item)
(QUOTE
Insert% Link))
then
NC.GlobalInsertLinkMenuItem
else Item)))
(MiddleButtonMenuItems , (QUOTE ((Recompute% Browser
(FUNCTION
NC.UpdateBrowserCard)
"Recomputes this browser to show the current state of the NoteFile.")
(Relayout% Graph
(FUNCTION
NC.RelayoutBrowserCard)
"Re-layout the browser, but keep same nodes.")
(Reconnect% Nodes
(FUNCTION
NC.ConnectNodesInBrowser)
"Draw all possible links, from currently selected link types, between pairs of nodes.")
(Unconnect% Nodes
(FUNCTION
NC.UnconnectNodesInBrowser)
"Undraw all links in the browser.")
(Expand% Browser% Node
(FUNCTION
NC.ExpandBrowserNode)
"Expand the graph under one node to a given depth.")
(Graph% Edit% Menu
(FUNCTION
NC.GetGraphEditMenu)
"Bring up the graph editor menu.")
(Change% Browser% Specs
(FUNCTION
NC.ChangeBrowserSpecs)
"Make changes to some or all of the browser specs, e.g. link types, depth, etc.")
(Browser% Overview% Win
(FUNCTION
NC.MakeBrowserOverviewWin)
"Attach the browser overview window.")
(Change% Overview% Specs
(FUNCTION
NC.AskBrowserOverviewSpecs)
"Change the browser overview specs: where to attach and what mode.")))))
))))
)
(PUTPROPS RHTPATCH248 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
(FILEMAP (NIL (1022 1596 (NC.BrowserCardQuitFn 1032 . 1594)) (1633 4520 (NC.AddBrowserCard 1643 . 4518
)))))
STOP