<> <> <> DIRECTORY Atom USING [ PropList ], BasicTime USING [ Now, ToPupTime ], GList USING [ Append, Member, Remove ], IO, Jukebox USING [ bytesPerMS ], MessageWindow USING [ Append, Blink ], Process USING [ MsecToTicks, Pause ], Rope, TEditSelectionOpsEtc USING [ ShowGivenPositionRange ], TextEdit USING [ GetCharProp, PutCharProp, PutProp, Size ], TextNode USING [ LocNumber, Ref, StepForward ], TiogaAccess USING [ EndOf, FromViewer, Get, GetIndex, Reader, TiogaChar ], TiogaButtons USING [ TextNodeRef, TiogaOpsRef ], TiogaOps USING [ CallWithLocks, GetSelection, Location, LocRelative, NoSelection, Ref, SelectionGrain, SetSelection, ViewerDoc ], ViewerClasses USING [ Viewer ], ViewerOps USING [ FetchProp ], ViewRec USING [ ViewRef ], VoiceInText USING [ PlaySelection, thrushHandle ], VoiceRope USING [ Length, Stop, VoiceRopeInterval ] ; NarratedDocsImpl: CEDAR PROGRAM IMPORTS BasicTime, GList, IO, MessageWindow, Process, Rope, TEditSelectionOpsEtc, TextEdit, TextNode, TiogaAccess, TiogaButtons, TiogaOps, ViewerOps, ViewRec, VoiceInText, VoiceRope <> = { <> ScriptList: TYPE ~ LIST OF Script; Script: TYPE ~ REF ScriptBody; ScriptBody: TYPE ~ RECORD [ <> scriptDesc: Rope.ROPE _ NIL, <> scriptName: ScriptName _ "", numEntries: INT _ 0, firstEntry, lastEntry: ScriptEntry _ NIL, filename: Rope.ROPE ]; ScriptName: TYPE ~ Rope.ROPE; ScriptEntry: TYPE ~ REF ScriptEntryBody; <> ScriptEntryBody: TYPE ~ RECORD [ entryID: EntryID _ NIL, file: FileID _ NIL, next, prev: ScriptEntry _ NIL, pauseBefore: INT _ 0, -- in msec (is sec more reasonable?) pauseAfter: INT _ 0, -- ditto charIndex: INT _ -1, -- trust this only if document is not edited seqNum: INT _ -1 -- trust this only if document is not edited ]; ScriptExt: TYPE ~ REF ScriptExtBody; <> EntryID: TYPE ~ REF EntryIDBody; <> EntryIDBody: TYPE ~ RECORD [ sid: ScriptName _ "", eid: INT _ 0 ]; EntryIDList: TYPE ~ LIST OF EntryID; FileID: TYPE = RECORD [ name: Rope.ROPE _ "", createTime: BasicTime.GMT _ BasicTime.nullGMT ]; ScriptTool: TYPE = REF ScriptToolBody; ScriptToolBody: TYPE = RECORD [ scriptName: ScriptName _ "", playScript: PROC, stop: PROC, seqNum: INT _ 0, playEntry: PROC, findEntry: PROC, nextEntry: PROC, prevEntry: PROC, createScript: PROC, destroyScript: PROC, action: Rope.ROPE _ "", time: INT _ 0, addEntry: PROC, deleteEntry: PROC, listScripts: PROC, listEntries: PROC, extractScript: PROC, applyScript: PROC, msg: Rope.ROPE ]; <> scriptList: ScriptList _ NIL; <