DIRECTORY AMTypes USING [TV], AMModel USING [Context, Section], AMModelBridge USING [LoadedSection], FileViewerOps USING [SelectionOption], Rope USING [ROPE], ViewerClasses USING [Viewer], WorldVM USING [World]; AMViewerOps: CEDAR DEFINITIONS = BEGIN OPEN AMTypes, Rope, WorldVM; Section: TYPE = AMModel.Section; LoadedSection: TYPE = AMModelBridge.LoadedSection; SelectionOption: TYPE = FileViewerOps.SelectionOption; ViewerFromSection: PROC [section: AMModel.Section, report: ReportProc] RETURNS [viewer: ViewerClasses.Viewer]; SectionFromSource: PROC [world: World _ NIL, name: ROPE _ NIL, index: INT _ 0] RETURNS [section: AMModel.Section, contexts: LIST OF AMModel.Context]; SectionFromSelection: PROC [world: World _ NIL, which: SelectionOption _ primary] RETURNS [section: AMModel.Section, contexts: LIST OF AMModel.Context]; SourceFromTV: PROC [tv: TV, report: ReportProc] RETURNS [name: ROPE, index: INT]; Severity: TYPE = {success, comment, warning, fatal}; ReportProc: TYPE = PROC [msg: ROPE, severity: Severity]; END. fAMViewerOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Russ Atkinson, April 13, 1983 6:59 pm Paul Rovner, October 27, 1983 8:20 pm Doug Wyatt, April 25, 1985 0:13:39 am PST primary => use primary selection feedback => use feedback selection Viewers/Section translations ... returns an open viewer for the given Section; Reports through report if not possible. ... returns a section for the given source (the name can be a long path name); !AMTypes.Error if this cannot be done. If world = NIL then world _ LocalWorld. warn = TRUE => the version of the source file for the given location does not correspond to the viewer (although this is no guarantee that the wrong thing happened). The name given MUST be for an open viewer, and the index given MUST be in the proper source range. ... returns a loaded section for the given viewer; !AMTypes.Error if this cannot be done. If world = NIL then world _ LocalWorld. warn = TRUE => the version of the source file for the given location does not correspond to the viewer (although this is no guarantee that the wrong thing happened). The name given MUST be for an open viewer, and the index given MUST be in the proper source range. ... gets the source file name and the source index for the given TV, which must be a local frame or global frame; if not successful, then name = NIL & index < 0. ERRORS success => operation is completed comment => intermediate information warning => something is wrong, but not fatal fatal => operation is completed, but did not succeed ... is the type of user-supplied procedure used to report results in above operations Κ)˜codešœ™Kšœ Οmœ1™