CDCallSpecific.mesa a ChipNDale module
Copyright © 1983, 1984 by Xerox Corporation. All rights reserved.
by Ch. Jacobi, September 20, 1983 12:35 pm
last edited Christian Jacobi, May 29, 1985 11:38:24 am PDT
DIRECTORY
CD;
CDCallSpecific: CEDAR DEFINITIONS =
BEGIN
CallProc: TYPE = PROC [design: CD.Design, inst: CD.Instance, x: REF]
RETURNS [done: BOOLTRUE, removeMe: BOOLFALSE, include: CD.InstanceList←NIL,
repaintMe: BOOLFALSE, repaintInclude: BOOLFALSE];
--x: passed through
--done: if not done, this call will not be counted
--removeMe: inst is removed from the design
--include: this list is included into the design
CallForThis: PROC [design: CD.Design, inst: CD.Instance,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
--inst MUST be part of design
CallForAll: PROC [design: CD.Design,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
CallForSelected: PROC [design: CD.Design,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
CallForOneSelected: PROC [design: CD.Design,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
CallIfOneSelected: PROC [design: CD.Design,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
CallForPointed: PROC [design: CD.Design, point: CD.Position,
objectSpecific: REFNIL, whatElse: CallProc←NIL, x: REFNIL]
RETURNS [NAT];
--the Call.. procedures loop over all instances of the most pushed in cell, or what
--ever their name suggests and:
--first check if the object has a objectSpecific furtherProc and calls it,
--if there is no objectSpecific furtherProc, or it returns NOT done, it calls whatElse.
--objectSpecific=NIL means no search
--whatElse=NIL means nothing else to call.
--using removeMe is a slow method for deleting
--usually setting removeMe demands setting repaintMe to remove it from screen
Register: PROC [key: REF, objectType: REF CD.ObjectClass, proc: CallProc];
--registers proc to be called for an objectType, if key=objectSpecific
--key must have been registered with CDObjectProcs.RegisterFurther
--[internally uses CDObjectProcs.StoreFurther; this procedure is for conveniance only]
END.