********************************************************************
* NOTE: This file is generated automatically from the event * definition file Wheeler.evt. ********************************************************************<* PRAGMA LL *> MODULEevent handling methods:; <*NOWARN*> IMPORT TextConv, TextPort, Rd, ZeusClass, Filter; <*NOWARN*> IMPORT TextEditVBT, Fmt, WheelerViewClass, ZFmt, Wr; <*NOWARN*> IMPORT ZeusPanel, FormsVBT, VBT, View, MiscFmt; <* FATAL FormsVBT.Error, FormsVBT.Unimplemented *> REVEAL T = Public BRANDED OBJECT fv: FormsVBT.T := NIL; te: TextEditVBT.T := NIL; OVERRIDES init := TViewInit; install := TViewInstall; delete := TViewDelete; snapshot := TViewSnapshot; restore := TViewRestore; config := TViewConfig; reactivity := TViewReactivity; startrun := TViewStartrun; endrun := TViewEndrun; oeStartPermute := StartPermute; oeNextRotation := NextRotation; oeRotationsSorted := RotationsSorted; oePermuteDone := PermuteDone; oeStartEncode := StartEncode; oeEncodeNextChar := EncodeNextChar; oeEncodeDistinctCount := EncodeDistinctCount; oeEncodeFoundCode := EncodeFoundCode; oeEncodeDone := EncodeDone; oeInitDecode := InitDecode; oeStartDecode := StartDecode; oeDecodeNextCode := DecodeNextCode; oeDecodeDistinctCount := DecodeDistinctCount; oeDecodeFoundChar := DecodeFoundChar; oeDecodeDone := DecodeDone; oeStartReconstruct := StartReconstruct; oeFirstChars := FirstChars; oeConsiderChar := ConsiderChar; oeEqualChars := EqualChars; oeFinishCharRun := FinishCharRun; oeStartResult := StartResult; oeResultNextChar := ResultNextChar; oeEndResult := EndResult; oeReveal := Reveal; END; PROCEDURE WheelerTranscriptView TViewInit (view: T): T = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "init"); RETURN WheelerViewClass.T.init (view, NIL); END TViewInit; PROCEDUREClear (<* UNUSED *> fv : FormsVBT.T; <* UNUSED *> name: TEXT; cl : REFANY; <* UNUSED *> time: VBT.TimeStamp) = BEGIN TextPort.SetText(NARROW(cl, T).te.tp, "") END Clear; PROCEDURETViewInstall (view: T) = <* LL = VBT.mu *> BEGIN view.fv := ZeusPanel.NewForm("WheelerTranscriptView.fv"); view.te := FormsVBT.GetVBT(view.fv, "transcript"); TViewZTrace (view, "install"); FormsVBT.AttachProc(view.fv, "clear", Clear, view); EVAL Filter.Replace (view, view.fv); WheelerViewClass.T.install (view); END TViewInstall; PROCEDURETViewDelete (view: T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "delete"); WheelerViewClass.T.delete (view); END TViewDelete; PROCEDURETViewSnapshot (view: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "snapshot"); WheelerViewClass.T.snapshot (view, wr); END TViewSnapshot; PROCEDURETViewRestore (view: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "restore"); WheelerViewClass.T.restore (view, rd); END TViewRestore; PROCEDURETViewConfig ( view: T; state: ZeusClass.StateChange; o: ZeusClass.T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "config"); WheelerViewClass.T.config (view, state, o); END TViewConfig; PROCEDURETViewReactivity (view: T; <*UNUSED*> on: BOOLEAN) = <* LL = VBT.mu *> BEGIN TViewZTrace(view, "reactivity"); WheelerViewClass.T.reactivity (view, TRUE); END TViewReactivity; PROCEDURETViewStartrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "startrun"); WheelerViewClass.T.startrun (view); END TViewStartrun; PROCEDURETViewEndrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "endrun"); WheelerViewClass.T.endrun (view); END TViewEndrun;PROCEDUREStartPermute (view: T; string, alphabet: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "StartPermute ...") ELSE TViewTrace (view, "StartPermute " & TextConv.Encode(string) & " " & TextConv.Encode(alphabet) ) END END END END StartPermute; PROCEDURENextRotation (view: T; i: INTEGER; string: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NextRotation ...") ELSE TViewTrace (view, "NextRotation " & Fmt.Int(i) & " " & TextConv.Encode(string) ) END END END END NextRotation; PROCEDURERotationsSorted (view: T; rotations: MiscFmt.RefTextArray; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "RotationsSorted ...") ELSE TViewTrace (view, "RotationsSorted " & MiscFmt.TextArray(rotations) & " " & Fmt.Int(rowIndex) ) END END END END RotationsSorted; PROCEDUREPermuteDone (view: T; lastchars: TEXT; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "PermuteDone ...") ELSE TViewTrace (view, "PermuteDone " & TextConv.Encode(lastchars) & " " & Fmt.Int(rowIndex) ) END END END END PermuteDone; PROCEDUREStartEncode (view: T; alphabet: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "StartEncode ...") ELSE TViewTrace (view, "StartEncode " & TextConv.Encode(alphabet) ) END END END END StartEncode; PROCEDUREEncodeNextChar (view: T; i: INTEGER; c: CHAR) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EncodeNextChar ...") ELSE TViewTrace (view, "EncodeNextChar " & Fmt.Int(i) & " " & MiscFmt.Char(c) ) END END END END EncodeNextChar; PROCEDUREEncodeDistinctCount (view: T; i, k, n: INTEGER; c: CHAR) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EncodeDistinctCount ...") ELSE TViewTrace (view, "EncodeDistinctCount " & Fmt.Int(i) & " " & Fmt.Int(k) & " " & Fmt.Int(n) & " " & MiscFmt.Char(c) ) END END END END EncodeDistinctCount; PROCEDUREEncodeFoundCode (view: T; i, k, code: INTEGER; c: CHAR) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EncodeFoundCode ...") ELSE TViewTrace (view, "EncodeFoundCode " & Fmt.Int(i) & " " & Fmt.Int(k) & " " & Fmt.Int(code) & " " & MiscFmt.Char(c) ) END END END END EncodeFoundCode; PROCEDUREEncodeDone (view: T; alphabet: TEXT; codes: MiscFmt.RefIntArray; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EncodeDone ...") ELSE TViewTrace (view, "EncodeDone " & TextConv.Encode(alphabet) & " " & MiscFmt.IntArray(codes) & " " & Fmt.Int(rowIndex) ) END END END END EncodeDone; PROCEDUREInitDecode (view: T; alphabet: TEXT; codes: MiscFmt.RefIntArray; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "InitDecode ...") ELSE TViewTrace (view, "InitDecode " & TextConv.Encode(alphabet) & " " & MiscFmt.IntArray(codes) & " " & Fmt.Int(rowIndex) ) END END END END InitDecode; PROCEDUREStartDecode (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "StartDecode ...") ELSE TViewTrace (view, "StartDecode " ) END END END END StartDecode; PROCEDUREDecodeNextCode (view: T; i: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DecodeNextCode ...") ELSE TViewTrace (view, "DecodeNextCode " & Fmt.Int(i) ) END END END END DecodeNextCode; PROCEDUREDecodeDistinctCount (view: T; i, k, n: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DecodeDistinctCount ...") ELSE TViewTrace (view, "DecodeDistinctCount " & Fmt.Int(i) & " " & Fmt.Int(k) & " " & Fmt.Int(n) ) END END END END DecodeDistinctCount; PROCEDUREDecodeFoundChar (view: T; i, k: INTEGER; c: CHAR) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DecodeFoundChar ...") ELSE TViewTrace (view, "DecodeFoundChar " & Fmt.Int(i) & " " & Fmt.Int(k) & " " & MiscFmt.Char(c) ) END END END END DecodeFoundChar; PROCEDUREDecodeDone (view: T; lastchars: TEXT; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DecodeDone ...") ELSE TViewTrace (view, "DecodeDone " & TextConv.Encode(lastchars) & " " & Fmt.Int(rowIndex) ) END END END END DecodeDone; PROCEDUREStartReconstruct (view: T; lastchars: TEXT; rowIndex: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "StartReconstruct ...") ELSE TViewTrace (view, "StartReconstruct " & TextConv.Encode(lastchars) & " " & Fmt.Int(rowIndex) ) END END END END StartReconstruct; PROCEDUREFirstChars (view: T; t: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "FirstChars ...") ELSE TViewTrace (view, "FirstChars " & TextConv.Encode(t) ) END END END END FirstChars; PROCEDUREConsiderChar (view: T; i: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ConsiderChar ...") ELSE TViewTrace (view, "ConsiderChar " & Fmt.Int(i) ) END END END END ConsiderChar; PROCEDUREEqualChars (view: T; i, j: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EqualChars ...") ELSE TViewTrace (view, "EqualChars " & Fmt.Int(i) & " " & Fmt.Int(j) ) END END END END EqualChars; PROCEDUREFinishCharRun (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "FinishCharRun ...") ELSE TViewTrace (view, "FinishCharRun " ) END END END END FinishCharRun; PROCEDUREStartResult (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "StartResult ...") ELSE TViewTrace (view, "StartResult " ) END END END END StartResult; PROCEDUREResultNextChar (view: T; pos, k: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ResultNextChar ...") ELSE TViewTrace (view, "ResultNextChar " & Fmt.Int(pos) & " " & Fmt.Int(k) ) END END END END ResultNextChar; PROCEDUREEndResult (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "EndResult ...") ELSE TViewTrace (view, "EndResult " ) END END END END EndResult; PROCEDUREReveal (view: T; i: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Reveal ...") ELSE TViewTrace (view, "Reveal " & Fmt.Int(i) ) END END END END Reveal; PROCEDURETViewZTrace (view: T; t: TEXT) = BEGIN IF view.fv # NIL THEN IF FormsVBT.GetBoolean(view.fv, "zeus") THEN TextPort.PutText(view.te.tp, "**zeus: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END END END TViewZTrace; PROCEDURETViewTrace (view: T; t: TEXT) = BEGIN TextPort.PutText(view.te.tp, "--event: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END TViewTrace; PROCEDURETViewNew (): View.T = BEGIN RETURN NEW(T).init() END TViewNew; BEGIN ZeusPanel.RegisterView (TViewNew, "Wheeler Transcript View", "Wheeler"); END WheelerTranscriptView.