NarratedDocs.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Polle Zellweger (PTZ) August 24, 1986 6:33:25 pm PDT
DIRECTORY
MBQueue USING [ Queue ],
Rope USING [ ROPE ],
;
NarratedDocs: CEDAR DEFINITIONS = {
Types
ScriptList: TYPE ~ LIST OF Script;
Script: TYPE ~ REF ScriptBody;
ScriptBody: TYPE ~ RECORD [
do we record a filename and/or viewer here, or do we require the user to click in the scripted viewer to give us a pointer?
scriptDesc: Rope.ROPE ← NIL,
may be good to have entry descs too, so user can figure out what is going on. But would these be voice rope descs & uniquefied for multiple copies in a single script, or would they be an entry desc? Note that the same voice rope can be attached to different places in the same document and appear in a script at each location, which is of course different than the same annotation appearing multiple times in a script. So an entry is described by (script, seqNum, docLoc, voiceRope). voiceRope can be determined from docLoc, but is not VISIBLE from it. Navigating in a Complex Invisible Space.
scriptID: INT ← 0,
numEntries: INT ← 0,
firstEntry, lastEntry: ScriptEntry ← NIL
];
ScriptEntry: TYPE ~ REF ScriptEntryBody;
ScriptEntryBody: TYPE ~ RECORD [
entryID: EntryID ← NIL,
filename, for multi-document scripts,
next, prev: ScriptEntry ← NIL
];
EntryID: TYPE ~ REF EntryIDBody;
EntryIDBody: TYPE ~ RECORD [
script: INT ← 0,
entry: INT ← 0
];
ScriptTool: TYPE = REF ScriptToolBody;
ScriptToolBody: TYPE = RECORD [
scriptID: INT ← 0,
seqNum: INT ← 0,
addEntries: PROC,
deleteEntries: PROC,
findEntry: PROC,
playEntry: PROC,
play: PROC,
newScript: PROC,
msg: Rope.ROPE
];
Script Creation
AddSelectedAnnotations: PROC [viewerPos: Viewer.position, script: Script, seqNum: INT] RETURNS [success];
DeleteSelectedAnnotations: PROC [viewerPos: Viewer.position, script: Script, seqNum: INT] RETURNS [success];
GetSeqNumsOfFirstAnnotation: PROC [viewerPos: Viewer.position] RETURNS [script: Script, seqNumList: INT];
For a given script? For all scripts (eg if user enters * in tool??) ? For all annotations in selection? For lists, report in SeqNum field or in feedback area? This sort of situation makes a script specification that is editable and reingestable seem much nicer. Or a ShowSeqNumbers mode.
FindSeqNum: PROC [script: Script, seqNum: INT] RETURNS [viewerPos: Viewer.position];
DeleteScript: PROC [script: Script] RETURNS [succeeded ← FALSE];
NewScript: PROC RETURNS [script: Script];
Script Playback
PlayScript: PROC;
}.
Polle Zellweger (PTZ) August 21, 1986 4:26:01 pm PDT
changes to: DIRECTORY, NarratedDocs, Script, ScriptBody, ScriptEntry, ScriptEntryBody, AddSelectedAnnotations, DeleteSelectedAnnotations, GetSequenceNumbersOfFirstAnnotation
Polle Zellweger (PTZ) August 22, 1986 0:08:28 am PDT
changes to: FindSeqNum, DeleteScript, NewScript, PlayScript, ScriptBody
Polle Zellweger (PTZ) August 22, 1986 4:17:21 pm PDT
changes to: ScriptBody, ScriptEntryBody, EntryID
Polle Zellweger (PTZ) August 23, 1986 5:37:59 pm PDT
changes to: ScriptList, Script, ScriptBody, ScriptEntry, ScriptEntryBody, EntryID, ScriptToolBody
Polle Zellweger (PTZ) August 24, 1986 6:33:25 pm PDT
changes to: ScriptToolBody, ScriptEntryBody, EntryID, EntryIDBody