EditCondition.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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_EDITCONDITION_H__64465BA2_AD81_4EFD_BAB4_93F66C90ECD1__INCLUDED_)
  19. #define AFX_EDITCONDITION_H__64465BA2_AD81_4EFD_BAB4_93F66C90ECD1__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // EditCondition.h : header file
  24. //
  25. class Condition;
  26. class SidesList;
  27. class CMyTreeCtrl : public CTreeCtrl
  28. {
  29. public:
  30. virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam );
  31. };
  32. /////////////////////////////////////////////////////////////////////////////
  33. // EditCondition dialog
  34. class EditCondition : public CDialog
  35. {
  36. // Construction
  37. public:
  38. EditCondition(CWnd* pParent = NULL); // standard constructor
  39. // Dialog Data
  40. //{{AFX_DATA(EditCondition)
  41. enum { IDD = IDD_ScriptCondition };
  42. // NOTE: the ClassWizard will add data members here
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(EditCondition)
  47. protected:
  48. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  49. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  50. //}}AFX_VIRTUAL
  51. // Implementation
  52. public:
  53. void setCondition(Condition *pCond) {m_condition = pCond;}
  54. protected:
  55. void formatConditionText(Int parmNdx);
  56. protected:
  57. Condition *m_condition;
  58. Bool m_updating;
  59. Bool m_modifiedTextColor;
  60. CRichEditCtrl m_myEditCtrl;
  61. CHARRANGE m_curLinkChrg;
  62. Int m_curEditParameter;
  63. CTreeCtrl m_conditionTreeView;
  64. protected:
  65. // Generated message map functions
  66. //{{AFX_MSG(EditCondition)
  67. virtual BOOL OnInitDialog();
  68. afx_msg void OnSelchangeConditionType();
  69. afx_msg void OnTimer(UINT nIDEvent);
  70. //}}AFX_MSG
  71. DECLARE_MESSAGE_MAP()
  72. };
  73. //{{AFX_INSERT_LOCATION}}
  74. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  75. #endif // !defined(AFX_EDITCONDITION_H__64465BA2_AD81_4EFD_BAB4_93F66C90ECD1__INCLUDED_)