DIRECTORY Rope USING [ROPE], TEditDocument USING [SelectionId], TiogaOpsDefs USING [WhichSelection], ViewerClasses USING [Viewer], VoiceViewers USING [Selection, SoundInterval]; VoiceEditOps: CEDAR DEFINITIONS = BEGIN Mumble: PROC [opAttempted: Rope.ROPE, viewerTypes: Rope.ROPE]; DescribeSelection: PROC [which: TiogaOpsDefs.WhichSelection, forceDelete: BOOLEAN, returnSoundInterval: BOOLEAN, viewerAlreadyLocked: ViewerClasses.Viewer _ NIL] RETURNS [failed: BOOLEAN, selection: VoiceViewers.Selection, soundInterval: VoiceViewers.SoundInterval _ NIL]; ReplaceSelectionWithSavedInterval: PROC [selection: VoiceViewers.Selection, soundInterval: VoiceViewers.SoundInterval, leaveSelected: BOOLEAN] RETURNS [viewerDeleted: BOOLEAN, insertChars, positionAfterInsert: INT]; Delete: PROC; Copy: PROC [target: TEditDocument.SelectionId _ primary]; Transpose: PROC [target: TEditDocument.SelectionId _ primary]; END. θVoiceEditOps.mesa: interface to the editing primitives supported [and intercepted for rejection] for voice viewers Ades, April 28, 1986 5:47:16 pm PDT called when an edit op is attempted on a combination of viewer types for which it is invalid this routine will characterise the voice corresponding to a selection: if the selection is pendingDelete [or if forceDelete] then the selection.ropeInterval will have non-zero length; if returnSoundInterval then the sound interval corresponding to the whole selection will be characterised - to be saved and inserted somewhere else selections can only be described if the voiceLock can be taken out on them: this routine returns failed if it cannot get the lock; otherwise it returns with the lock still held. However the caller may pass a viewer in viewerAlreadyLocked to say that he already has that one locked and if this selection is in the same viewer then we may proceed this routine actually does all the editing work for voice: it is passed a selection specification and a sound specification: if the selection is of non-zero length it is deleted; then if the sound is non-nil it is inserted. If the result of the call is that the contents of the viewer become NIL, then the viewer is deleted selection.voiceViewerInfo will be updated to contain the new rope; selection.ropeInterval is only used for its start and length fields if leaveSelected THEN primary selection will be a point at the cut point [soundInterval = NIL] or select the inserted interval; otherwise the primary selection will disappear. The secondary selection always disappears deletes the primary selection copies the contents of the other selection to the target selection transposes the contents of the primary and secondary selections Κ[˜šœ™™`Jšœ#™#J˜——šΟk ˜ Jšœœœ˜Jšœœ˜"Jšœ œ˜$J˜Jšœ œ˜.J˜—šΟn œœ œ˜'J˜—Jšžœœœœ˜>™\J˜—Jšžœœ3œœ3œ œQœ˜JšœΛ™Λ™ΨJ˜—Jš ž!œœ_œœœ$œ˜ΧJ™ΓJšœ†™†JšœΩ™ΩJ˜Jšžœœ˜ J™J˜Jšžœœ/˜9JšœB™BJ™Jšž œœ/˜>Icodešœ?™?J˜Jšœ˜—…—˜ Ϋ