ParameterInheritanceDialog.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. ** Command & Conquer Renegade(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_PARAMETERINHERITANCEDIALOG_H__86AADEF7_408C_11D4_A0A6_00104B791122__INCLUDED_)
  19. #define AFX_PARAMETERINHERITANCEDIALOG_H__86AADEF7_408C_11D4_A0A6_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. #include "vector.h"
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Forward declarations
  27. /////////////////////////////////////////////////////////////////////////////
  28. class PresetClass;
  29. class DefinitionClass;
  30. class DefinitionParameterClass;
  31. /////////////////////////////////////////////////////////////////////////////
  32. //
  33. // ParameterInheritanceDialogClass
  34. //
  35. /////////////////////////////////////////////////////////////////////////////
  36. class ParameterInheritanceDialogClass : public CDialog
  37. {
  38. // Construction
  39. public:
  40. ParameterInheritanceDialogClass (CWnd* pParent = NULL);
  41. // Dialog Data
  42. //{{AFX_DATA(ParameterInheritanceDialogClass)
  43. enum { IDD = IDD_PARAMETER_INHERITANCE };
  44. CListCtrl m_ListCtrl;
  45. CTreeCtrl m_TreeCtrl;
  46. //}}AFX_DATA
  47. // Overrides
  48. // ClassWizard generated virtual function overrides
  49. //{{AFX_VIRTUAL(ParameterInheritanceDialogClass)
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  52. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  53. //}}AFX_VIRTUAL
  54. // Implementation
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(ParameterInheritanceDialogClass)
  58. virtual BOOL OnInitDialog();
  59. afx_msg void OnDestroy();
  60. virtual void OnOK();
  61. afx_msg void OnDeleteitemParameterList(NMHDR* pNMHDR, LRESULT* pResult);
  62. //}}AFX_MSG
  63. DECLARE_MESSAGE_MAP()
  64. public:
  65. /////////////////////////////////////////////////////////////////////////////
  66. // Public methods
  67. /////////////////////////////////////////////////////////////////////////////
  68. void Set_Preset (PresetClass *preset) { m_Preset = preset; }
  69. private:
  70. /////////////////////////////////////////////////////////////////////////////
  71. // Private methods
  72. /////////////////////////////////////////////////////////////////////////////
  73. void Populate_Tree_Ctrl (void);
  74. void Add_Children_To_Tree (HTREEITEM parent_item, int parent_id);
  75. void Populate_List_Ctrl (void);
  76. void Add_Parameters_To_List (DefinitionClass *definition, DefinitionParameterClass *parent, int icon);
  77. void Update_List_Entry_Check (int index, bool checked);
  78. void Update_Tree_Entry_Check (HTREEITEM parent_item, bool checked);
  79. void Propagate_Changes (DefinitionClass *base_def, DefinitionClass *derived_def, DynamicVectorClass<DefinitionParameterClass *> &parameter_list);
  80. void Build_Parameter_List (DynamicVectorClass<DefinitionParameterClass *> &parameter_list);
  81. void Build_Preset_List (HTREEITEM parent_item, DynamicVectorClass<PresetClass *> &preset_list);
  82. /////////////////////////////////////////////////////////////////////////////
  83. // Private member data
  84. /////////////////////////////////////////////////////////////////////////////
  85. PresetClass * m_Preset;
  86. };
  87. //{{AFX_INSERT_LOCATION}}
  88. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  89. #endif // !defined(AFX_PARAMETERINHERITANCEDIALOG_H__86AADEF7_408C_11D4_A0A6_00104B791122__INCLUDED_)