-- third definitions module for silicon (pretty picture) program
-- last modified by McCreight, December 3, 1982  3:02 PM
-- created by Petit, September 18, 1981  2:40 PM

DIRECTORY
  SegmentDefs,
  multiGraphicsDefs,
  ppdefs,
  StreamDefs;
ppdddefs: DEFINITIONS IMPORTS ppdefs, SegmentDefs, multiGraphicsDefs, StreamDefs =
  BEGIN OPEN ppdefs, multiGraphicsDefs, StreamDefs;

  -- **** exports from pppush:

  FindNamedCell: PROC [s: STRING] RETURNS[cp: cListPtr];
  -- If s is the name of a named cell on cellList,  cp
  -- is the entry for that cell.  Otherwise cp is NIL.

  doPop, pushName, pushSel, pushPnt: cmdProc;

  AdjustCallersBBoxes: PROC [ob: obPtr];
    -- Find all callers of ob and adjust their bounding boxes and call positions
    -- as necessary.  Changes propagate recursively.
  BBoxHasChanged: PROC [ob: obPtr] RETURNS [BOOLEAN];
    -- Recompute the bounding box of an object from its first-level sub-objects.
    -- If it has changed, adjust the positions of all calls on this object.
  cellShift: PROC [lp: listPtr, ix, iy, ax, ay: locNum];


  -- **** exports from ppprocs6:

  noChange: BOOLEAN;
  cChange, bChange, doingAreaSel: BOOLEAN;
  didBW: BOOLEAN;

  doMove: cmdProc;
  movUp: cmdProc;
  movDn: cmdProc;
  movLft: cmdProc;
  movRgt: cmdProc;
  dispErf: cmdProc;
  rotSel: cmdProc;
  rotPnt: cmdProc;
  mirrorSel: cmdProc;
  mirrorPnt: cmdProc;
  setCols: cmdProc;
  doCopy: cmdProc;

  putProp: PROCEDURE [lp: listPtr, pop: propPtr];
  getTextProp: PROCEDURE [lp: listPtr]
    RETURNS [LONG POINTER TO text prop];


  -- ***** exports from ppfeed:

  mode: Mode;
  createSel,Stretchy: BOOLEAN;
  wiringLevel: level;
  wiringOrn: orientation;
  favLev: level;
  levMask: CARDINAL;
  lambdaGrid, tickGrid: CARDINAL;
  basicOrientation: orientation;
  locCell: STRING;
  locIName: STRING;
  insideCell: STRING;
  selCount: CARDINAL;
  pCifScale: INTEGER;
  totLp, dneLp: CARDINAL;
rectangleMode:BOOLEAN;
rectLev: level;
  tickOff:INTEGER;

  displayParameters: PROCEDURE;
  doRfeed: PROCEDURE RETURNS [BOOLEAN, BOOLEAN];
  doYfeed: PROCEDURE RETURNS [BOOLEAN, BOOLEAN];
  doBfeed: PROCEDURE RETURNS [BOOLEAN, BOOLEAN];

  setBWoffset: PROCEDURE [x, y: INTEGER];
  setCoffset: PROCEDURE [x, y: INTEGER];
  setBWscale: PROCEDURE [qq: INTEGER];
  setCscale: PROCEDURE [qq: INTEGER];
  doParmInit: PROCEDURE;


  --****** exports from ppccur:

  wiring, boxing: BOOLEAN;

  initCcurse: PROCEDURE [size: CARDINAL, cp: POINTER TO Bitmap];
  gonnaDoCrect: PROCEDURE [x1, y1, x2, y2: INTEGER];
  doneCrect: PROCEDURE;
  drawColorCurs: PROCEDURE [x, y: INTEGER];
  undrawColorCurs: PROCEDURE;
  doTemps: PROCEDURE;
  setupTempWires: PROCEDURE [
    p: Point, o: orientation, col:level, wid,cornerOffset:INTEGER,
    bigChange: BOOLEAN];
  setupBox: PROCEDURE [p: Point, bigChange: BOOLEAN];
  setupTempBus: PROCEDURE [
    p: Point, o: orientation, col:level, wid,cornerOffset:INTEGER,
    bigChange: BOOLEAN, strtOffx,strtOffy,cornerOff,count:INTEGER] ;

  --**** from ppprocs:

  makePullup: PROCEDURE [w,l:INTEGER,wExt:INTEGER←wXExtension,lExt:INTEGER←lXExtension] RETURNS [p: obPtr];
  makeXstr: PROCEDURE [w, l: INTEGER, imp: BOOLEAN ← FALSE,
    wExt: INTEGER ← wXExtension, lExt: INTEGER ← lXExtension]
    RETURNS [p: obPtr];
  makeAngleXstr: PROCEDURE [w, l: INTEGER, imp: BOOLEAN ← FALSE
    , wExt: INTEGER ← wXExtension, lExt:INTEGER ← lXExtension,aExt:INTEGER←0]
    RETURNS [p: obPtr] ;
  makePXstr: PROCEDURE [w, l: INTEGER, imp: BOOLEAN ← FALSE
    , wExt: INTEGER ← wXExtension, lExt: INTEGER ← lXExtension,surr:INTEGER←wellSurround]
    RETURNS [p: obPtr];
  makeRect: PROCEDURE [x, y: INTEGER, l: level]
    RETURNS [p: obPtr];
  makeText: PROCEDURE [s: STRING] RETURNS [p: obPtr];
  makeCnText: PROCEDURE [
    s: STRING, xw, byw, yw: INTEGER, op: cellPtr,
    np: cListPtr] RETURNS [p: obPtr];
  makeButcon: PROCEDURE RETURNS [p: obPtr];
  makePolycon: PROCEDURE [lll: INTEGER] RETURNS [p: obPtr];
  makeDifcon: PROCEDURE [lll: INTEGER] RETURNS [p: obPtr];
  makeMmDifcon: PROCEDURE [lll: INTEGER] RETURNS [p: obPtr];
  makeMmPolcon: PROCEDURE [lll: INTEGER] RETURNS [p: obPtr];
  makeNwellcon: PROCEDURE [lll: INTEGER] RETURNS [p: obPtr];
  makePDifcon: PROCEDURE [lll: INTEGER,surr:INTEGER←wellSurround] RETURNS [p: obPtr];
  makeMPDifcon: PROCEDURE [lll: INTEGER,surr:INTEGER←wellSurround] RETURNS [p: obPtr];
  makeBuCont: PROCEDURE [wid,len,wex,lex: INTEGER]
    RETURNS [p: obPtr];
  makeMmCont: PROCEDURE [len,wex,lex: INTEGER]
    RETURNS [p: obPtr];
  makeWire: PROCEDURE [len, wid: INTEGER, l: level,surr:INTEGER←wellSurround]
    RETURNS [p: obPtr];
  makeBus: PROCEDURE [len, wid: INTEGER, l: level, cnt, spc, tinc, binc: INTEGER]
    RETURNS [p: obPtr];
  makeRep: PROCEDURE [ob:obPtr,winc,linc,dx,dy,cnt:INTEGER,
	idx:orientationIndex] RETURNS [p: obPtr];
  makeCell: PROCEDURE [sx, sy: INTEGER, cnt: CARDINAL, ptr: listPtr]
    RETURNS [p: cellPtr];
  makeList: PROCEDURE [
    p: obPtr, x, y: INTEGER, o: orientation, refl: reflection]
    RETURNS [lp: listPtr];


  END.