CDSetDisplayTresholdsImpl.mesa (a ChipNDale module)
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created by Christian October 28, 1986 10:47:15 am PST
Last edited by: Christian Jacobi, October 28, 1986 2:10:26 pm PST
DIRECTORY
CD,
CDBottomUp,
CDCells,
CDCommandOps,
CDCommandOpsExtras2,
CDSequencer,
TerminalIO;
CDSetDisplayTresholdsImpl: CEDAR PROGRAM
IMPORTS CDBottomUp, CDCells, CDCommandOps, CDCommandOpsExtras2, TerminalIO =
BEGIN
SetTreshold: PUBLIC PROC [design: CD.Design, root: CD.Object] = {
[] ← CDBottomUp.StartRecurse[setTresholdClass, design, root];
};
DoSetTreshold: CDBottomUp.DoProc = {
IF CDCells.IsCell[ob] THEN
CDCells.SetSimplificationTreshhold[ob, -1];
};
ResetDisplayTresholdsComm: PROC [comm: CDSequencer.Command] = {
inst: CD.Instance ← CDCommandOps.TheInstance[comm, "recompute display treshold hierarchycally\n"];
IF inst#NIL THEN {
SetTreshold[comm.design, inst.ob];
TerminalIO.WriteRope["--done\n"]
}
};
setTresholdClass: CDBottomUp.Class ← CDBottomUp.Register[DoSetTreshold, NIL, $CDSetDisplayTresholds, $CDSetDisplayTresholds];
--use the CDBottomUp mechanism because we want to deal every object just once but
--some silly user didn't include the objects in the directory.
CDCommandOpsExtras2.RegisterWithMenu[menu: $ProgramMenu, entry: "reset display tresholds", proc: ResetDisplayTresholdsComm, key: $CDSetDisplayTresholds];
END.