CDOps.mesa (part of Chipndale)
Copyright © 1983, 1984 by Xerox Corporation. All rights reserved.
by Christian Jacobi, February 24, 1984 2:03 pm
last edited by Christian Jacobi, February 24, 1984 2:03 pm
DIRECTORY
CD,
Rope USING [ROPE];
CDOps: CEDAR DEFINITIONS =
BEGIN
CreateDesign: PROC [technology: CD.Technology] RETURNS [design: CD.Design];
--does not open a viewer
ResetDesign: PROC [design: CD.Design];
IncludeApplication: PROC [design: CD.Design, aptr: CD.ApplicationPtr, draw: BOOLTRUE];
IncludeApplicationList: PROC [design: CD.Design, al: CD.ApplicationList, draw: BOOLTRUE];
RemoveApplication: PROC [design: CD.Design, aptr: CD.ApplicationPtr, draw: BOOLTRUE];
ReOrderApplication: PROC [design: CD.Design, aptr: CD.ApplicationPtr];
AddAnObject: PROC[design: CD.Design, ob: CD.ObPtr,
location: CD.DesignPosition, orientation: CD.Orientation←CD.original];
--conveniant procedure; sets selection according to internal mode
QuickDrawDesign: PROC [design: CD.Design, pr: CD.DrawRef];
--inclusive selection
DrawDesign: PROC [design: CD.Design, pr: CD.DrawRef];
--ommit selection
Redraw: PROC [design: CD.Design, r: CD.DesignRect𡤊ll, eraseFirst: BOOLTRUE];
DelayedRedraw: PROC [design: CD.Design, r: CD.DesignRect𡤊ll, eraseFirst: BOOLTRUE];
--efficiency hint: if a lot of small rectangles need to be redrawn, it can be more efficiant
--  to call a redraw of a big rectangle first.
DoTheDelayedRedraws: PROC [design: CD.Design];
--does the DelayedRedraw'swhich have not yet been done
all: PRIVATE CD.Rect = [FIRST[CD.Number], FIRST[CD.Number], LAST[CD.Number], LAST[CD.Number]];
SetAppList: PROC [design: CD.Design, appList: CD.ApplicationList ← NIL] =
INLINE {design^.actual.first.specific.contents ← appList};
AppList: PROC [design: CD.Design] RETURNS [CD.ApplicationList] =
INLINE {RETURN[design^.actual.first.specific.contents]};
PointedApplication: PROC [design: CD.Design, pos: CD.DesignPosition]
RETURNS [CD.ApplicationPtr];
SelectedApplication: PROC [design: CD.Design]
RETURNS [first: CD.ApplicationPtr, multiple: BOOL];
--first: returns ref to any selected application if there is one or more, otherwise nil.
--multiple: more than one application is selected
Info: PROC[ob: CD.ObPtr] RETURNS [Rope.ROPE];
LayerName: PROC[lev: CD.Layer] RETURNS [Rope.ROPE];
END.
--Remark
--All procedures do not queue; proper synchronization by the caller is assumed.