** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundmgr.cpp,v 1.11 2001/03/05 19:14:40 kevin Exp $
+** $Id: backgroundmgr.cpp,v 1.12 2001/03/05 20:29:23 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
#include "backgroundmgr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
IMPLEMENT_DYNAMIC_CLASS(BackgroundManager, wxMiniFrame)
// dc.DrawLine (30,0, 0, 30);
}
#endif
+
+#endif // HAVE_WXTHREADS
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundmgr.h,v 1.7 2001/02/25 10:52:55 kevin Exp $
+** $Id: backgroundmgr.h,v 1.8 2001/03/05 20:29:23 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
#include <vector>
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
class BackgroundManagerCanvas;
DECLARE_EVENT_TABLE()
};
+#endif // HAVE_WXTHREADS
#endif // _BACKGROUNDMGR_H
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundsupr.cpp,v 1.14 2001/03/05 19:14:40 kevin Exp $
+** $Id: backgroundsupr.cpp,v 1.15 2001/03/05 20:29:23 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
+// #define USE_BKGMGR 1
////////////////////////////////////////////////////////////////////////////
//
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsim.cpp,v 1.95 2001/03/05 15:16:25 kevin Exp $
+** $Id: ctsim.cpp,v 1.96 2001/03/05 20:29:23 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
#endif
#endif
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.95 2001/03/05 15:16:25 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.96 2001/03/05 20:29:23 kevin Exp $";
struct option CTSimApp::ctsimOptions[] =
{
if (getStartupTips())
ShowTips();
+#ifdef HAVE_WXTHREADS
m_pBackgroundMgr = new BackgroundManager;
+#endif
+
return true;
}
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: dialogs.cpp,v 1.46 2001/03/02 21:11:50 kevin Exp $
+** $Id: dialogs.cpp,v 1.47 2001/03/05 20:29:23 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
m_pCBStartupTips->SetValue (bStartupTips);
pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
+#ifdef HAVE_WXTHREADS
m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
-#ifdef HAVE_WXTHREADS
pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
#endif
bool
DialogPreferences::getUseBackgroundTasks ()
{
+#ifdef HAVE_WXTHREADS
return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
+#else
+ return false;
+#endif
}
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadraster.cpp,v 1.10 2001/03/05 19:14:40 kevin Exp $
+** $Id: threadraster.cpp,v 1.11 2001/03/05 20:29:23 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
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: threadraster.h,v 1.3 2001/03/04 03:14:47 kevin Exp $
+** $Id: threadraster.h,v 1.4 2001/03/05 20:29:23 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
RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, const char* const pszLabel);
virtual wxThread::ExitCode Entry();
-
virtual void OnExit();
};
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: tips.cpp,v 1.2 2001/02/22 11:05:38 kevin Exp $
+** $Id: tips.cpp,v 1.3 2001/03/05 20:29:23 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
{"You can control CTSim's operation using the \"File - Preferences\" menu command."},
};
-const int CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
+const size_t CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
CTSimTipProvider::CTSimTipProvider (size_t iCurrentTip)
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: tips.h,v 1.1 2001/02/22 00:56:50 kevin Exp $
+** $Id: tips.h,v 1.2 2001/03/05 20:29:23 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:
static const char* const s_aszTips[];
- static const int s_iNumTips;
+ static const size_t s_iNumTips;
size_t m_iCurrentTip;
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.126 2001/03/04 22:30:20 kevin Exp $
+** $Id: views.cpp,v 1.127 2001/03/05 20:29:23 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
}
} else {
#if HAVE_WXTHREADS
- if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+ if (theApp->getUseBackgroundTasks()) {
ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
m_iDefaultNView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio, os.str().c_str());
<< m_iDefaultRasterNSamples;;
#if HAVE_WXTHREADS
- if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+ if (theApp->getUseBackgroundTasks()) {
RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
if (pThread->Create() != wxTHREAD_NO_ERROR) {
delete pReconstructor;
} else {
#if HAVE_WXTHREADS
- if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+ if (theApp->getUseBackgroundTasks()) {
ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this,
m_iDefaultNX, m_iDefaultNY, optFilterName.c_str(),
m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),