FinchTool.mesa
Last Edited by: Swinehart, November 2, 1983 9:05 am
Last Edited by: Lia, August 4, 1983 11:40 am
Last Edited by: Pier, March 21, 1984 10:11:19 pm PST
DIRECTORY
Buttons,
Containers,
IO,
Labels,
MBQueue USING [ Queue ],
Menus,
Rope USING [ ROPE ],
VFonts,
ViewerClasses USING [ Viewer ]
;
FinchTool: CEDAR DEFINITIONS IMPORTS VFonts = {
ROPE: TYPE = Rope.ROPE;
Viewer: TYPE = ViewerClasses.Viewer;
BuildDirectoryDisplayer: PROC [
directoryFiles: LIST OF Rope.ROPE, viewerName: Rope.ROPE, shift: BOOLFALSE]
RETURNS[msV: ViewerClasses.Viewer];
DisplayDirectoryInViewer: PROC[
directoryFiles: LIST OF Rope.ROPE, msViewer: ViewerClasses.Viewer, shift: BOOLFALSE];
FirstButton: PROC[
q: MBQueue.Queue, name: ROPE, proc: Buttons.ButtonProc, parent: Viewer,
data: REF ANYNIL, border: BOOLFALSE, width: INTEGER← 0,
guarded: BOOLFALSE, font: VFonts.Font ← VFonts.defaultFont]
RETURNS [nV: Viewer];
AnotherButton: PROC[
q: MBQueue.Queue, name: ROPE, proc: Buttons.ButtonProc, sib: Viewer,
data: REF ANYNIL, border: BOOLFALSE, width: INTEGER← 0,
guarded: BOOLFALSE, font: VFonts.Font ← VFonts.defaultFont, newLine: BOOLFALSE]
RETURNS [nV: Viewer];
Report: PROC[msg1, msg2, msg3, msg4: ROPENIL];
ReportRope: PROC[msg1: ROPE];
Status: PROC[msg1, msg2, msg3, msg4: ROPENIL];
CheckAborted: PROC[sib: Viewer] RETURNS[ok: BOOL];
CheckActive: PROC[handle: Handle] RETURNS [ active: BOOLFALSE ];
Stop: Menus.MenuProc;
Hangup: Menus.MenuProc;
StartFinch: PROC;
StopFinch: PROC;
description is a name or number; look for it everywhere that makes any sense.
Residence is a hint, when description is a name, to use a home rather than office number.
Place a call to resulting party.
CallByDescription: PROC[description: ROPE, residence: BOOLFALSE];
finchQueue: MBQueue.Queue;
finchToolHandle: Handle;
Handle: TYPE = REF FinchToolRec; -- a REF to the data for a particular instance of the sample tool; multiple instances can be created.
FinchToolRec: TYPE = RECORD [ -- the data for a particular tool instance
outer: Containers.Container ← NIL, -- handle for the enclosing container
status: Labels.Label←NIL, -- current status line
calledPartyText: Viewer←NIL,
typescript: Viewer ← NIL, -- typescript for Finch activities
tsIn: IO.STREAMNIL,
tsOut: IO.STREAMNIL,
conversations: Viewer,  -- Log of active and completed conversations
directory: Viewer,   -- user's main directory
finchActive: BOOLFALSE,-- TRUE when connected to server
finchWasActive: BOOLFALSE,
finchActiveAtCheckpoint: BOOLFALSE, -- TRUE when . . . what it says
inExecCmd: BOOLFALSE
]; 
}.