CDStretchyBackdoor.mesa (part of ChipNDale)
Copyright © 1984, 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, October 22, 1984 10:04:35 am PDT
Last edited by: Christian Jacobi, October 31, 1986 10:09:46 am PST
DIRECTORY
CD;
CDStretchyBackdoor: CEDAR DEFINITIONS =
BEGIN
Hack to implement stretch and stretchy move commands.
MatchProc: TYPE = PROC [me: CD.Object, r: CD.Rect, layer: CD.Layer, prim: BOOL, horz: BOOL] RETURNS [BOOLFALSE];
MakeSimilarProc: TYPE = PROC [me: CD.Object, ir: CD.Rect] RETURNS [CD.Object←NIL];
HasMatchProc: PROC [ob: CD.Object] RETURNS [BOOL];
--Returns whether a MatchProc has been registered
Match: PROC [me: CD.Object, r: CD.Rect, layer: CD.Layer, prim: BOOL, horz: BOOL] RETURNS [BOOL];
--calls MatchProc
MakeSimilar: PROC [me: CD.Object, ir: CD.Rect] RETURNS [CD.Object←NIL];
--Returns similar object, or NIL if failed or no MakeSimilarProc registered
InstallMatchProc: PROC [type: CD.ObjectClass, match: MatchProc];
InstallMakeSimilarProc: PROC [type: CD.ObjectClass, makeSimilar: MakeSimilarProc];
END.