ChildFrm.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // ChildFrm.h : interface of the CChildFrame class
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15. #ifndef CHILDFRAME_H
  16. #define CHILDFRAME_H 1
  17. class CChildFrame : public CMDIChildWnd
  18. {
  19. DECLARE_DYNCREATE(CChildFrame)
  20. public:
  21. CChildFrame();
  22. // Attributes
  23. protected:
  24. CSplitterWnd m_wndSplitter;
  25. public:
  26. BOOL m_bDisableVisibilityTweaks;
  27. BOOL m_bShowVisibilityTweaks;
  28. BOOL m_bTestGameOn;
  29. CPlacement3D wo_plStored01;
  30. CPlacement3D wo_plStored02;
  31. CPlacement3D wo_plStored03;
  32. CPlacement3D wo_plStored04;
  33. FLOAT wo_fStored01;
  34. FLOAT wo_fStored02;
  35. FLOAT wo_fStored03;
  36. FLOAT wo_fStored04;
  37. BOOL m_bShowTargets;
  38. BOOL m_bShowEntityNames;
  39. LONG m_OldStyleEx;
  40. LONG m_OldStyle;
  41. BOOL m_bShadowsVisible;
  42. BOOL m_bShadowsCalculate;
  43. BOOL m_bViewFromEntity;
  44. BOOL m_bSelectionVisible; // if selection should be visible
  45. BOOL m_bLastAutoMipBrushingOn;
  46. BOOL m_bAutoMipBrushingOn;
  47. FLOAT m_fManualMipBrushingFactor;
  48. BOOL m_bAncoredMovingAllowed;
  49. UINT m_iAnchoredResetTimerID;
  50. BOOL m_bSceneRenderingTime;
  51. BOOL m_bInfoVisible;
  52. BOOL m_bRenderViewPictures;
  53. CMasterViewer m_mvViewer; // master viewer for all views inside this frame
  54. // grid on/off flag
  55. BOOL m_bGridOn;
  56. // selected configuration
  57. INDEX m_iSelectedConfiguration;
  58. CWorldRenderPrefs::ShadowsType m_stShadowType;
  59. // Operations
  60. public:
  61. // called from view
  62. void KeyPressed(UINT nChar, UINT nRepCnt, UINT nFlags);
  63. void RememberChildConfiguration( INDEX iViewConfiguration);
  64. void SetChildConfiguration( INDEX iViewConfiguration);
  65. void ApplySettingsFromPerspectiveView( CWorldEditorView *pwedView, INDEX iViewConfiguration);
  66. void DeleteViewsExcept( CWnd *pwndViewToLeave);
  67. inline INDEX CChildFrame::GetHSplitters(void) { return m_wndSplitter.GetColumnCount();}
  68. inline INDEX CChildFrame::GetVSplitters(void) { return m_wndSplitter.GetRowCount();}
  69. CWorldEditorView *GetPerspectiveView(void);
  70. void TestGame( BOOL bFullScreen);
  71. // Overrides
  72. // ClassWizard generated virtual function overrides
  73. //{{AFX_VIRTUAL(CChildFrame)
  74. public:
  75. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  76. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  77. virtual void ActivateFrame(int nCmdShow = -1);
  78. //}}AFX_VIRTUAL
  79. // Implementation
  80. public:
  81. virtual ~CChildFrame();
  82. #ifdef _DEBUG
  83. virtual void AssertValid() const;
  84. virtual void Dump(CDumpContext& dc) const;
  85. #endif
  86. // Generated message map functions
  87. public:
  88. //{{AFX_MSG(CChildFrame)
  89. afx_msg void OnGridOnOff();
  90. afx_msg void OnUpdateGridOnOff(CCmdUI* pCmdUI);
  91. afx_msg void OnTestGameWindowed();
  92. afx_msg void OnTestGameFullScreen();
  93. afx_msg void OnUpdateTestGame(CCmdUI* pCmdUI);
  94. afx_msg void OnRenderTargets();
  95. afx_msg void OnUpdateRenderTargets(CCmdUI* pCmdUI);
  96. afx_msg void OnMoveAnchored();
  97. afx_msg void OnUpdateMoveAnchored(CCmdUI* pCmdUI);
  98. afx_msg void OnTimer(UINT nIDEvent);
  99. afx_msg void OnSceneRenderingTime();
  100. afx_msg void OnUpdateSceneRenderingTime(CCmdUI* pCmdUI);
  101. afx_msg void OnAutoMipLeveling();
  102. afx_msg void OnUpdateAutoMipLeveling(CCmdUI* pCmdUI);
  103. afx_msg void OnWindowClose();
  104. afx_msg void OnViewSelection();
  105. afx_msg void OnUpdateViewSelection(CCmdUI* pCmdUI);
  106. afx_msg void OnMaximizeView();
  107. afx_msg void OnToggleViewPictures();
  108. afx_msg void OnUpdateToggleViewPictures(CCmdUI* pCmdUI);
  109. afx_msg void OnViewFromEntity();
  110. afx_msg void OnUpdateViewFromEntity(CCmdUI* pCmdUI);
  111. afx_msg void OnViewShadowsOnoff();
  112. afx_msg void OnCalculateShadowsOnoff();
  113. afx_msg void OnUpdateViewShadowsOnoff(CCmdUI* pCmdUI);
  114. afx_msg void OnUpdateCalculateShadowsOnoff(CCmdUI* pCmdUI);
  115. afx_msg void OnStorePosition01();
  116. afx_msg void OnStorePosition02();
  117. afx_msg void OnRestorePosition01();
  118. afx_msg void OnRestorePosition02();
  119. afx_msg void OnToggleEntityNames();
  120. afx_msg void OnUpdateToggleEntityNames(CCmdUI* pCmdUI);
  121. afx_msg void OnToggleVisibilityTweaks();
  122. afx_msg void OnUpdateToggleVisibilityTweaks(CCmdUI* pCmdUI);
  123. afx_msg void OnEnableVisibilityTweaks();
  124. afx_msg void OnUpdateEnableVisibilityTweaks(CCmdUI* pCmdUI);
  125. afx_msg void OnRestorePosition03();
  126. afx_msg void OnRestorePosition04();
  127. afx_msg void OnStorePosition03();
  128. afx_msg void OnStorePosition04();
  129. afx_msg void OnKeyB();
  130. afx_msg void OnUpdateKeyB(CCmdUI* pCmdUI);
  131. afx_msg void OnKeyG();
  132. afx_msg void OnUpdateKeyG(CCmdUI* pCmdUI);
  133. afx_msg void OnKeyY();
  134. afx_msg void OnUpdateKeyY(CCmdUI* pCmdUI);
  135. afx_msg void OnKeyCtrlG();
  136. afx_msg void OnUpdateKeyCtrlG(CCmdUI* pCmdUI);
  137. //}}AFX_MSG
  138. DECLARE_MESSAGE_MAP()
  139. };
  140. /////////////////////////////////////////////////////////////////////////////
  141. #endif // CHILDFRAME_H