CDMenuCommands.mesa (part of Chipndale)
by Christian Jacobi July 11, 1983 3:42 pm
last edited Christian Jacobi February 14, 1984 4:05 pm
DIRECTORY
CD,
CDSequencer,
TerminalIO;
CDMenuCommands: CEDAR PROGRAM
IMPORTS CDSequencer, TerminalIO =
BEGIN
ViewerMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
n: INT;
n ← TerminalIO.RequestSelection[
label: "Viewer options",
choice: LIST["split", "grid", "ticks", "view all", "view selected", "view top lev", "drawmode", "simplification"]
];
SELECT n FROM
1 => Forward[$SplitViewer];
2 => Forward[$GridInfo];
3 => Forward[$TicksInfo];
4 => Forward[$ResetScaleAll];
5 => Forward[$ResetScaleSel];
6 => Forward[$ResetScaleTop];
7 => Forward[$DrawMode];
8 => Forward[$SetSimplification];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
DesignMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Global menu",
choice: LIST["IO", "viewer", "directory", "cell", "programs", " rename des", " un-delete", " select all", " statistic"]
] FROM
1 => Forward[$IOMenu];
2 => Forward[$ViewerMenu];
3 => Forward[$DirectoryMenu];
4 => Forward[$CellMenu];
5 => Forward[$ProgramMenu];
6 => Forward[$RenameDesign];
7 => Forward[$Undel];
8 => Forward[$SelectAll];
9 => Forward[$Statistic];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
CellMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Cell (s)",
choice: LIST["create", "expand", "push in", "pop out", "put down", "put down imported", "simplification", "transform to", " DIRECTORY"]
] FROM
1 => Forward[$CreateCellSAndName];
2 => Forward[$ExpandS];
3 => Forward[$PushS];
4 => Forward[$PopMenu];
5 => Forward[$DrawCell];
6 => Forward[$DrawImportedCell];
7 => Forward[$CellSimplification];
8 => Forward[$TransformToCellS];
9 => Forward[$DirectoryMenu];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
DirectoryMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Directory options",
choice: LIST["list direcory", "clean up directory", "remove ob", "rename selected ob", "list imports", "list importee's ob", " CELLS"]
] FROM
1 => Forward[$DisplayCellNames];
2 => Forward[$DeleteUnUsedObjects];
3 => Forward[$RemoveCell];
4 => Forward[$RenameS];
5 => Forward[$DisplayImports];
6 => Forward[$DisplayImportedEntries];
7 => Forward[$CellMenu]
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
IOMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Input / Output",
choice: LIST["output", "import", "include", "reload conditions", "chipmonk-output", " list imports", " directory"]
] FROM
1 => Forward[$OutputDesign];
2 => Forward[$ImportADesign];
3 => Forward[$IncludeADesign];
4 => Forward[$CheckConditions];
5 => Forward[$ChipmonkOutput];
6 => Forward[$DisplayImports];
7 => Forward[$DirectoryMenu];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
ProgramMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Additional Programs",
choice: LIST[
"CIF output", "Flat CIF output",
"DRC", "DRC & Extract Thyme", "DRC & Extract Rose",
"Route", "Place", "Cell route/place"
]
] FROM
1 => Forward[$WriteCif];
2 => Forward[$FlatCif];
3 => Forward[$SpinifexS];
4 => Forward[$SpinifexThymeS];
5 => Forward[$SpinifexRoseS];
6 => Forward[$Route];
7 => Forward[$Place];
8 => Forward[$CellRoutePlace];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
RectProgramMenu: PROC [comm: CDSequencer.Command] =
BEGIN
ENABLE TerminalIO.UserAbort => GOTO userAbort;
Forward: PROC [a: ATOM] = {
CDSequencer.ExecuteCommand[comm: comm, as: a];
};
SELECT TerminalIO.RequestSelection[
label: "Programs on Rects",
choice: LIST["Color Plot", "B&W Plot"]
] FROM
1 => Forward[$VersatecColorPlot];
2 => Forward[$VersatecBWPlot];
ENDCASE => TerminalIO.WriteRope["skipped\n"];
EXITS
userAbort => {TerminalIO.WriteRope["discarded\n"]}
END;
CDSequencer.ImplementCommand[$RectProgramMenu, RectProgramMenu,, doQueue];
CDSequencer.ImplementCommand[$ProgramMenu, ProgramMenu,, doQueue];
CDSequencer.ImplementCommand[$CellMenu, CellMenu,, doQueue];
--old--CDSequencer.ImplementCommand[$DesignMenu, DesignMenu,, doQueue];
CDSequencer.ImplementCommand[$GlobalMenu, DesignMenu,, doQueue];
CDSequencer.ImplementCommand[$IOMenu, IOMenu,, doQueue];
CDSequencer.ImplementCommand[$DirectoryMenu, DirectoryMenu,, doQueue];
CDSequencer.ImplementCommand[$ViewerMenu, ViewerMenu,, doQueue];
END.