<> <> <> <> <> DIRECTORY BasicTime USING [GMT, nullGMT], Buttons USING [Button, ButtonProc], Containers USING [Container], DFOperations USING [InteractionProc], DFOperationsQueue USING [OpTerminationInteraction, Queue, RequestedOp], IO USING [STREAM], Labels USING [Label], Rope USING [ROPE], UserProfile USING [ProfileChangedProc], VFonts USING [Font], ViewerClasses USING [Viewer]; DFToolInternal: CEDAR DEFINITIONS = BEGIN OPEN Ops: DFOperations, OpsQ: DFOperationsQueue; ROPE: TYPE = Rope.ROPE; <<>> <> <<>> DFTool: TYPE = REF DFToolRecord; DFToolRecord: TYPE = MONITORED RECORD [ <> outer: Containers.Container _ NIL, parameters: Parameters _ NIL, height: INT _ 0, opsQueue: OpsQ.Queue _ NIL, dfNames: ViewerClasses.Viewer _ NIL, -- text viewer for df file names wDir: ViewerClasses.Viewer _ NIL, -- text viewer for working directory inner: Containers.Container _ NIL, -- container for variable-size portion of tool (within 'outer') selectedOp: Operation _ NIL, bottom: Containers.Container _ NIL, -- container for interaction/feedback area (within 'inner') interaction: Containers.Container _ NIL, -- container for interaction area (within 'bottom') bottomMinHeight: INT _ 0, prompter: ViewerClasses.Viewer _ NIL, -- graphic prompter question: ViewerClasses.Viewer _ NIL, -- place for interaction queries abortRequested: BOOL _ FALSE, autoConfirm: BOOL _ FALSE, -- if TRUE, suppress button interactions responseValue: NAT _ NAT.LAST, -- (*) ResponseSeen and WaitForResponse responseSeen: BOOL _ TRUE, -- (*) ResponseSeen, WaitForResponse, and PrompterProcess responseMade: CONDITION, -- (*) ResponseSeen, WaitForResponse, and PrompterProcess prompterSeq: PrompterSeq _ PrompterSeq.FIRST, choicesX: INT _ 0, -- relative to 'interaction' choicesY: INT _ 0, -- relative to 'interaction' feedback: IO.STREAM _ NIL, -- session log startTime: BasicTime.GMT _ BasicTime.nullGMT, -- (*) DoIt, IdleNotifier recursionDepth: INT _ -1, unusualEnd: LIST OF REF OpsQ.OpTerminationInteraction _ NIL, -- ops with errors/warnings. log: IO.STREAM _ NIL -- (*) long-term log (DoIt, IdleNotifier) ]; offScreenY: INT = -9999; OpTable: TYPE = RECORD [ nOps: NAT, ops: SEQUENCE length: NAT OF REF OpDefiner ]; OpDefiner: TYPE = RECORD [ opName: ROPE, opID: OpsQ.RequestedOp, userClass: UserClass, proc: OpSpecificProc, opAlias: ROPE _ NIL ]; UserClass: TYPE = {individual, releaseParticipant, releaseMaster}; OpSpecificAction: TYPE = {createOptions, doOp, doHelp, makeCommandLine, doCommandLine}; OpSpecificProc: TYPE = PROC [action: OpSpecificAction, param: REF ANY]; <> Operation: TYPE = REF OperationRecord; OperationRecord: TYPE = RECORD [ tool: DFTool _ NIL, definer: REF OpDefiner _ NIL, button: Buttons.Button _ NIL, optionsContainer: Containers.Container _ NIL, height: INT _ 0, options: REF ANY _ NIL ]; OptionSelector: TYPE = RECORD [ name: ROPE, displayer: Labels.Label _ NIL, choices: LIST OF Choice, default: ROPE ]; Choice: TYPE = RECORD [ name: ROPE, value: REF ANY ]; PrompterSeq: TYPE = NAT[0..8); Parameters: TYPE = REF ToolParameters; ToolParameters: TYPE = RECORD [ userClass: UserClass, opTable: REF OpTable, font: VFonts.Font, boldFont: VFonts.Font, entryHeight: NAT, entryVSpace: NAT, entryHSpace: NAT, compactLayout: BOOL, dfNamePrefixes: LIST OF ROPE ]; <<>> <> <<>> userClasses: ARRAY UserClass OF ROPE; <<>> <> <<>> OpsInteraction: Ops.InteractionProc; <> <<>> AddOpToTable: PROC [definer: REF OpDefiner]; <> ViewerToRopeList: PUBLIC PROC [viewer: ViewerClasses.Viewer] RETURNS [LIST OF ROPE]; <> EnsureDFName: PUBLIC PROC [dfBase, wDir: ROPE] RETURNS [short, long: ROPE]; <> LabelWidthForChoices: PROC [tool: DFTool, list: LIST OF Choice] RETURNS [max: INT _ 0]; <> MakeCenteredLabel: PROC [op: Operation, name: ROPE]; <> OuterContainerWidth: PROC [tool: DFTool] RETURNS [INT]; CreateSelector: PROC [ name: ROPE, proc: Buttons.ButtonProc, clientData: REF ANY, choices: LIST OF Choice, op: Operation, x: INTEGER _ -1] RETURNS [selector: REF OptionSelector, initialChoice: Choice, newX: INTEGER]; SelectOption: PROC [selector: REF OptionSelector] RETURNS [choice: Choice]; ResetOption: PROC [selector: REF OptionSelector]; GetToolParameters: PROC RETURNS [Parameters]; ReactToProfile: UserProfile.ProfileChangedProc; <> AcquireLog: PROC RETURNS [IO.STREAM]; <> ReleaseLog: PROC [log: IO.STREAM]; <> END.