X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fbackgroundmgr.h;fp=src%2Fbackgroundmgr.h;h=7e95fae7b75daf75938363ee304c8292c9718e6a;hb=e081109a4a541c8780aaa253b874acada5957200;hp=0000000000000000000000000000000000000000;hpb=0730f9f3adbf326b9d4bac754634399ad688efd1;p=ctsim.git diff --git a/src/backgroundmgr.h b/src/backgroundmgr.h new file mode 100644 index 0000000..7e95fae --- /dev/null +++ b/src/backgroundmgr.h @@ -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 + +#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 m_vecpBackgroundTasks; + std::vector 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 +