r578: no message
[ctsim.git] / src / backgroundmgr.h
index 3a91537c8a6610071a84b0291e470ed874343bce..54bcd153c1b1ec331f06174d3a0f193a54f24d0f 100644 (file)
@@ -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.5 2001/02/23 21:58:31 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
@@ -63,25 +63,43 @@ private:
   BackgroundManagerCanvas* m_pCanvas;
   int m_iNumTasks;
 
-  typedef std::vector<BackgroundTask*> TaskContainer;
+  typedef std::vector<BackgroundSupervisor*> TaskContainer;
   typedef std::vector<wxGauge*>  GaugeContainer;
   typedef std::vector<std::string*> StringContainer;
+  typedef std::vector<int> PositionContainer;
+  typedef std::vector<wxStaticText*>  LabelContainer;
+  typedef std::vector<wxButton*> 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()
 };