DIRECTORY Atom USING [GetPName], Commander USING [CommandProc, Register], IO USING [EndOfStream, GetTokenRope, IDProc, PutF, atom, rope, RIS, STREAM], LoganBerry USING [AttributeType, AttributeValue, Entry, Error, Open, OpenDB], LoganBerryBrowser USING [CreateTool, DisplayProc], Rope USING [Cat, ROPE], TiogaButtons USING [CreateButton, TiogaButtonProc], VoiceRope USING [Play, VoiceRope]; VoiceBrowserControl: CEDAR PROGRAM IMPORTS Atom, Commander, IO, LoganBerry, LoganBerryBrowser, Rope, TiogaButtons, VoiceRope ~ BEGIN VoicePlayProc: TiogaButtons.TiogaButtonProc = { vrID: Rope.ROPE = NARROW[clientData]; VoiceRope.Play[voiceRope: VoiceRope.VoiceRope[id: vrID]]; }; VoicePlayButton: LoganBerryBrowser.DisplayProc = { vrID: Rope.ROPE; contents: Rope.ROPE _ NIL; FOR e: LoganBerry.Entry _ entry, e.rest UNTIL e = NIL DO contents _ Rope.Cat[contents, Atom.GetPName[e.first.type], ": ", e.first.value, "\n"]; IF e.first.type = $VRID THEN vrID _ e.first.value; ENDLOOP; [] _ TiogaButtons.CreateButton[viewer: output, rope: contents, format: "body", proc: VoicePlayProc, clientData: vrID]; }; MakeBrowserTool: Commander.CommandProc = { ENABLE LoganBerry.Error => { IO.PutF[cmd.err, "Error: %g - %g\n", IO.atom[ec], IO.rope[explanation]]; GOTO End; }; dbname: Rope.ROPE; argStream: IO.STREAM _ IO.RIS[cmd.commandLine]; dbname _ IO.GetTokenRope[argStream, IO.IDProc ! IO.EndOfStream => {msg _ "No database name supplied.\n"; GOTO End}].token; LoganBerryBrowser.CreateTool[db: LoganBerry.Open[dbName: dbname], outputFlavor: $TiogaButtons, proc: VoicePlayButton]; EXITS End => RETURN; }; Commander.Register[key: "VoiceBrowser", proc: MakeBrowserTool, doc: "Create a tool for browsing and playing voice ropes.\n Usage: VoiceBrowser " ]; END. κVoiceBrowserControl.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Doug Terry, January 21, 1987 7:12:06 pm PST Tailors a LoganBerry browser for browsing and playing voice ropes. The browser should work on both the voice rope and interest databases. [parent: REF ANY, clientData: REF ANY _ NIL, mouseButton: Menus.MouseButton _ red, shift: BOOL _ FALSE, control: BOOL _ FALSE] [entry: LoganBerry.Entry, output: ViewerClasses.Viewer, clientData: REF ANY _ NIL] RETURNS [continue: BOOL _ TRUE] [cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL] Doug Terry, January 21, 1987 7:12:06 pm PST changes to: DIRECTORY, VoiceBrowserControl, IMPORTS, ~, VoicePlayProc, VoicePlayButton, MakeBrowserTool, END Κ˜codešœ™Kšœ Οmœ1™˜Yšœž˜K˜•StartOfExpansion‚ -- [parent: REF ANY, clientData: REF ANY _ NIL, mouseButton: Menus.MouseButton _ red, shift: BOOL _ FALSE, control: BOOL _ FALSE]šΟn œ"˜/Kšœ žœžœžœžœžœ/žœžœ žœžœ™~Jšœ žœžœ ˜%Kšœ9˜9K˜—K˜š œ#˜2Kš œDžœžœžœžœ žœžœ™rKšœ žœ˜Kšœž œ˜šžœ%žœžœž˜8KšœV˜VKšžœžœ˜2Kšžœ˜—Kšœv˜vK˜—K˜šΠbnœ˜*KšΠckH™Hšžœ˜Kšžœ#žœ žœ˜HKšžœ˜ K˜—Kšœ žœ˜Kš œ žœžœžœžœ˜/Kš œ žœžœ žœ7žœ ˜zKšœw˜wšž˜Kšœžœ˜—K˜K˜—šœ>˜>Jšœ\˜\——K˜Kšžœ˜™+Kšœ Οr`™l—K™—…—Ψ Θ