********************************************************************
* NOTE: This file is generated automatically from the event * definition file CP.evt. ********************************************************************<* PRAGMA LL *> MODULEevent handling methods:; <*NOWARN*> IMPORT TextPort, Rd, CPViewClass, ZeusClass, Filter, R2; <*NOWARN*> IMPORT TextEditVBT, Fmt, ZFmt, Wr, ZeusPanel, FormsVBT; <*NOWARN*> IMPORT VBT, View; <* 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; oeSetup := Setup; oeAddPoint := AddPoint; oeNotProcessed := NotProcessed; oeRemoveNotProcessed := RemoveNotProcessed; oeActiveR := ActiveR; oeRemoveActiveR := RemoveActiveR; oeCloseR := CloseR; oeRemoveCloseR := RemoveCloseR; oeSplit := Split; oeSplitRemove := SplitRemove; oeNewMin := NewMin; oeNoChangeMin := NoChangeMin; oeSelectTrialPoint := SelectTrialPoint; oeDeselectTrialPoint := DeselectTrialPoint; oeSelectTargetPoint := SelectTargetPoint; oeDeselectTargetPoint := DeselectTargetPoint; oeDrawBar := DrawBar; oeRemoveBar := RemoveBar; END; PROCEDURE CPTranscriptView TViewInit (view: T): T = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "init"); RETURN CPViewClass.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("CPTranscriptView.fv"); view.te := FormsVBT.GetVBT(view.fv, "transcript"); TViewZTrace (view, "install"); FormsVBT.AttachProc(view.fv, "clear", Clear, view); EVAL Filter.Replace (view, view.fv); CPViewClass.T.install (view); END TViewInstall; PROCEDURETViewDelete (view: T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "delete"); CPViewClass.T.delete (view); END TViewDelete; PROCEDURETViewSnapshot (view: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "snapshot"); CPViewClass.T.snapshot (view, wr); END TViewSnapshot; PROCEDURETViewRestore (view: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "restore"); CPViewClass.T.restore (view, rd); END TViewRestore; PROCEDURETViewConfig ( view: T; state: ZeusClass.StateChange; o: ZeusClass.T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "config"); CPViewClass.T.config (view, state, o); END TViewConfig; PROCEDURETViewReactivity (view: T; <*UNUSED*> on: BOOLEAN) = <* LL = VBT.mu *> BEGIN TViewZTrace(view, "reactivity"); CPViewClass.T.reactivity (view, TRUE); END TViewReactivity; PROCEDURETViewStartrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "startrun"); CPViewClass.T.startrun (view); END TViewStartrun; PROCEDURETViewEndrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "endrun"); CPViewClass.T.endrun (view); END TViewEndrun;PROCEDURESetup (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, "Setup ...") ELSE TViewTrace (view, "Setup " ) END END END END Setup; PROCEDUREAddPoint (view: T; p: R2.T; N: INTEGER; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "AddPoint ...") ELSE TViewTrace (view, "AddPoint " & R2.ToText(p) & " " & Fmt.Int(N) & " " & Fmt.Bool(big) ) END END END END AddPoint; PROCEDURENotProcessed (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NotProcessed ...") ELSE TViewTrace (view, "NotProcessed " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END NotProcessed; PROCEDURERemoveNotProcessed (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "RemoveNotProcessed ...") ELSE TViewTrace (view, "RemoveNotProcessed " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END RemoveNotProcessed; PROCEDUREActiveR (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ActiveR ...") ELSE TViewTrace (view, "ActiveR " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END ActiveR; PROCEDURERemoveActiveR (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "RemoveActiveR ...") ELSE TViewTrace (view, "RemoveActiveR " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END RemoveActiveR; PROCEDURECloseR (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "CloseR ...") ELSE TViewTrace (view, "CloseR " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END CloseR; PROCEDURERemoveCloseR (view: T; x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "RemoveCloseR ...") ELSE TViewTrace (view, "RemoveCloseR " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END RemoveCloseR; PROCEDURESplit (view: T; x: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Split ...") ELSE TViewTrace (view, "Split " & Fmt.Real(x) & " " & Fmt.Bool(big) ) END END END END Split; PROCEDURESplitRemove (view: T; x: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SplitRemove ...") ELSE TViewTrace (view, "SplitRemove " & Fmt.Real(x) & " " & Fmt.Bool(big) ) END END END END SplitRemove; PROCEDURENewMin (view: T; p1, p2, c1, c2: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NewMin ...") ELSE TViewTrace (view, "NewMin " & R2.ToText(p1) & " " & R2.ToText(p2) & " " & R2.ToText(c1) & " " & R2.ToText(c2) & " " & Fmt.Bool(big) ) END END END END NewMin; PROCEDURENoChangeMin (view: T; p1, p2, c1, c2: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NoChangeMin ...") ELSE TViewTrace (view, "NoChangeMin " & R2.ToText(p1) & " " & R2.ToText(p2) & " " & R2.ToText(c1) & " " & R2.ToText(c2) & " " & Fmt.Bool(big) ) END END END END NoChangeMin; PROCEDURESelectTrialPoint (view: T; x: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SelectTrialPoint ...") ELSE TViewTrace (view, "SelectTrialPoint " & R2.ToText(x) & " " & Fmt.Bool(big) ) END END END END SelectTrialPoint; PROCEDUREDeselectTrialPoint (view: T; x: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DeselectTrialPoint ...") ELSE TViewTrace (view, "DeselectTrialPoint " & R2.ToText(x) & " " & Fmt.Bool(big) ) END END END END DeselectTrialPoint; PROCEDURESelectTargetPoint (view: T; trialp, targp: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SelectTargetPoint ...") ELSE TViewTrace (view, "SelectTargetPoint " & R2.ToText(trialp) & " " & R2.ToText(targp) & " " & Fmt.Bool(big) ) END END END END SelectTargetPoint; PROCEDUREDeselectTargetPoint (view: T; trialp, targp: R2.T; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DeselectTargetPoint ...") ELSE TViewTrace (view, "DeselectTargetPoint " & R2.ToText(trialp) & " " & R2.ToText(targp) & " " & Fmt.Bool(big) ) END END END END DeselectTargetPoint; PROCEDUREDrawBar (view: T; y, x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DrawBar ...") ELSE TViewTrace (view, "DrawBar " & Fmt.Real(y) & " " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END DrawBar; PROCEDURERemoveBar (view: T; y, x1, x2: REAL; big: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "RemoveBar ...") ELSE TViewTrace (view, "RemoveBar " & Fmt.Real(y) & " " & Fmt.Real(x1) & " " & Fmt.Real(x2) & " " & Fmt.Bool(big) ) END END END END RemoveBar; 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, "CP Transcript View", "CP"); END CPTranscriptView.