MainFrm.h 4.5 KB

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