DIRECTORY JaM USING [State], Imager USING [Context]; JaMImagerContexts: CEDAR DEFINITIONS = { State: TYPE = JaM.State; Context: TYPE = Imager.Context; AddContext: PROC [state: State, context: Context, callMe: CallMe, name: ATOM, enabled: BOOLEAN _ TRUE]; Command: TYPE = {initdc, erase, pushdc, popdc}; CallMe: TYPE = PROC[context: Context, command: Command] RETURNS[new: Context]; RemoveContext: PROC [state: State, name: ATOM] RETURNS [context: Context]; EnableContext: PROC [state: State, name: ATOM]; DisableContext: PROC [state: State, name: ATOM]; EnableViewer: PROC [state: State]; DisableViewer: PROC [state: State]; NotFound: SIGNAL; --raised by RemoveContext, EnableContext and DisableContext DCList: TYPE = REF DCRec; DCRec: TYPE = RECORD [ next: DCList, callMe: CallMe, dc: Imager.Context, enabled: BOOLEAN, name: ATOM]; GProc: TYPE = PROC [dc: Context]; ForAllDCs: PROC [list: DCList, proc: GProc]; }. NJaMImagerContexts.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edit by Stone, January 22, 1984 6:48:49 pm PST Tim Diebert: July 18, 1985 3:22:00 pm PDT Pick any name ie: $PD. If a context with the name already exists for that frame, AddContext will replace the old context with the new one. You must Enable the context to cause things to be displayed in it. generic call back procedure used to notify client of certain JaMImager commands. If you don't want to change the context just hand it back. The proc: callMe will be called for the following reasons command=initdc: .initdc is called. command=erase: .erase is called command=pushdc: .pushdc is called. Note: the imager does not have a stack model command=popdc: .popdc is called. turns display to context on and off. turns context in viewer on and off Κό˜codešœ™Kšœ Οmœ1™