DIRECTORY CD, CDBasics, CDCells, CDImports, CDOldInterestRects, CDIO, CDRepetitions, CDProperties, TokenIO; CDOldInterestRectsImpl: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CDImports, CDIO, CDProperties, CDRepetitions, TokenIO EXPORTS CDOldInterestRects = BEGIN SetInterestProc: TYPE = PROC [ob: CD.Object, r: CD.Rect]; AdjustInterest: PUBLIC PROC [ob: CD.Object] = BEGIN IF ob.class.inDirectory AND CDIO.VersionKey[]<8 THEN { WITH CDProperties.GetObjectProp[from: ob, prop: interestRectProperty] SELECT FROM pp: REF CD.Rect => { IF CDBasics.NonEmpty[pp^] THEN SetInterest[ob, pp^]; CDProperties.PutProp[ob, interestRectProperty, NIL]; }; ENDCASE => NULL; }; END; InternalReadProperty: PROC [prop: ATOM] RETURNS [val: REF] = BEGIN x1: INT = TokenIO.ReadInt[]; y1: INT = TokenIO.ReadInt[]; x2: INT = TokenIO.ReadInt[]; y2: INT = TokenIO.ReadInt[]; val _ NEW[CD.Rect_[x1, y1, x2, y2]] END; InsideRect: PUBLIC PROC [ob: CD.Object] RETURNS [CD.Rect] = BEGIN WITH ob.specificRef SELECT FROM cp: CD.CellPtr => RETURN [cp.dIr]; ENDCASE => RETURN [CD.InterestRect[ob]]; END; SetInterest: SetInterestProc = BEGIN RepOldSetInterest: PROC [ob: CD.Object, r: CD.Rect] = BEGIN cptr: CDRepetitions.RepPtr = NARROW[ob.specificRef]; cptr.ir _ r; END; ImpOldSetInterest: PROC [ob: CD.Object, r: CD.Rect] = BEGIN cptr: CDImports.ImportPtr = NARROW[ob.specificRef]; cptr.ir _ r; END; CellOldSetInterest: PROC [ob: CD.Object, r: CD.Rect] = BEGIN cptr: CD.CellPtr = NARROW[ob.specificRef]; cptr.ir _ r; cptr.useDIr _ FALSE; END; IF CDCells.IsCell[ob] THEN CellOldSetInterest[ob, r] ELSE IF CDImports.IsImport[ob] THEN ImpOldSetInterest[ob, r] ELSE IF CDRepetitions.IsRepetition[ob] THEN RepOldSetInterest[ob, r] ELSE WITH CDProperties.GetProp[ob.class.properties, $SetInterestProc] SELECT FROM sp: REF SetInterestProc => sp^[ob, r]; ENDCASE => NULL; END; InstallOldSetInterest: --PUBLIC-- PROC [type: REF CD.ObjectClass, proc: SetInterestProc] = BEGIN CDProperties.PutProp[onto: type, prop: $SetInterestProc, val: NEW[SetInterestProc_proc]]; END; InternalReadOrigin: PROC [prop: ATOM] RETURNS [val: REF] = BEGIN x: INT = TokenIO.ReadInt[]; y: INT = TokenIO.ReadInt[]; val _ NIL END; originProperty: ATOM = $origin; interestRectProperty: ATOM = $interestRect; [] _ CDProperties.RegisterProperty[interestRectProperty]; CDProperties.InstallProcs[prop: interestRectProperty, new: CDProperties.PropertyProcsRec[ makeCopy: CDProperties.DontCopy, internalRead: InternalReadProperty, exclusive: TRUE ] ]; [] _ CDProperties.RegisterProperty[originProperty]; CDProperties.InstallProcs[prop: originProperty, new: CDProperties.PropertyProcsRec[ makeCopy: CDProperties.DontCopy, internalRead: InternalReadOrigin, exclusive: TRUE ] ]; [] _ CDProperties.RegisterProperty[$SetInterestProc]; END. ÒCDOldInterestRectsImpl.mesa Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Created by: Jacobi, September 13, 1984 3:21:36 pm PDT Last Edited: Jacobi, March 26, 1986 11:37:15 am PST Ê‹˜šœ™Jšœ Ïmœ7™BJ™5J™3—J˜šÏk œ˜ Jšžœ˜Jšœ ˜ Jšœ ˜ Jšœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ ˜ Jšœ ˜ J˜—šÏbœžœžœ˜&JšžœM˜TJšžœ˜—Jšž˜J˜Jš œžœžœžœ žœ˜9J˜šÏnœžœžœžœ ˜-Jšž˜šžœžœžœžœ˜6šžœBžœž˜Qšœžœžœ ˜Jšžœžœ˜4Jšœ/žœ˜4J˜—Jšžœžœ˜—J˜—Jšžœ˜—š  œžœžœžœžœ˜žœ˜YJšžœ˜—J˜š  œžœžœžœžœ˜:Jšž˜Jšœžœ˜Jšœžœ˜Jšœž˜ Jšžœ˜—J˜Jšœžœ ˜Jšœžœ˜+Jšœ9˜9šœ6˜6šœ#˜#Jšœ ˜ Jšœ#˜#Jšœ ž˜Jšœ˜—Jšœ˜—Jšœ3˜3šœ0˜0šœ#˜#Jšœ!˜!Jšœ!˜!Jšœ ž˜Jšœ˜—Jšœ˜—Jšœ5˜5Jšžœ˜J˜J˜—…— èE