r7061: initial property settings
[ctsim.git] / src / backgroundmgr.h
index 8aa185967a50c12b6f1efcd5c050d4ae34416746..cb738ce3be8fae87913e25d46cbab54eb6b09d2f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundmgr.h,v 1.10 2001/03/09 18:50:46 kevin Exp $
+**  $Id$
 **
 **  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
@@ -65,6 +65,9 @@ private:
 
   void resizeWindow();
   BackgroundManagerTask* lookupTask (BackgroundSupervisor* pSupervisor);
+  BackgroundManagerTask* lookupTask (int iButtonID);
+
+  static int s_iNextButtonID;
 
   wxSize m_sizeGauge;
   wxSize m_sizeLabel;
@@ -72,7 +75,7 @@ private:
   wxSize m_sizeBorder;
   wxSize m_sizeCellSpacing;
   wxSize m_sizeButton;
-
+  
 public:
   BackgroundManager ();
   ~BackgroundManager();
@@ -90,26 +93,29 @@ public:
 class BackgroundSupervisor;
 class BackgroundManagerTask {
 private:
-  const BackgroundSupervisor* m_pSupervisor;
+  BackgroundSupervisor* m_pSupervisor;
   const std::string m_strName;
   const int m_iPosition;
   wxGauge* m_pGauge;
   wxStaticText* m_pLabel;
   wxButton* m_pButton;
+  const int m_iButtonID;
 
 public:
   BackgroundManagerTask (BackgroundSupervisor* pSupervisor, const char* const pszName, int iPos,
-         wxGauge* pGauge, wxStaticText* pLabel, wxButton* pButton)
-         : m_pSupervisor(pSupervisor), m_strName(pszName), m_iPosition(iPos), m_pGauge(pGauge), m_pLabel(pLabel), m_pButton(pButton)
+         wxGauge* pGauge, wxStaticText* pLabel, wxButton* pButton, int iButtonID)
+         : m_pSupervisor(pSupervisor), m_strName(pszName), m_iPosition(iPos), m_pGauge(pGauge), 
+    m_pLabel(pLabel), m_pButton(pButton), m_iButtonID(iButtonID)
   {}
 
   int position() const {return m_iPosition;}
   const std::string& name() const {return m_strName;}
-  const BackgroundSupervisor* supervisor() const {return m_pSupervisor;}
+  BackgroundSupervisor* supervisor() {return m_pSupervisor;}
 
   wxGauge* gauge() {return m_pGauge;}
   wxStaticText* label() {return m_pLabel;}
   wxButton* button() {return m_pButton;}
+  int buttonID() const {return m_iButtonID;}
 };