MainDialogBar.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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_MAINDIALOGBAR_H__89F1AFD5_6F98_11D3_A05A_00104B791122__INCLUDED_)
  19. #define AFX_MAINDIALOGBAR_H__89F1AFD5_6F98_11D3_A05A_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. #include "editorbuild.h"
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Forward declarations
  27. /////////////////////////////////////////////////////////////////////////////
  28. class DockableFormClass;
  29. class PresetsFormClass;
  30. class InstancesPageClass;
  31. class OverlapPageClass;
  32. class ConversationPageClass;
  33. class HeightfieldPageClass;
  34. /////////////////////////////////////////////////////////////////////////////
  35. //
  36. // MainDialogBarClass dialog
  37. //
  38. /////////////////////////////////////////////////////////////////////////////
  39. class MainDialogBarClass : public CDialogBar
  40. {
  41. // Construction
  42. public:
  43. MainDialogBarClass (void);
  44. ~MainDialogBarClass (void);
  45. // Dialog Data
  46. //{{AFX_DATA(MainDialogBarClass)
  47. enum { IDD = IDD_NEW_LIBRARY };
  48. CTabCtrl m_TabCtrl;
  49. //}}AFX_DATA
  50. // Overrides
  51. // ClassWizard generated virtual function overrides
  52. //{{AFX_VIRTUAL(MainDialogBarClass)
  53. public:
  54. virtual BOOL PreTranslateMessage(MSG* pMsg);
  55. protected:
  56. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  57. //}}AFX_VIRTUAL
  58. // Implementation
  59. protected:
  60. // Generated message map functions
  61. //{{AFX_MSG(MainDialogBarClass)
  62. virtual BOOL OnInitDialog();
  63. afx_msg void OnSize(UINT nType, int cx, int cy);
  64. afx_msg void OnSelchangeLibraryTab(NMHDR* pNMHDR, LRESULT* pResult);
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. enum
  68. {
  69. TAB_GLOBAL = 0,
  70. TAB_INSTANCES,
  71. TAB_CONVERSATION,
  72. TAB_OVERLAP,
  73. //#ifndef PUBLIC_EDITOR_VER (gth) go ahead and give the heightfield away!
  74. TAB_HEIGHTFIELD,
  75. //#endif
  76. TAB_COUNT
  77. } TAB_INFO;
  78. public:
  79. ///////////////////////////////////////////////////////////
  80. // Public methods
  81. ///////////////////////////////////////////////////////////
  82. BOOL Create (CWnd *parent_wnd, UINT style, UINT id);
  83. void Initialize (void);
  84. PresetsFormClass * Get_Presets_Form (void) { return (PresetsFormClass *)m_pTabs[TAB_GLOBAL]; }
  85. InstancesPageClass * Get_Instances_Form (void) { return (InstancesPageClass *)m_pTabs[TAB_INSTANCES]; }
  86. OverlapPageClass * Get_Overlap_Form (void) { return (OverlapPageClass *)m_pTabs[TAB_OVERLAP]; }
  87. private:
  88. ///////////////////////////////////////////////////////////
  89. // Private member data
  90. ///////////////////////////////////////////////////////////
  91. CDialog *m_pTabs[TAB_COUNT];
  92. int m_iCurrentTab;
  93. };
  94. inline BOOL
  95. MainDialogBarClass::Create (CWnd *parent_wnd, UINT style, UINT id)
  96. {
  97. BOOL retval = CDialogBar::Create (parent_wnd, MainDialogBarClass::IDD, style, id);
  98. Initialize ();
  99. return retval;
  100. }
  101. //{{AFX_INSERT_LOCATION}}
  102. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  103. #endif // !defined(AFX_MAINDIALOGBAR_H__89F1AFD5_6F98_11D3_A05A_00104B791122__INCLUDED_)