JaMImagerContexts.mesa
Last edit by Stone, December 9, 1983 2:02 pm
for clients who want to use alternate contexts in TJaMImager
DIRECTORY
JaMInternal USING [Frame],
Imager USING [Context];
JaMImagerContexts: DEFINITIONS = {
Frame: TYPE = JaMInternal.Frame;
DCList: TYPE = REF DCRec;
DCRec: TYPE = RECORD [next: DCList, init: PROC RETURNS[Imager.Context],
dc: Imager.Context, enabled, initOnErase: BOOLEAN, name: ATOM];
GProc: TYPE = PROC [dc: Imager.Context];
ForAllDCs: PROC [list: DCList, proc: GProc];
replaces Establish and ForgetNonViewerContext. 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.
the proc init will be called initially and each time .initdc is called.
initOnErase calls init if .erase is called
you must Enable the context to cause things to be displayed in it.
do not pass a viewer context in here!!
AddContext: PROC [frame: Frame, init: PROC RETURNS[Imager.Context], name: ATOM, enabled, initOnErase: BOOLEANTRUE];
RemoveContext: PROC [frame: Frame, name: ATOM] RETURNS [context: Imager.Context];
turns display to context on and off.
EnableContext: PROC [frame: Frame, name: ATOM];
DisableContext: PROC [frame: Frame, name: ATOM];
EnableViewer: PROC [frame: Frame];
DisableViewer: PROC [frame: Frame];
NotFound: SIGNAL; --raised by RemoveContext, EnableContext and DisableContext
}.