** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundmgr.cpp,v 1.10 2001/03/05 15:16:25 kevin Exp $
+** $Id: backgroundmgr.cpp,v 1.11 2001/03/05 19:14:40 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
END_EVENT_TABLE()
BackgroundManagerCanvas::BackgroundManagerCanvas (BackgroundManager* pMgr)
-: m_pBackgroundManager(pMgr), wxPanel (pMgr)
+: wxPanel (pMgr), m_pBackgroundManager(pMgr)
{
}
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundsupr.cpp,v 1.13 2001/03/05 17:26:46 kevin Exp $
+** $Id: backgroundsupr.cpp,v 1.14 2001/03/05 19:14:40 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
#ifdef HAVE_WXTHREADS
+#define USE_BKGMGR 1
+
////////////////////////////////////////////////////////////////////////////
//
// Class BackgroundSupervisor -- An event handler run by a SupervisorThread
BackgroundSupervisor::~BackgroundSupervisor()
{
+#ifdef USE_BKGMGR
wxCommandEvent doneEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_REMOVE);
doneEvent.SetClientData (this);
wxPostEvent (theApp->getBackgroundManager(), doneEvent);
+#endif
m_pDocument->removeBackgroundSupervisor (this);
std::string strLabel (m_strProcessTitle);
strLabel += " ";
strLabel += m_pParentFrame->GetTitle();
+
+#ifdef USE_BKGMGR
wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
addTaskEvent.SetString (strLabel.c_str());
addTaskEvent.SetInt (m_iTotalUnits);
addTaskEvent.SetClientData (this);
wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
+#endif
m_pDocument->addBackgroundSupervisor (this);
*theApp->getLog() << "Units done: " << static_cast<int>(m_iUnitsDone) <<"\n";
#endif
+#ifdef USE_BKGMGR
wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
addTaskEvent.SetInt (m_iUnitsDone - 1);
addTaskEvent.SetClientData (this);
wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
+#endif
}
void
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadraster.cpp,v 1.9 2001/03/05 17:26:46 kevin Exp $
+** $Id: threadraster.cpp,v 1.10 2001/03/05 19:14:40 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
wxThread::ExitCode
RasterizerSupervisorThread::Entry()
{
- RasterizerSupervisor* pRasterSupervisor = new RasterizerSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
+ RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
- pRasterSupervisor->start();
+ rasterSupervisor.start();
- while (! pRasterSupervisor->workersDone() && ! pRasterSupervisor->fail() && ! pRasterSupervisor->cancelled()) {
+ while (! rasterSupervisor.workersDone() && ! rasterSupervisor.fail() && ! rasterSupervisor.cancelled()) {
Sleep(100);
}
- if (pRasterSupervisor->fail())
+ if (rasterSupervisor.fail())
{
wxString msg ("Error starting Rasterizer supervisor: ");
- msg += pRasterSupervisor->getFailMessage().c_str();
+ msg += rasterSupervisor.getFailMessage().c_str();
msg += "\n";
wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
eventLog.SetString( msg );
wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
}
- if (! pRasterSupervisor->cancelled())
- pRasterSupervisor->onDone();
- pRasterSupervisor->deleteWorkers();
-
+ if (! rasterSupervisor.cancelled())
+ rasterSupervisor.onDone();
+ rasterSupervisor.deleteWorkers();
+
return reinterpret_cast<wxThread::ExitCode>(0);
}
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.h,v 1.11 2001/03/02 21:11:50 kevin Exp $
+** $Id: threadrecon.h,v 1.12 2001/03/05 19:14:40 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
private:
std::vector<ImageFile*> m_vecpChildImageFile;
- ProjectionFileDocument* m_pProjDoc;
ProjectionFileView* m_pProjView;
+ ProjectionFileDocument* m_pProjDoc;
const int m_iImageNX;
const int m_iImageNY;