CDEnvironment.mesa (part of Chipndale)
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, December 18, 1984 12:26:50 pm PST
last edited by Christian Jacobi, April 11, 1985 12:33:43 pm PST
DIRECTORY
CD USING [DrawRef, ObPtr];
CDEnvironment: CEDAR DEFINITIONS =
BEGIN
-- Accessing the nesting environment of objects while drawing.
GetProp: PROC [environment: CD.DrawRef, prop: REF, skipInnerMost: NAT𡤀] RETURNS [REF];
-- Access propertylists of nesting applications while a draw process...
-- Finds nested-most occurance of property prop.
-- skipInnerMost: the "skipInnerMost" most nested occurences of the property are ignored.
-- Returns NIL if prop is not found.
-- Does not return properties from the environment of an object which does not propagate.
GetIntProp: PROC[environment: CD.DrawRef, prop: REF, skipInnerMost: NAT𡤀, ifNotFound: INT𡤀] RETURNS [INT];
-- it is good practice to use an impossible value for "ifNotFound"; defaulting is
-- dangerous because it could hide bugs.
Propagates: PROC [ob: CD.ObPtr] RETURNS [BOOL];
-- propagates TRUE means GetProp (et al) will access properties of outer levels.
-- propagates FALSE means GetProp (et al) will not access properties of outer levels.
AllowPropagation: PROC [ob: CD.ObPtr, propagates: BOOL];
-- default if not called at all is FALSE
-- Only allowed to objects with "inDirectory" TRUE
SomeChildPropagates: PROC [ob: CD.ObPtr] RETURNS [BOOL];
END.