DIRECTORY VoiceViewers USING [VoiceViewerInfo], VoiceRope USING [Handle], Rope USING [ROPE], MBQueue USING [Queue], Menus USING [MenuProc, MenuEntry], TiogaOpsDefs USING [Location], ViewerClasses USING [Viewer]; VoiceInText: CEDAR DEFINITIONS = BEGIN VoiceWindowRef: TYPE = REF VoiceWindowRec; VoiceWindowRec: TYPE = RECORD [ -- this record makes voice window properties volatile (i.e. they don't get preserved when the file containing them is saved/stored label: Rope.ROPE ]; thrushHandle: VoiceRope.Handle; voiceButtonQueue: MBQueue.Queue; DebugRope: PROC [Rope.ROPE]; ChangeMenu: PROC [viewer: ViewerClasses.Viewer, subMenu: Menus.MenuEntry]; ApplyToCharsInPrimarySelection: PROC [ActionProc: PROC [TiogaOpsDefs.Location]]; ApplyToLockedChars: PROC [ActionProc: PROC [TiogaOpsDefs.Location]]; StoreVoiceAtSelection: PROC [voiceViewerInfo: VoiceViewers.VoiceViewerInfo] RETURNS [succeeded: BOOLEAN]; PlaySelection: PROC; CancelProc: Menus.MenuProc; DeleteVoiceFromChar: PROC [position: TiogaOpsDefs.Location]; DeleteSourceMarker: PROC [viewer: ViewerClasses.Viewer, positionInParent: TiogaOpsDefs.Location, voiceViewerNumber: INT]; SaveRopeAtSourceMarker: PROC [viewer: ViewerClasses.Viewer, positionInParent: TiogaOpsDefs.Location, voiceViewerNumber: INT, voiceRopeID: Rope.ROPE, textInVoice: Rope.ROPE] RETURNS [succeeded: BOOLEAN]; END. €VoiceInText.mesa: interface to the routines which integrate voice into normal tioga documents Ades, September 22, 1986 2:20:11 pm PDT this procedure clauses the given submenu to toggle in and out of view for the given viewer. I lifted this code from TEditDocumentsImpl in Tioga - it really ought to be available to the public somewhere. Also it is bound into the Tioga idea that there are three possible sub-menus for any given viewer - "places", "levels" and one other supplied by the user. Using this code for viewers other than tioga viewers [as DictationOps does] is rather squalid a generally useful procedure: applies ActionProc to every character in the primary selection, locking the selection first as above but used where the selection is already locked place the supplied voice at the selection and make a source marker there find any voice within the current selection and play it back [if more than one talks bubble, from left to right] an appropriate procedure to put behind any STOP buttons for recording/playback of voice the specified viewer contains a source marker for the given voiceViewerNumber at the specified position: delete it try to save the contents of the voice viewer voiceViewerNumber [specified as the voiceRopeID] at the given viewer/node location: will fail if the viewer/node are not a valid combination or if the given location does not bear a source marker ΚΠ˜šœ™J™KJ™(J™—šΟk ˜ J˜%Jšœ œ ˜Jšœœœ˜Jšœœ ˜Jšœœ˜"Jšœ œ ˜šœœ ˜J˜——šΟn œœ œ˜&J˜—J˜*J˜˜’J˜—J˜J˜J˜J˜Jšœ ˜ J˜Jšž œœœ˜J˜Jšž œœ:˜JJ™[Jšœι™ιJ˜Jšžœœž œœ˜PJšœ&ž œI™yJ™Jšžœœž œœ˜DJ™7J˜Jšžœœ1œ œ˜iJ™IJ™Jšž œœ˜J™pJ˜Jšž œ˜J™WJ˜Jšžœœ$˜=J˜Jšžœœ\œ˜yšœr™rJ˜—Jšžœœ\œœœœ œ˜Κšœπ™πJ˜—Icodešœ˜—…—N ž