<> <> <> DIRECTORY Atom USING [ PropList ], BasicTime USING [ GMT, Now, nullGMT, ToPupTime ], GList USING [ Append, Member, Remove ], IO, Jukebox USING [ bytesPerMS ], MessageWindow USING [ Append, Blink ], Process USING [ MsecToTicks, Pause ], Rope, TEditSelectionOps 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, CommandProc, GetSelection, Location, LocOffset, LocRelative, NoSelection, Ref, RegisterCommand, SelectionGrain, SetSelection, ViewerDoc ], ViewerClasses USING [ Viewer ], ViewerOps USING [ FetchProp ], ViewRec USING [ ViewRef ], TiogaVoicePrivate USING [ PlaySelection, thrushHandle ], VoiceRope USING [ Length, Stop, VoiceRopeInterval ] ; NarratedDocsImpl: CEDAR PROGRAM IMPORTS BasicTime, GList, IO, MessageWindow, Process, Rope, TEditSelectionOps, TextEdit, TextNode, TiogaAccess, TiogaButtons, TiogaOps, ViewerOps, ViewRec, TiogaVoicePrivate, VoiceRope <> = { <> ScriptList: TYPE ~ LIST OF Script; Script: TYPE ~ REF ScriptBody; ScriptBody: TYPE ~ RECORD [ <> sid: ScriptID _ 0, sDesc: ScriptDesc _ "", <> sCreator: ScriptCreator _ "", numEntries: INT _ 0, firstEntry, lastEntry: ScriptEntry _ NIL, file: FileID ]; ScriptID: TYPE = CARD; ScriptDesc: TYPE ~ Rope.ROPE; ScriptCreator: TYPE ~ Rope.ROPE; ScriptEntry: TYPE ~ REF ScriptEntryBody; <> ScriptEntryBody: TYPE ~ RECORD [ entryID: EntryID _ NIL, file: FileID, next, prev: ScriptEntry _ NIL, pauseBefore: INT _ 0, -- in msec (is sec more reasonable?) pauseAfter: INT _ 0, -- ditto action: Rope.ROPE _ "", charIndex: INT _ -1, <> seqNum: INT _ -1 -- trust this only if document is not edited ]; EntryID: TYPE ~ REF EntryIDBody; <> EntryIDBody: TYPE ~ RECORD [ sid: ScriptID _ 0, 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 [ scriptID: ScriptID _ 0, seqNum: INT _ 0, action: Rope.ROPE _ "", addEntries: PROC, deleteEntries: PROC, findEntry: PROC, nextEntry: PROC, prevEntry: PROC, playEntry: PROC, playScript: PROC, stop: PROC, newScript: PROC, listScripts: PROC, msg: Rope.ROPE ]; <> scriptList: ScriptList _ NIL; <