r572: no message
[ctsim.git] / src / backgroundmgr.h
diff --git a/src/backgroundmgr.h b/src/backgroundmgr.h
new file mode 100644 (file)
index 0000000..7e95fae
--- /dev/null
@@ -0,0 +1,95 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          backgroundmgr.h
+**   Purpose:       Header file for background manager
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  February 2001
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2001 Kevin Rosenberg
+**
+**  $Id: backgroundmgr.h,v 1.1 2001/02/22 15:00:20 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
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+#ifndef _BACKGROUND_MGR_H
+
+
+#include "wx/wxprec.h"
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+#include "wx/minifram.h"
+#include "wx/gauge.h"
+
+#include "ct.h"
+#include "ctsim.h"
+#include "docs.h"
+#include "views.h"
+#include "threadrecon.h"
+
+#include <vector>
+
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
+class BackgroundManagerCanvas;
+
+#if CTSIM_MDI
+//class BackgroundManager : public wxMDIChildFrame
+//#else
+class BackgroundManager : public wxMiniFrame
+#endif
+{
+private:
+  DECLARE_DYNAMIC_CLASS(BackgroundManager)
+
+  BackgroundManagerCanvas* m_pCanvas;
+  int m_iNumTasks;
+  std::vector<BackgroundTask*> m_vecpBackgroundTasks;
+  std::vector<wxGauge*> m_vecpGauges;
+
+  void OnCloseWindow(wxCloseEvent& event);
+
+public:
+  BackgroundManager ();
+
+  wxGauge* addTask (BackgroundTask* pTask, int iNumUnits);
+  void taskDone (BackgroundTask* pTask);
+  bool isCancelling (BackgroundTask* pTask);
+
+  DECLARE_EVENT_TABLE()
+};
+
+
+class BackgroundManagerCanvas : public wxPanel {
+private:
+  DECLARE_DYNAMIC_CLASS(BackgroundManagerCanvas)
+  BackgroundManager* m_pBackgroundManager;
+
+public:
+  BackgroundManagerCanvas (BackgroundManager* pBkgdMgr = NULL);
+
+  void OnPaint (wxPaintEvent& event);
+
+  DECLARE_EVENT_TABLE()
+};
+
+
+#endif // _BACKGROUNDMGR_H
+