X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fbackgroundmgr.h;h=a900f72941b1476b3582115f873e4718de68dcf6;hb=b4f2d26b8657e786cecf339a13fe8e53c2a0e6b5;hp=90bbf147525182765ccd057b2b161573be394a16;hpb=1ef49f39828474ed05fe69aff68d400e3b7d4044;p=ctsim.git diff --git a/src/backgroundmgr.h b/src/backgroundmgr.h index 90bbf14..a900f72 100644 --- a/src/backgroundmgr.h +++ b/src/backgroundmgr.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: backgroundmgr.h,v 1.4 2001/02/23 18:56:56 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 @@ -44,17 +44,14 @@ #include -#if defined(HAVE_CONFIG_H) -#include "config.h" -#endif +#ifdef HAVE_WXTHREADS class BackgroundManagerCanvas; #if CTSIM_MDI //class BackgroundManager : public wxMDIChildFrame -//#else -class BackgroundManager : public wxMiniFrame #endif +class BackgroundManager : public wxMiniFrame { private: DECLARE_DYNAMIC_CLASS(BackgroundManager) @@ -68,33 +65,39 @@ private: typedef std::vector StringContainer; typedef std::vector PositionContainer; typedef std::vector LabelContainer; + typedef std::vector ButtonContainer; TaskContainer m_vecpBackgroundTasks; GaugeContainer m_vecpGauges; StringContainer m_vecpNames; PositionContainer m_vecpPositions; LabelContainer m_vecpLabels; + ButtonContainer m_vecpCancelButtons; wxSize m_sizeGauge; wxSize m_sizeLabel; wxSize m_sizeCell; wxSize m_sizeBorder; + wxSize m_sizeCellSpacing; + wxSize m_sizeButton; void resizeWindow(); + wxGauge* lookupGauge(BackgroundSupervisor* pTask); public: BackgroundManager (); - wxGauge* addTask (BackgroundSupervisor* pTask, int iNumUnits, const char* const pszTaskName); - void taskDone (BackgroundSupervisor* pTask); - bool isCancelling (BackgroundSupervisor* pTask); - TaskContainer& getTasks() { return m_vecpBackgroundTasks;} GaugeContainer& getGauges() { return m_vecpGauges;} StringContainer& getNames() { return m_vecpNames;} PositionContainer& getPositions() { return m_vecpPositions;} LabelContainer& getLabels() { return m_vecpLabels;} + ButtonContainer& getCancelButtons() { return m_vecpCancelButtons;} + void OnAddTask (wxCommandEvent& event); + void OnRemoveTask (wxCommandEvent& event); + void OnUnitTick (wxCommandEvent& event); void OnCloseWindow(wxCloseEvent& event); - + void OnCancelButton(wxCommandEvent& event); + DECLARE_EVENT_TABLE() }; @@ -106,12 +109,13 @@ private: public: BackgroundManagerCanvas (BackgroundManager* pBkgdMgr = NULL); - +#if 0 void OnPaint (wxPaintEvent& event); - +#endif DECLARE_EVENT_TABLE() }; +#endif // HAVE_WXTHREADS #endif // _BACKGROUNDMGR_H