TapeToolInternal.mesa
Last edited by Tim Diebert: April 29, 1985 9:07:13 am PDT
Copyright © 1984 by Xerox Corp. All rights reserved.
Last Edited by: McCreight, February 25, 1985 5:09:57 pm PST
DIRECTORY
Buttons USING [Button],
Containers USING [Container],
IdleExtras USING [IdleRegistration],
IO USING [STREAM],
Labels USING [Label],
Rope USING [ROPE],
TapeOps USING [Density, DriveNumber, TapeHandle],
TapeStreams USING [FillBlockOptions],
UserProfile USING [ProfileChangedProc],
VFonts USING [Font],
ViewerClasses USING [Viewer],
ViewerEvents USING [EventRegistration];
TapeToolInternal: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
Types
TapeTool: TYPE ~ REF TapeToolRecord;
TapeToolRecord: TYPE ~ MONITORED RECORD
[
outer: Containers.Container ← NIL,
destroyEvent: ViewerEvents.EventRegistration ← NIL,
closeEvent: ViewerEvents.EventRegistration ← NIL,
idleEvent: IdleExtras.IdleRegistration ← NIL,
params: Parameters,
height: INT ← 0,
serverNameViewer: ViewerClasses.Viewer,
serverName: ROPE,
driveNumberViewer: ViewerClasses.Viewer,
driveNumber: TapeOps.DriveNumber ← 0,
densityLabel: Labels.Label,
density: TapeOps.Density ← PE1600,
opsQueue: Queue ← NIL,
ops: Containers.Container,
OpenButton: Buttons.Button,
CloseButton: Buttons.Button,
RewindButton: Buttons.Button,
UnloadButton: Buttons.Button,
Statusbutton: Buttons.Button,
ReadButton: Buttons.Button,
WriteButton: Buttons.Button,
FSF: Buttons.Button,
BSF: Buttons.Button,
statusLabel: Labels.Label,
recordCountLabel: Labels.Label,
active: BOOLFALSE,
fileNameViewer: ViewerClasses.Viewer,
wdViewer: ViewerClasses.Viewer,
tiogaReadLabel: Labels.Label,
tiogaReadValue: BOOLTRUE,
blockingViewer: ViewerClasses.Viewer,
hlreclContainer: Containers.Container,
lreclContainer: Containers.Container,
lreclViewer: ViewerClasses.Viewer,
lreclX, lreclY: INT,
conversionsViewer: ViewerClasses.Viewer,
fillBlockLabel: Labels.Label,
fillBlock: TapeStreams.FillBlockOptions ← blanks,
interaction: Containers.Container ← NIL,
question: ViewerClasses.Viewer ← NIL,
autoConfirmButton: Buttons.Button ← NIL,
autoConfirm: BOOLFALSE, -- if TRUE, suppress button interactions
promptX, promptY: INT,
prompt: Containers.Container ← NIL,
prompter: ViewerClasses.Viewer ← NIL,
prompterSeq: PrompterSeq ← PrompterSeq.FIRST,
yesButton: Buttons.Button,
noButton: Buttons.Button,
abortRequested: BOOLFALSE,
responseNeeded: BOOL ← FALSE,
responseValue: BOOLFALSE,
responseSeen: BOOLFALSE,
responseMade: CONDITION,
typeScript: STREAM,
inUseByteCount: INT ← 0,
inUseRecordCount: INT ← 0,
inUseOp: ROPENIL,
tapeHandle: TapeOps.TapeHandle,
fileNumber: CARDINAL ← 0,
atEndOfTape: BOOLFALSE,
open: BOOLFALSE,
AbortNow: BOOLFALSE
];
PrompterSeq: TYPE = NAT[0..8);
Parameters: TYPE ~ REF ToolParameters;
ToolParameters: TYPE ~ RECORD [
font: VFonts.Font,
fixedFont: VFonts.Font,
entryHeight: NAT,
entryVSpace: NAT,
entryHSpace: NAT,
fileNamePrefixes: LIST OF ROPE,
localDisk: BOOL ← FALSE,
new: BOOLFALSE,
defaultServer: ROPE
];
Queue: TYPE ~ REF QueueObj;
QueueObj: TYPE;
Action: TYPE ~ RECORD
[
op: TapeToolOp,
opConversions: ROPENIL,
opBlockingRope: ROPE ← NIL,
oplreclRope: ROPE ← NIL,
opRope: ROPE ← NIL,
opFiles: ROPE ← NIL,
opWDir: ROPENIL,
localOp: BOOLFALSE,
tiogaRead: BOOLTRUE,
padBlock: TapeStreams.FillBlockOptions ← blanks,
serverName: ROPENIL,
driveNumberRope: ROPENIL,
density: TapeOps.Density ← PE1600
];
offScreenY: INT ~ -9999;
TapeToolOp: TYPE ~ {Open, Close, Rewind, Unload, Status, Read, Write, FSF, BSF};
-- Procedures from TapeToolInterfaceImpl
EnableQuestion: PROC [tool: TapeTool];
DisableQuestion: PROC [tool: TapeTool];
ShowLReclViewer: PROC [tool: TapeTool];
RemoveLReclViewer: PROC [tool: TapeTool];
WaitForResponse: PROC
[tool: TapeTool, ignoreAutoConfirm: BOOLFALSE] RETURNS [value: BOOL];
-- Procedures from TapeToolInterfaceImplA
BuildOperations: PROC [tool: TapeTool];
-- Procedures from TapeToolQueueImpl
Create: PROC [tool: TapeTool] RETURNS [Queue];
Enqueue: PROC [tool: TapeTool, q: Queue, a: Action];
Flush: PROC [q: Queue];
-- Procedures from TapeToolUtilitiesImpl
ViewerToRopeList: PROC [viewer: ViewerClasses.Viewer] RETURNS [list: LIST OF ROPENIL];
GetToolParameters: PROC RETURNS [Parameters];
ResetNewParameters: PROC;
ReactToProfile: UserProfile.ProfileChangedProc;
RegisterProfile: PROC [tool: TapeTool];
UnregisterProfile: PROC [tool: TapeTool];
RegisterIdle: PROC [tool: TapeTool];
UnRegisterIdle: PROC [tool: TapeTool];
IdleCheck: PROC [tool: TapeTool] RETURNS [idle: BOOL];
-- Procedures from TapeToolOpsImpl
ExecuteOp: PROC [tool: TapeTool, op: Action];
END.