ScriptConditions.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_ScriptConditionsDlg_H__EEFDFF65_2440_4AFE_B5D6_9E887C8C2DED__INCLUDED_)
  19. #define AFX_ScriptConditionsDlg_H__EEFDFF65_2440_4AFE_B5D6_9E887C8C2DED__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // ScriptConditionsDlg.h : header file
  24. //
  25. class Script;
  26. class OrCondition;
  27. class Condition;
  28. class SidesList;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // ScriptConditionsDlg dialog
  31. class ScriptConditionsDlg : public CPropertyPage
  32. {
  33. DECLARE_DYNCREATE(ScriptConditionsDlg)
  34. // Construction
  35. public:
  36. ScriptConditionsDlg();
  37. ~ScriptConditionsDlg();
  38. // Dialog Data
  39. //{{AFX_DATA(ScriptConditionsDlg)
  40. enum { IDD = IDD_ScriptConditions };
  41. // NOTE - ClassWizard will add data members here.
  42. // DO NOT EDIT what you see in these blocks of generated code !
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generate virtual function overrides
  46. //{{AFX_VIRTUAL(ScriptConditionsDlg)
  47. protected:
  48. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. public:
  52. void setScript(Script *pScript) {m_script = pScript;}
  53. protected:
  54. Script *m_script; // Doesn't change.
  55. OrCondition *m_orCondition; // Currently selected OR clause.
  56. Condition *m_condition; // Currently selected condition.
  57. Int m_index; // Index of whatever is currently selected.
  58. protected:
  59. void enableUI(void);
  60. void loadList(void);
  61. Int doMoveUp( OrCondition **outWhichNow );
  62. Int doMoveDown( OrCondition **outWhichNow );
  63. void setSel(OrCondition *pOr, Condition *pCond);
  64. protected:
  65. // Generated message map functions
  66. //{{AFX_MSG(ScriptConditionsDlg)
  67. virtual BOOL OnInitDialog();
  68. afx_msg void OnEditCondition();
  69. afx_msg void OnSelchangeConditionList();
  70. afx_msg void OnDblclkConditionList();
  71. afx_msg void OnOr();
  72. afx_msg void OnNew();
  73. afx_msg void OnDelete();
  74. afx_msg void OnCopy();
  75. afx_msg void OnMoveDown();
  76. afx_msg void OnMoveUp();
  77. afx_msg void OnChangeEditComment();
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_ScriptConditionsDlg_H__EEFDFF65_2440_4AFE_B5D6_9E887C8C2DED__INCLUDED_)