r577: no message
[ctsim.git] / src / threadrecon.h
index 9c1e5e26783b274ca43eabfe13cf579049555c41..e96bb2d8f85c76d4adea9ebb2295ec594c138e11 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.h,v 1.6 2001/02/23 18:56:56 kevin Exp $
+**  $Id: threadrecon.h,v 1.7 2001/02/23 21:58:32 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -81,15 +81,17 @@ public:
   virtual ~BackgroundSupervisor()
   {}
 
-  virtual void cancel() = 0;
   virtual bool start() = 0;
   virtual bool testDone() = 0;
   virtual void OnWorkerFail(wxCommandEvent& event) = 0;
   virtual void OnWorkerUnitTick(wxCommandEvent& event) = 0;
   virtual void OnWorkerDone(wxCommandEvent& event) = 0;
+  virtual void OnCancel(wxCommandEvent& event) = 0;
 
   bool isDone() const {return m_bDone;}
   void setDone() { m_bDone = true; }
+
+  static void cancelSupervisor (BackgroundSupervisor* pSupervisor);
 };
 
 class Reconstructor;
@@ -107,9 +109,9 @@ private:
   std::vector<ImageFile*> m_vecpChildImageFile;
   typedef std::vector<ReconstructorWorker*> ThreadContainer;
   ThreadContainer m_vecpThread;
+  ProjectionFileDocument* m_pProjDoc;
   ProjectionFileView* m_pProjView;
   wxProgressDialog* m_pDialogProgress;
-  wxGauge* m_pGauge;
     
   volatile bool m_bFail;
   int m_iNumThreads;
@@ -136,9 +138,6 @@ public:
 
    ~ReconstructorSupervisor ();
 
-  void OnThreadEvent (wxCommandEvent& event);
-  void cancel();
-
   void onDone();
   bool start();
   bool fail() const {return m_bFail;}
@@ -147,6 +146,7 @@ public:
   virtual void OnWorkerFail(wxCommandEvent& event);
   virtual void OnWorkerUnitTick(wxCommandEvent& event);
   virtual void OnWorkerDone(wxCommandEvent& event);
+  virtual void OnCancel(wxCommandEvent& event);
 
   ImageFile* getImageFile();