<<>> <> <> <> <> <> <<>> DIRECTORY IO USING [ STREAM, Value ], Menus USING [MenuProc], Rope USING [ ROPE ], TiogaButtons USING [ TiogaButton ], ViewerClasses USING [ IconFlavor, Viewer ], ViewerEvents USING [ EventRegistration ]; BlackCherry: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Viewer: TYPE = ViewerClasses.Viewer; msgSetIcon, msgIcon: ViewerClasses.IconFlavor; MsgHandle: TYPE ~ REF MsgHandleRec; MsgHandleRec: TYPE ~ RECORD [ toc, gvID: ROPE ¬ NIL, deleted: BOOL ¬ FALSE, unRead: BOOL ¬ TRUE, headersPos, textLen: INT, formatPos, formatLen: INT, entryStart, entryLen: INT ¬ 0, charPos: INT ¬ 0, tocButton: TiogaButtons.TiogaButton, msInfo: MsgSetInfo, next: MsgHandle, data: REF ANY ¬ NIL ]; MsgSetInfo: TYPE ~ REF MsgSetInfoRec; MsgSetInfoRec: TYPE ~ RECORD [ tiogaViewer: Viewer, -- only child, $TiogaButton viewer fileName: ROPE, fileData: BCFileData, viewer: Viewer, whichMenu: ATOM ¬ $all, -- matches whichMenu in OpsProc destroyER: ViewerEvents.EventRegistration, msgDisplayer: Viewer, first, last, selected: MsgHandle, data: REF ANY ¬ NIL ]; <> <<>> GetMsgContents: PROC [msInfo: MsgSetInfo, msgH: MsgHandle] RETURNS [contents, formatting: ROPE]; <> <<>> GetMsgID: PROC [msInfo: MsgSetInfo, msgH: MsgHandle] RETURNS [id: ROPE]; <> <<>> DisplayOneMsg: PROC [msgH: MsgHandle, grow: BOOL]; <> <<>> NewFile: PROC [msInfo: MsgSetInfo]; <> <<>> <> ProcessNewMailProc: TYPE = PROC [msInfo: MsgSetInfo, msgH: MsgHandle] RETURNS []; <> <<>> InsertMsgsProc: TYPE = PROC [msInfo: MsgSetInfo, msgH: MsgHandle] RETURNS []; <> <<>> MsgButtonTextProc: TYPE = PROC [msInfo: MsgSetInfo, msgH: MsgHandle] RETURNS [text: ROPE]; <> <<>> CustomProcs: TYPE = REF CustomProcsRec; CustomProcsRec: TYPE = RECORD[ newMail: ProcessNewMailProc ¬ NIL, insertMsgs: InsertMsgsProc ¬ NIL, msgButtonText: MsgButtonTextProc ¬ NIL ]; RegisterCustomProcs: PROC[procs: CustomProcs]; <> <<>> GetCustomProcs: PROC[] RETURNS [procs: CustomProcs]; <> <> OpsProc: TYPE ~ PROC[msI: MsgSetInfo]; AddOpsProc: PROC[menuName: ROPE, proc: OpsProc, whichMenu: ATOM ¬ $all]; <> <> <<$all => all ops Menus>> <<$writeNeeded => do not include in readOnly ops menus>> <<... more as needed>> <<>> AddDisplayerProc: PROC[menuName: ROPE, proc: Menus.MenuProc]; <> AddMsgProc: PROC[menuName: ROPE, proc: Menus.MenuProc]; <> <<>> <> <<>> BadName: ERROR; OpenFailed: ERROR; BCFileData: TYPE = REF BCFileDataRec; BCFileDataRec: TYPE = RECORD[ name: ROPE, readStream: STREAM, writeStream: STREAM, clientData: REF ANY ]; RegisterFileProcs: PROC[procs: FileProcs]; FileProcs: TYPE = REF FileProcsRec; FileProcsRec: TYPE = RECORD[ fullName: PROC[ fileName: ROPE, wDir: ROPE ¬ NIL ] RETURNS [ fullName: ROPE ], openOrCreate: PROC[ name: ROPE, how: ATOM ] RETURNS [ fileData: BCFileData ], <> setByteCount: PROC[ fileData: BCFileData, bytes: INT ], iconSetter: PROC[iconFileName: ROPE] ]; <> <<>> Report: PROC [format: ROPE, v1, v2, v3: IO.Value ¬ [null[]] ]; }.