X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fbackgroundmgr.h;h=b6e668a8c1cf74277f0c81ecaaa908d64e9399a5;hp=3a91537c8a6610071a84b0291e470ed874343bce;hb=df521cfe14a9e0b47bdcd98d1f67d03acf242162;hpb=9776c9a12ba53419d34563a5ec57c90e3d6798f4 diff --git a/src/backgroundmgr.h b/src/backgroundmgr.h index 3a91537..b6e668a 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.2 2001/02/22 18:22:40 kevin Exp $ +** $Id: backgroundmgr.h,v 1.7 2001/02/25 10:52:55 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 @@ -52,9 +52,8 @@ class BackgroundManagerCanvas; #if CTSIM_MDI //class BackgroundManager : public wxMDIChildFrame -//#else -class BackgroundManager : public wxMiniFrame #endif +class BackgroundManager : public wxMiniFrame { private: DECLARE_DYNAMIC_CLASS(BackgroundManager) @@ -63,25 +62,43 @@ private: BackgroundManagerCanvas* m_pCanvas; int m_iNumTasks; - typedef std::vector TaskContainer; + typedef std::vector TaskContainer; typedef std::vector GaugeContainer; 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; - - void OnCloseWindow(wxCloseEvent& event); + 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 (BackgroundTask* pTask, int iNumUnits, const char* const pszTaskName); - void taskDone (BackgroundTask* pTask); - bool isCancelling (BackgroundTask* 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() }; @@ -94,9 +111,9 @@ private: public: BackgroundManagerCanvas (BackgroundManager* pBkgdMgr = NULL); - +#if 0 void OnPaint (wxPaintEvent& event); - +#endif DECLARE_EVENT_TABLE() };