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: BOOL ← FALSE,
fileNameViewer: ViewerClasses.Viewer,
wdViewer: ViewerClasses.Viewer,
tiogaReadLabel: Labels.Label,
tiogaReadValue: BOOL ← TRUE,
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: BOOL ← FALSE, -- 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: BOOL ← FALSE,
responseNeeded: BOOL ← FALSE,
responseValue: BOOL ← FALSE,
responseSeen: BOOL ← FALSE,
responseMade: CONDITION,
typeScript: STREAM,
inUseByteCount: INT ← 0,
inUseRecordCount: INT ← 0,
inUseOp: ROPE ← NIL,
tapeHandle: TapeOps.TapeHandle,
fileNumber: CARDINAL ← 0,
atEndOfTape: BOOL ← FALSE,
open: BOOL ← FALSE,
AbortNow: BOOL ← FALSE
];
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: BOOL ← FALSE,
defaultServer: ROPE
];
Queue: TYPE ~ REF QueueObj;
QueueObj: TYPE;
Action:
TYPE ~
RECORD
[
op: TapeToolOp,
opConversions: ROPE ← NIL,
opBlockingRope: ROPE ← NIL,
oplreclRope: ROPE ← NIL,
opRope: ROPE ← NIL,
opFiles: ROPE ← NIL,
opWDir: ROPE ← NIL,
localOp: BOOL ← FALSE,
tiogaRead: BOOL ← TRUE,
padBlock: TapeStreams.FillBlockOptions ← blanks,
serverName: ROPE ← NIL,
driveNumberRope: ROPE ← NIL,
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: BOOL ← FALSE] 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 ROPE ← NIL];
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.