CreateCmdStreams:
PUBLIC
PROC [name: Rope.
ROPE]
RETURNS [in, out, err:
IO.
STREAM] ~ {
[in, out] ← ViewerIO.CreateViewerStreams[name: IF name=NIL THEN "Puff Console" ELSE name];
in ← IO.CreateStream[translateStreamProcs, in, in];
err ← out;
};
BreakSparc:
PROC [parent:
REF
ANY, clientData:
REF
ANY, mouseButton: Menus.MouseButton, shift, control:
BOOL] ~ {
viewer: Viewer ~ NARROW[parent];
SoftcardMonitor.Break[]
};
CreateTool:
PUBLIC
PROC[name: Rope.
ROPE ←
NIL] ~ {
Description of the procedure.
breakEntry: Menus.MenuEntry ← Menus.CreateEntry[
name: "BREAK!",
proc: BreakSparc,
clientData: NIL,
documentation: "Interrupts the Sparc",
guarded: FALSE
];
v: ViewerClasses.Viewer;
in, out: IO.STREAM;
[in, out] ← ViewerIO.CreateViewerStreams[name: IF name=NIL THEN "Puff Console" ELSE name];
in ← IO.CreateStream[translateStreamProcs, in, in];
SoftcardFSAccess.RegisterConsoleStreams[in, out, out];
v ← ViewerIO.GetViewerFromStream[out];
Menus.AppendMenuEntry[menu: v.menu, entry: breakEntry];
};