CDDefaultProcs.mesa (part of ChipNDale)
Copyright © 1985, 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, May 22, 1985 3:35:49 pm PDT
Last edited by: Christian Jacobi, January 6, 1987 11:48:33 am PST
DIRECTORY
CD, Rope, TokenIO;
CDDefaultProcs: CEDAR DEFINITIONS =
BEGIN
Handy procedures for class implementors
--ObjectClass
QuickDrawMe: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
DrawMe: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
ShowMeSelected: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
ShowMeSelectedWithExpand: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
HitInside: PROC [ob: CD.Object, hitRect: CD.Rect] RETURNS [BOOL];
InterestRect: PROC [ob: CD.Object] RETURNS [CD.Rect];
InterestRectWithExpand: PROC [ob: CD.Object] RETURNS [CD.Rect];
BadInternalRead: PROC [h: TokenIO.Handle, key: ATOM] RETURNS [CD.Object];
Describe: PROC [ob: CD.Object, readOnlyInstProps: CD.PropList←NIL, verbosity: NAT𡤀] RETURNS [Rope.ROPE];
--DrawProcs
DrawChild: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
IgnoreChild: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
DrawChildSel: PROC [pr: CD.DrawRef, ob: CD.Object, trans: CD.Transformation←[], readOnlyInstProps: CD.PropList←NIL];
DrawRect: PROC [pr: CD.DrawRef, r: CD.Rect, l: CD.Layer];
IgnoreRect: PROC [pr: CD.DrawRef, r: CD.Rect, l: CD.Layer];
ContextOutLine: PROC [pr: CD.DrawRef, r: CD.Rect, l: CD.Layer];
DrawComment: PROC [pr: CD.DrawRef, r: CD.Rect, comment: Rope.ROPE];
DrawContext: PROC [pr: CD.DrawRef, proc: CD.DrawContextLayerProc, ob: CD.Object, trans: CD.Transformation, layer: CD.Layer];
IgnoreGround: PROC [pr: CD.DrawRef, pushedOut: BOOL];
IgnorePriority: PROC [pr: CD.DrawRef];
--Fancy DrawProcs
ConvertContextsToDeviceRects: PROC [pr: CD.DrawRef, dDrawRect: CD.DrawRectProc, dOrigin: CD.Position←[0, 0], scale: REAL𡤁];
--Overwrites DrawContext with a procedure scan converting in device coordinates
--pr: device description... must not have a deviceContext
--dDrawRect: call back procedure returns rectangles in [only partly clipped] device space
--dOrigin: origin for device in cd coordinates: the point at dOrigin will be translated
-- to [0, 0] in device coordinates
--scale: device number ← cd number * scale
END.