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]; }. "JaMImagerContexts.mesa Last edit by Stone, January 22, 1984 6:48:49 pm PST for clients who want to use alternate contexts in JaMImager 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 Êì˜J˜Jšœ™Jšœ3™3Jšœ;™;J˜šÏk ˜ Jšœœ ˜Jšœœ ˜J˜—Jšœœ˜(J˜Jšœœ ˜Jšœ œ˜J˜JšœÏ™ÏJ™Jš Ïn œœ8œ œœ˜gJšœ œ"˜/šžœœœ%œ˜NJšœP™PJšœ:™:šœ9™9Jšœ"™"Jšœ™JšœQ™QJšœ ™ ——Jšž œœœœ˜JJ˜Jšœ$™$Jšž œœœ˜/Jšžœœœ˜0Jšœ"™"Jšž œœ˜"Jšž œœ˜#J˜Jšœ œÏc;˜MJ˜Jšœœœ˜šœœœ˜Jšœ ˜ Jšœ˜Jšœ˜Jšœ œ˜Jšœœ˜ —Jšžœœœ˜!J˜Jšž œœ˜,J˜J˜J˜J˜J˜J˜J˜—…—¤²