home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / util / flyPlugin / Chooser.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-29  |  1.0 KB  |  53 lines

  1. // chooser.cpp : Implements the CDialogChooser class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "flyplugin.h"
  6.  
  7. #include "chooser.h"
  8. #include "cstm1dlg.h"
  9. #include "cstm2dlg.h"
  10. #include "cstm3dlg.h"
  11.  
  12. #ifdef _PSEUDO_DEBUG
  13. #undef THIS_FILE
  14. static char THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. CDialogChooser::CDialogChooser()
  18. {
  19.     m_pDlgs[0] = NULL;
  20.  
  21.     m_pDlgs[1] = new CCustom1Dlg;
  22.     m_pDlgs[2] = new CCustom2Dlg;
  23.     m_pDlgs[3] = new CCustom3Dlg;
  24.  
  25.     m_nCurrDlg = 0;
  26. }
  27. CDialogChooser::~CDialogChooser()
  28. {
  29.     for (int i = FIRST_CUSTOM_STEP; i <= LAST_CUSTOM_STEP; i++)
  30.     {
  31.         ASSERT(m_pDlgs[i] != NULL);
  32.         delete m_pDlgs[i];
  33.     }
  34. }
  35.  
  36. CAppWizStepDlg* CDialogChooser::Next(CAppWizStepDlg* pDlg)
  37. {
  38.     ASSERT(0 <= m_nCurrDlg && m_nCurrDlg < LAST_DLG);
  39.     ASSERT(pDlg == m_pDlgs[m_nCurrDlg]);
  40.  
  41.     m_nCurrDlg++;
  42.     return m_pDlgs[m_nCurrDlg];
  43. }
  44.  
  45. CAppWizStepDlg* CDialogChooser::Back(CAppWizStepDlg* pDlg)
  46. {
  47.     ASSERT(1 <= m_nCurrDlg && m_nCurrDlg <= LAST_DLG);
  48.     ASSERT(pDlg == m_pDlgs[m_nCurrDlg]);
  49.  
  50.     m_nCurrDlg--;
  51.     return m_pDlgs[m_nCurrDlg];
  52. }
  53.