MainFrm.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. // MainFrm.h : interface of the CMainFrame class
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #if !defined(AFX_MAINFRM_H__371EC7AB_29D3_11D5_8CE0_00010297BBAC__INCLUDED_)
  22. #define AFX_MAINFRM_H__371EC7AB_29D3_11D5_8CE0_00010297BBAC__INCLUDED_
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. #include "lib/BaseType.h"
  27. #include "MyToolbar.h"
  28. #include "BrushOptions.h"
  29. #include "FeatherOptions.h"
  30. #include "CellWidth.h"
  31. #include "TerrainMaterial.h"
  32. #include "BlendMaterial.h"
  33. #include "MoundOptions.h"
  34. #include "ObjectOptions.h"
  35. #include "FenceOptions.h"
  36. #include "RoadOptions.h"
  37. #include "ContourOptions.h"
  38. #include "MeshMoldOptions.h"
  39. #include "WaypointOptions.h"
  40. #include "WaterOptions.h"
  41. #include "LightOptions.h"
  42. #include "MapObjectProps.h"
  43. #include "GroveOptions.h"
  44. #include "RampOptions.h"
  45. #include "GlobalLightOptions.h"
  46. #include "CameraOptions.h"
  47. #include "ScorchOptions.h"
  48. #include "BuildList.h"
  49. #include "RulerOptions.h"
  50. #define TWO_D_WINDOW_SECTION "TwoDWindow"
  51. #define MAIN_FRAME_SECTION "MainFrame"
  52. class LayersList;
  53. class ScriptDialog;
  54. class CMainFrame : public CFrameWnd
  55. {
  56. DECLARE_DYNAMIC(CMainFrame)
  57. public:
  58. CMainFrame();
  59. // Attributes
  60. public:
  61. // Operations
  62. public:
  63. // Overrides
  64. // ClassWizard generated virtual function overrides
  65. //{{AFX_VIRTUAL(CMainFrame)
  66. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  67. //}}AFX_VIRTUAL
  68. // Implementation
  69. public:
  70. virtual ~CMainFrame();
  71. #ifdef _DEBUG
  72. virtual void AssertValid() const;
  73. virtual void Dump(CDumpContext& dc) const;
  74. #endif
  75. static CMainFrame *GetMainFrame() { return TheMainFrame; }
  76. void showOptionsDialog(Int dialogID);
  77. void OnEditGloballightoptions();
  78. void ResetWindowPositions(void);
  79. void adjustWindowSize(void);
  80. Bool isAutoSaving(void) {return m_autoSaving;};
  81. void handleCameraChange(void);
  82. void onEditScripts();
  83. protected: // control bar embedded members
  84. CStatusBar m_wndStatusBar;
  85. CToolBar m_wndToolBar;
  86. CToolBar m_floatingToolBar;
  87. BrushOptions m_brushOptions;
  88. TerrainMaterial m_terrainMaterial;
  89. BlendMaterial m_blendMaterial;
  90. ObjectOptions m_objectOptions;
  91. FenceOptions m_fenceOptions;
  92. MapObjectProps m_mapObjectProps;
  93. MoundOptions m_moundOptions;
  94. RoadOptions m_roadOptions;
  95. FeatherOptions m_featherOptions;
  96. MeshMoldOptions m_meshMoldOptions;
  97. WaypointOptions m_waypointOptions;
  98. WaterOptions m_waterOptions;
  99. LightOptions m_lightOptions;
  100. BuildList m_buildListOptions;
  101. GroveOptions m_groveOptions;
  102. RampOptions m_rampOptions;
  103. ScorchOptions m_scorchOptions;
  104. COptionsPanel m_noOptions;
  105. GlobalLightOptions m_globalLightOptions;
  106. CameraOptions m_cameraOptions;
  107. LayersList* m_layersList;
  108. ScriptDialog* m_scriptDialog;
  109. RulerOptions m_rulerOptions;
  110. CWnd *m_curOptions;
  111. Int m_curOptionsX;
  112. Int m_curOptionsY;
  113. Int m_optionsPanelWidth;
  114. Int m_optionsPanelHeight;
  115. Int m_globalLightOptionsWidth;
  116. Int m_globalLightOptionsHeight;
  117. Int m_3dViewWidth;
  118. Bool m_autoSaving; ///< True if we are autosaving.
  119. UINT m_hAutoSaveTimer; ///< Timer that triggers for autosave.
  120. Bool m_autoSave; ///< If true, then do autosaves.
  121. Int m_autoSaveInterval; ///< Time between autosaves in seconds.
  122. static CMainFrame *TheMainFrame;
  123. // Generated message map functions
  124. protected:
  125. //{{AFX_MSG(CMainFrame)
  126. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  127. afx_msg void OnMove(int x, int y);
  128. afx_msg void OnViewBrushfeedback();
  129. afx_msg void OnUpdateViewBrushfeedback(CCmdUI* pCmdUI);
  130. afx_msg void OnDestroy();
  131. afx_msg void OnTimer(UINT nIDEvent);
  132. afx_msg void OnEditCameraoptions();
  133. //}}AFX_MSG
  134. DECLARE_MESSAGE_MAP()
  135. };
  136. /////////////////////////////////////////////////////////////////////////////
  137. //{{AFX_INSERT_LOCATION}}
  138. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  139. #endif // !defined(AFX_MAINFRM_H__371EC7AB_29D3_11D5_8CE0_00010297BBAC__INCLUDED_)