********************************************************************
* NOTE: This file is generated automatically from the event * definition file StringSearch.evt. ********************************************************************<* PRAGMA LL *> MODULEevent handling methods:; <*NOWARN*> IMPORT TextPort, Rd, ZeusClass, Filter, TextEditVBT; <*NOWARN*> IMPORT Fmt, ZFmt, Wr, ZeusPanel, FormsVBT, VBT, View; <*NOWARN*> IMPORT StringSearchViewClass; <* 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; oeProbe := Probe; oeResult := Result; oePartialMatch := PartialMatch; oePartialMatchClear := PartialMatchClear; oeCompleteMatch := CompleteMatch; oeSlideTo := SlideTo; oeKMPSetup := KMPSetup; oeAddEdge := AddEdge; END; PROCEDURE StringSearchTranscriptView TViewInit (view: T): T = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "init"); RETURN StringSearchViewClass.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("StringSearchTranscriptView.fv"); view.te := FormsVBT.GetVBT(view.fv, "transcript"); TViewZTrace (view, "install"); FormsVBT.AttachProc(view.fv, "clear", Clear, view); EVAL Filter.Replace (view, view.fv); StringSearchViewClass.T.install (view); END TViewInstall; PROCEDURETViewDelete (view: T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "delete"); StringSearchViewClass.T.delete (view); END TViewDelete; PROCEDURETViewSnapshot (view: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "snapshot"); StringSearchViewClass.T.snapshot (view, wr); END TViewSnapshot; PROCEDURETViewRestore (view: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "restore"); StringSearchViewClass.T.restore (view, rd); END TViewRestore; PROCEDURETViewConfig ( view: T; state: ZeusClass.StateChange; o: ZeusClass.T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "config"); StringSearchViewClass.T.config (view, state, o); END TViewConfig; PROCEDURETViewReactivity (view: T; <*UNUSED*> on: BOOLEAN) = <* LL = VBT.mu *> BEGIN TViewZTrace(view, "reactivity"); StringSearchViewClass.T.reactivity (view, TRUE); END TViewReactivity; PROCEDURETViewStartrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "startrun"); StringSearchViewClass.T.startrun (view); END TViewStartrun; PROCEDURETViewEndrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "endrun"); StringSearchViewClass.T.endrun (view); END TViewEndrun;PROCEDURESetup (view: T; p, s: TEXT) = <* 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 " & (p) & " " & (s) ) END END END END Setup; PROCEDUREProbe (view: T; i, j: CARDINAL) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Probe ...") ELSE TViewTrace (view, "Probe " & Fmt.Int(i) & " " & Fmt.Int(j) ) END END END END Probe; PROCEDUREResult (view: T; res: BOOLEAN) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Result ...") ELSE TViewTrace (view, "Result " & Fmt.Bool(res) ) END END END END Result; PROCEDUREPartialMatch (view: T; i, j, len: CARDINAL) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "PartialMatch ...") ELSE TViewTrace (view, "PartialMatch " & Fmt.Int(i) & " " & Fmt.Int(j) & " " & Fmt.Int(len) ) END END END END PartialMatch; PROCEDUREPartialMatchClear (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, "PartialMatchClear ...") ELSE TViewTrace (view, "PartialMatchClear " ) END END END END PartialMatchClear; PROCEDURECompleteMatch (view: T; j: CARDINAL) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "CompleteMatch ...") ELSE TViewTrace (view, "CompleteMatch " & Fmt.Int(j) ) END END END END CompleteMatch; PROCEDURESlideTo (view: T; j: CARDINAL) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SlideTo ...") ELSE TViewTrace (view, "SlideTo " & Fmt.Int(j) ) END END END END SlideTo; PROCEDUREKMPSetup (view: T; p: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "KMPSetup ...") ELSE TViewTrace (view, "KMPSetup " & (p) ) END END END END KMPSetup; PROCEDUREAddEdge (view: T; f, t: CARDINAL) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "AddEdge ...") ELSE TViewTrace (view, "AddEdge " & Fmt.Int(f) & " " & Fmt.Int(t) ) END END END END AddEdge; 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, "StringSearch Transcript View", "StringSearch"); END StringSearchTranscriptView.