-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainFrm.h
197 lines (179 loc) · 6.45 KB
/
MainFrm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/* Copyright (c) 2002-2012 Croteam Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as published by
the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#ifndef MAINFRAME_H
#define MAINFRAME_H 1
#define STATUS_LINE_PANE 0
#define EDITING_MODE_ICON_PANE 1
#define EDITING_MODE_PANE 2
#define GRID_PANE 3
#define POSITION_PANE 4
#define DOCK_UP 0
#define DOCK_DOWN 1
#define DOCK_LEFT 2
#define DOCK_RIGHT 3
// get pressed key buffer (keys 0-9)
extern INDEX TestKeyBuffers(void);
// macro used for writing text into status line
#define STATUS_LINE_MESASGE( message) if(theApp.m_bShowStatusInfo){\
CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd()); \
ASSERT( pMainFrame != NULL); \
pMainFrame->m_wndStatusBar.SetPaneText( STATUS_LINE_PANE, message, TRUE);};
class CMainFrame : public CMDIFrameWnd
{
DECLARE_DYNAMIC(CMainFrame)
public:
CMainFrame();
// Attributes
public:
// old window position and styles before full screen mode
WINDOWPLACEMENT m_OldPlacement;
LONG m_OldStyleEx;
LONG m_OldStyle;
// main menu
HMENU m_hMenu;
// Tool bars
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
CToolBar m_wndWorkTools;
CToolBar m_wndCSGTools;
CToolBar m_wndMipTools;
CToolBar m_wndProjections;
CToolBar m_wndSettingsAndUtility;
CToolBar m_wndShadowsAndTexture;
CToolBar m_wndSelectEntity;
CToolBar m_wndViewTools;
CToolBar m_wndViewTools2;
// CSG destination combo box
CCSGDesitnationCombo m_CSGDesitnationCombo;
// Triangularisation type combo box
CTriangularisationCombo m_TriangularisationCombo;
// Edit control for editing mip switch distance
CEditMipSwitchDistance m_ctrlEditMipSwitchDistance;
// Tool dialogs
CBrowser m_Browser;
CPropertyComboBar m_PropertyComboBar;
// mini frame used to hold property sheet with dialog pages
CInfoFrame *m_pInfoFrame;
CTFileName m_fnLastVirtualTree;
// color palette
CColorPaletteWnd *m_pColorPalette;
CToolTipWnd *m_pwndToolTip;
// Operations
public:
void DockControlBarRelativeTo(CControlBar* Bar,CControlBar* LeftOf,
ULONG ulDockDirection = DOCK_RIGHT);
BOOL OnIdle(LONG lCount);
// toggle info window
void ToggleInfoWindow();
// shows info window
void ShowInfoWindow();
// reset info window pos
void ResetInfoWindowPos();
// hides info window
void HideInfoWindow();
// startes application
void StartApplication( CTString strApplicationToRun);
// store or restore given virtual shortcut
void ApplyTreeShortcut( INDEX iVDirBuffer, BOOL bCtrl);
// call custom color picker at given coordinates
void CustomColorPicker( PIX pixX, PIX pixY);
void ManualToolTipOn( PIX pixManualX, PIX pixManualY);
void ManualToolTipUpdate( void);
void SetStatusBarMessage( CTString strMessage, INDEX iPane, FLOAT fTime);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL DestroyWindow();
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
public:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnVirtualTree();
afx_msg void OnClose();
afx_msg void OnCancelMode();
afx_msg void OnInitMenu(CMenu* pMenu);
afx_msg void OnViewInfowindow();
afx_msg void OnUpdateViewInfowindow(CCmdUI* pCmdUI);
afx_msg void OnViewCsgtools();
afx_msg void OnUpdateViewCsgtools(CCmdUI* pCmdUI);
afx_msg void OnViewProjectionsBar();
afx_msg void OnUpdateViewProjectionsBar(CCmdUI* pCmdUI);
afx_msg void OnViewWorkBar();
afx_msg void OnUpdateViewWorkBar(CCmdUI* pCmdUI);
afx_msg void OnActivateApp(BOOL bActive, Task_t hTask);
afx_msg void OnCreateTexture();
afx_msg void OnCallModeler();
afx_msg void OnCallTexmaker();
afx_msg void OnViewSettingsAndUtilityBar();
afx_msg void OnUpdateViewSettingsAndUtilityBar(CCmdUI* pCmdUI);
afx_msg void OnViewShadowsAndTextureBar();
afx_msg void OnUpdateViewShadowsAndTextureBar(CCmdUI* pCmdUI);
afx_msg void OnViewSelectEntityBar();
afx_msg void OnUpdateViewSelectEntityBar(CCmdUI* pCmdUI);
afx_msg void OnViewViewToolsBar();
afx_msg void OnUpdateViewViewToolsBar(CCmdUI* pCmdUI);
afx_msg void OnViewViewToolsBar2();
afx_msg void OnUpdateViewViewToolsBar2(CCmdUI* pCmdUI);
afx_msg void OnGameAudio();
afx_msg void OnGameVideo();
afx_msg void OnGamePlayer();
afx_msg void OnGameSelectPlayer();
afx_msg void OnShowTreeShortcuts();
afx_msg void OnMenuShortcut01();
afx_msg void OnMenuShortcut02();
afx_msg void OnMenuShortcut03();
afx_msg void OnMenuShortcut04();
afx_msg void OnMenuShortcut05();
afx_msg void OnMenuShortcut06();
afx_msg void OnMenuShortcut07();
afx_msg void OnMenuShortcut08();
afx_msg void OnMenuShortcut09();
afx_msg void OnMenuShortcut10();
afx_msg void OnStoreMenuShortcut01();
afx_msg void OnStoreMenuShortcut02();
afx_msg void OnStoreMenuShortcut03();
afx_msg void OnStoreMenuShortcut04();
afx_msg void OnStoreMenuShortcut05();
afx_msg void OnStoreMenuShortcut06();
afx_msg void OnStoreMenuShortcut07();
afx_msg void OnStoreMenuShortcut08();
afx_msg void OnStoreMenuShortcut09();
afx_msg void OnStoreMenuShortcut10();
afx_msg void OnConsole();
afx_msg void OnViewMipToolsBar();
afx_msg void OnUpdateViewMipToolsBar(CCmdUI* pCmdUI);
afx_msg void OnToolRecreateTexture();
afx_msg void OnRecreateCurrentTexture();
afx_msg void OnLightAnimation();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnHelpFinder();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#endif // MAINFRAME_H