DIRECTORY CedarProcess USING [SetPriority], TEditRefresh, MonitoredQueue USING [Create, MQ, Remove], Process USING [Detach], TEditDocument USING [GetViewerForRoot, SelectionId, TEditDocumentData], TextNode USING [Ref], TEditTouchup USING [refresh], ViewerClasses USING [Viewer], ViewerForkers USING [ForkPaint]; TEditRefreshImpl: CEDAR MONITOR IMPORTS CedarProcess, MonitoredQueue, Process, TEditDocument, TEditTouchup, ViewerForkers EXPORTS TEditRefresh = BEGIN dirtyDocs: PUBLIC MonitoredQueue.MQ _ MonitoredQueue.Create[]; Refresh: PROC = { CedarProcess.SetPriority[normal]; DO WITH MonitoredQueue.Remove[dirtyDocs] SELECT FROM doc: TextNode.Ref => { viewer: ViewerClasses.Viewer _ TEditDocument.GetViewerForRoot[doc]; IF viewer # NIL THEN WITH viewer.data SELECT FROM tdd: TEditDocument.TEditDocumentData => FOR v: ViewerClasses.Viewer _ viewer, v.link WHILE v # NIL DO IF NOT v.iconic AND NOT v.destroyed THEN ViewerForkers.ForkPaint[v, client, FALSE, TEditTouchup.refresh, TRUE]; IF v.link = viewer THEN EXIT; ENDLOOP; ENDCASE; }; ENDCASE; ENDLOOP; }; ScrollToEndOfDoc: PUBLIC PROC [viewer: ViewerClasses.Viewer, glitch: BOOL] = { WITH viewer.data SELECT FROM tdd: TEditDocument.TEditDocumentData => { tdd.scroll _ endofdoc; tdd.scrollGlitch _ glitch; }; ENDCASE; }; ScrollToEndOfSel: PUBLIC PROC [viewer: ViewerClasses.Viewer, glitch: BOOL, id: TEditDocument.SelectionId _ primary] = { WITH viewer.data SELECT FROM tdd: TEditDocument.TEditDocumentData => { tdd.scroll _ endofsel; tdd.scrollGlitch _ glitch; tdd.scrollSelectionId _ id; }; ENDCASE; }; TRUSTED {Process.Detach[FORK Refresh[]]}; END. βTEditRefreshImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Russ Atkinson (RRA) July 2, 1985 10:46:00 am PDT Michael Plass, March 29, 1985 5:49:45 pm PST Doug Wyatt, March 3, 1985 6:41:47 pm PST Κ‘˜codešœ™Kšœ Οmœ1™K˜šΟnœžœ˜Kšœ!˜!šž˜šžœ"žœž˜1šœ˜KšœC˜Cšžœ žœž˜šžœ žœž˜šœ'˜'šžœ*žœžœž˜=š žœžœ žœžœ ž˜(Kšœ#žœžœ˜F—Kšžœžœžœ˜Kšžœ˜——Kšžœ˜——K˜—Kšžœ˜—Kšžœ˜—Kšœ˜—K˜š œžœžœ(žœ˜Nšžœ žœž˜šœ)˜)Kšœ˜Kšœ˜K˜—Kšžœ˜—Kšœ˜K˜—š œžœžœ(žœ.˜wšžœ žœž˜šœ)˜)Kšœ˜Kšœ˜Kšœ˜K˜—Kšžœ˜—Kšœ˜K˜—Kšžœžœ ˜)K˜Kšžœ˜—…—L Ώ