2 ===========================================================================
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
26 ===========================================================================
29 #if !defined(AFX_MAINFRM_H__330BBF0A_731C_11D1_B539_00AA00A410FC__INCLUDED_)
30 #define AFX_MAINFRM_H__330BBF0A_731C_11D1_B539_00AA00A410FC__INCLUDED_
34 #endif // _MSC_VER >= 1000
37 #include "NewTexWnd.h"
40 #include "TextureBar.h"
43 const int RAD_SHIFT = 0x01;
44 const int RAD_ALT = 0x02;
45 const int RAD_CONTROL = 0x04;
46 const int RAD_PRESS = 0x08;
52 unsigned int m_nModifiers;
53 unsigned int m_nCommand;
59 unsigned int m_nVKKey;
65 class CMainFrame : public CFrameWnd
67 DECLARE_DYNAMIC(CMainFrame)
70 void HandleKey(UINT nChar, UINT nRepCnt, UINT nFlags, bool bDown = true)
73 OnKeyDown(nChar, nRepCnt, nFlags);
75 OnKeyUp(nChar, nRepCnt, nFlags);
85 // ClassWizard generated virtual function overrides
86 //{{AFX_VIRTUAL(CMainFrame)
88 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
89 virtual BOOL PreTranslateMessage(MSG* pMsg);
91 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
92 virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
93 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
94 virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
99 void UpdatePatchToolbarButtons();
100 void NudgeSelection(int nDirection, float fAmount);
101 void UpdateTextureBar();
102 void SetButtonMenuStates();
103 void SetTexValStatus();
104 void SetGridStatus();
105 void RoutineProcessing();
107 void UpdateWindows(int nBits);
108 void SetStatusText(int nPane, const char* pText);
109 void UpdateStatusText();
110 void SetWindowStyle(int nStyle);
114 idCurve_NURBS<idVec2> *GetNurb() {
117 void OnPrecisionCursorCycle();
119 virtual ~CMainFrame();
120 CXYWnd* GetXYWnd() {return m_pXYWnd;};
121 CXYWnd* GetXZWnd() {return m_pXZWnd;};
122 CXYWnd* GetYZWnd() {return m_pYZWnd;};
123 CCamWnd* GetCamera() {return m_pCamWnd;};
124 CZWnd* GetZWnd() {return m_pZWnd;};
126 void SetActiveXY(CXYWnd* p)
129 m_pActiveXY->SetActive(false);
133 m_pActiveXY->SetActive(true);
138 virtual void AssertValid() const;
139 virtual void Dump(CDumpContext& dc) const;
142 protected: // control bar embedded members
143 CStatusBar m_wndStatusBar;
144 CToolBar m_wndToolBar;
145 CTextureBar m_wndTextureBar;
146 CSplitterWnd m_wndSplit;
147 CSplitterWnd m_wndSplit2;
148 CSplitterWnd m_wndSplit3;
154 CString m_strStatus[15];
159 idCurve_NURBS<idVec2> nurb;
160 // Generated message map functions
163 void CreateQEChildren();
164 void LoadCommandMap();
165 void SaveCommandMap();
166 void ShowMenuItemKeyBindings(CMenu *pMenu);
167 void SetEntityCheck();
168 void SetGridChecks(int nID);
170 void Nudge(int nDim, float fNudge);
171 void SetBusy(bool b) {
176 // these are public so i can easily reflect messages
177 // from child windows..
178 //{{AFX_MSG(CMainFrame)
179 afx_msg void OnBSPStatus(UINT wParam, long lParam);
180 afx_msg void OnBSPDone(UINT wParam, long lParam);
181 afx_msg void OnParentNotify(UINT message, LPARAM lParam);
182 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
183 afx_msg void OnTimer(UINT nIDEvent);
184 afx_msg void OnDestroy();
185 afx_msg void OnClose();
186 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
187 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
188 afx_msg void OnSize(UINT nType, int cx, int cy);
189 afx_msg void ToggleCamera();
190 afx_msg void OnFileClose();
191 afx_msg void OnFileExit();
192 afx_msg void OnFileLoadproject();
193 afx_msg void OnFileNew();
194 afx_msg void OnFileOpen();
195 afx_msg void OnFilePointfile();
196 afx_msg void OnFilePrint();
197 afx_msg void OnFilePrintPreview();
198 afx_msg void OnFileSave();
199 afx_msg void OnFileSaveas();
200 afx_msg void OnFileSaveCopy();
201 afx_msg void OnViewShowModels();
202 afx_msg void OnView100();
203 afx_msg void OnViewCenter();
204 afx_msg void OnViewConsole();
205 afx_msg void OnViewDownfloor();
206 afx_msg void OnViewEntity();
207 afx_msg void OnViewMediaBrowser();
208 afx_msg void OnViewFront();
209 afx_msg void OnViewShowblocks();
210 afx_msg void OnViewShowclip();
211 afx_msg void OnViewShowTriggers();
212 afx_msg void OnViewShowcoordinates();
213 afx_msg void OnViewShowent();
214 afx_msg void OnViewShowlights();
215 afx_msg void OnViewShownames();
216 afx_msg void OnViewShowpath();
217 afx_msg void OnViewShowCombatNodes();
218 afx_msg void OnViewShowwater();
219 afx_msg void OnViewShowworld();
220 afx_msg void OnViewTexture();
221 afx_msg void OnViewUpfloor();
222 afx_msg void OnViewXy();
223 afx_msg void OnViewZ100();
224 afx_msg void OnViewZoomin();
225 afx_msg void OnViewZoomout();
226 afx_msg void OnViewZzoomin();
227 afx_msg void OnViewZzoomout();
228 afx_msg void OnViewSide();
229 afx_msg void OnTexturesShowinuse();
230 afx_msg void OnTexturesInspector();
231 afx_msg void OnMiscFindbrush();
232 afx_msg void OnMiscGamma();
233 afx_msg void OnMiscNextleakspot();
234 afx_msg void OnMiscPreviousleakspot();
235 afx_msg void OnMiscPrintxy();
236 afx_msg void OnMiscSelectentitycolor();
237 afx_msg void OnMiscFindOrReplaceEntity();
238 afx_msg void OnMiscFindNextEntity();
239 afx_msg void OnMiscSetViewPos();
240 afx_msg void OnTexturebk();
241 afx_msg void OnColorsMajor();
242 afx_msg void OnColorsMinor();
243 afx_msg void OnColorsXybk();
244 afx_msg void OnBrush3sided();
245 afx_msg void OnBrush4sided();
246 afx_msg void OnBrush5sided();
247 afx_msg void OnBrush6sided();
248 afx_msg void OnBrush7sided();
249 afx_msg void OnBrush8sided();
250 afx_msg void OnBrush9sided();
251 afx_msg void OnBrushArbitrarysided();
252 afx_msg void OnBrushFlipx();
253 afx_msg void OnBrushFlipy();
254 afx_msg void OnBrushFlipz();
255 afx_msg void OnBrushRotatex();
256 afx_msg void OnBrushRotatey();
257 afx_msg void OnBrushRotatez();
258 afx_msg void OnRegionOff();
259 afx_msg void OnRegionSetbrush();
260 afx_msg void OnRegionSetselection();
261 afx_msg void OnRegionSettallbrush();
262 afx_msg void OnRegionSetxy();
263 afx_msg void OnSelectionArbitraryrotation();
264 afx_msg void OnSelectionClone();
265 afx_msg void OnSelectionConnect();
266 afx_msg void OnSelectionCsgsubtract();
267 afx_msg void OnSelectionCsgmerge();
268 afx_msg void OnSelectionDelete();
269 afx_msg void OnSelectionDeselect();
270 afx_msg void OnSelectionDragedges();
271 afx_msg void OnSelectionDragvertecies();
272 afx_msg void OnSelectionCenterOrigin();
273 afx_msg void OnSelectionMakehollow();
274 afx_msg void OnSelectionSelectcompletetall();
275 afx_msg void OnSelectionSelectinside();
276 afx_msg void OnSelectionSelectpartialtall();
277 afx_msg void OnSelectionSelecttouching();
278 afx_msg void OnSelectionUngroupentity();
279 afx_msg void OnSelectionWireFrameOn();
280 afx_msg void OnSelectionWireFrameOff();
281 afx_msg void OnSelectionVisibleOn();
282 afx_msg void OnSelectionVisibleOff();
283 afx_msg void OnAutocaulk();
284 afx_msg void OnUpdateAutocaulk(CCmdUI* pCmdUI);
286 afx_msg void OnTexturesPopup();
287 afx_msg void OnSplinesPopup();
288 afx_msg void OnSplinesEditPoints();
289 afx_msg void OnSplinesAddPoints();
290 afx_msg void OnSplinesDeletePoint();
291 afx_msg void OnSplinesInsertPoint();
292 afx_msg void OnPopupSelection();
293 afx_msg void OnViewChange();
294 afx_msg void OnViewCameraupdate();
295 afx_msg void OnUpdateViewCameraupdate(CCmdUI* pCmdUI);
296 afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
297 afx_msg void OnHelpAbout();
298 afx_msg void OnViewClipper();
299 afx_msg void OnCameraAngledown();
300 afx_msg void OnCameraAngleup();
301 afx_msg void OnCameraBack();
302 afx_msg void OnCameraDown();
303 afx_msg void OnCameraForward();
304 afx_msg void OnCameraLeft();
305 afx_msg void OnCameraRight();
306 afx_msg void OnCameraStrafeleft();
307 afx_msg void OnCameraStraferight();
308 afx_msg void OnCameraUp();
309 afx_msg void OnGridToggle();
310 afx_msg void OnPrefs();
311 afx_msg void OnToggleToolbar();
312 afx_msg void OnToggleTextureBar();
313 afx_msg void OnTogglecamera();
314 afx_msg void OnToggleview();
315 afx_msg void OnTogglez();
316 afx_msg void OnToggleLock();
317 afx_msg void OnEditMapinfo();
318 afx_msg void OnEditEntityinfo();
319 afx_msg void OnViewNextview();
320 afx_msg void OnHelpCommandlist();
321 afx_msg void OnFileNewproject();
322 afx_msg void OnFlipClip();
323 afx_msg void OnClipSelected();
324 afx_msg void OnSplitSelected();
325 afx_msg void OnToggleviewXz();
326 afx_msg void OnToggleviewYz();
327 afx_msg void OnColorsBrush();
328 afx_msg void OnColorsClipper();
329 afx_msg void OnColorsGridtext();
330 afx_msg void OnColorsSelectedbrush();
331 afx_msg void OnColorsGridblock();
332 afx_msg void OnColorsViewname();
333 afx_msg void OnColorSetoriginal();
334 afx_msg void OnColorSetqer();
335 afx_msg void OnColorSetblack();
336 afx_msg void OnColorSetSuperMal();
337 afx_msg void OnColorSetMax();
338 afx_msg void OnSnaptogrid();
339 afx_msg void OnSelectScale();
340 afx_msg void OnSelectMouserotate();
341 afx_msg void OnEditCopybrush();
342 afx_msg void OnEditPastebrush();
343 afx_msg void OnEditUndo();
344 afx_msg void OnEditRedo();
345 afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
346 afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
347 afx_msg void OnSelectionInvert();
348 afx_msg void OnSelectionTextureDec();
349 afx_msg void OnSelectionTextureFit();
350 afx_msg void OnSelectionTextureInc();
351 afx_msg void OnSelectionTextureRotateclock();
352 afx_msg void OnSelectionTextureRotatecounter();
353 afx_msg void OnSelectionTextureScaledown();
354 afx_msg void OnSelectionTextureScaleup();
355 afx_msg void OnSelectionTextureShiftdown();
356 afx_msg void OnSelectionTextureShiftleft();
357 afx_msg void OnSelectionTextureShiftright();
358 afx_msg void OnSelectionTextureShiftup();
359 afx_msg void OnGridNext();
360 afx_msg void OnGridPrev();
361 afx_msg void OnSelectionTextureScaleLeft();
362 afx_msg void OnSelectionTextureScaleRight();
363 afx_msg void OnTextureReplaceall();
364 afx_msg void OnScalelockx();
365 afx_msg void OnScalelocky();
366 afx_msg void OnScalelockz();
367 afx_msg void OnSelectMousescale();
368 afx_msg void OnViewCubicclipping();
369 afx_msg void OnFileImport();
370 afx_msg void OnFileProjectsettings();
371 afx_msg void OnUpdateFileImport(CCmdUI* pCmdUI);
372 afx_msg void OnViewCubein();
373 afx_msg void OnViewCubeout();
374 afx_msg void OnFileSaveregion();
375 afx_msg void OnUpdateFileSaveregion(CCmdUI* pCmdUI);
376 afx_msg void OnSelectionMovedown();
377 afx_msg void OnSelectionMoveup();
378 afx_msg void OnToolbarMain();
379 afx_msg void OnToolbarTexture();
380 afx_msg void OnSelectionPrint();
381 afx_msg void OnSelectionTogglesizepaint();
382 afx_msg void OnBrushMakecone();
383 afx_msg void OnTexturesLoad();
384 afx_msg void OnToggleRotatelock();
385 afx_msg void OnCurveBevel();
386 afx_msg void OnCurveIncreaseVert();
387 afx_msg void OnCurveDecreaseVert();
388 afx_msg void OnCurveIncreaseHorz();
389 afx_msg void OnCurveDecreaseHorz();
390 afx_msg void OnCurveCylinder();
391 afx_msg void OnCurveEighthsphere();
392 afx_msg void OnCurveEndcap();
393 afx_msg void OnCurveHemisphere();
394 afx_msg void OnCurveInvertcurve();
395 afx_msg void OnCurveQuarter();
396 afx_msg void OnCurveSphere();
397 afx_msg void OnFileImportmap();
398 afx_msg void OnFileExportmap();
399 afx_msg void OnEditLoadprefab();
400 afx_msg void OnViewShowcurves();
401 afx_msg void OnSelectionSelectNudgedown();
402 afx_msg void OnSelectionSelectNudgeleft();
403 afx_msg void OnSelectionSelectNudgeright();
404 afx_msg void OnSelectionSelectNudgeup();
405 afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
406 afx_msg void OnTexturesLoadlist();
407 afx_msg void OnDontselectcurve();
408 afx_msg void OnDynamicLighting();
409 afx_msg void OnCurveSimplepatchmesh();
410 afx_msg void OnPatchToggleBox();
411 afx_msg void OnPatchWireframe();
412 afx_msg void OnCurvePatchcone();
413 afx_msg void OnCurvePatchtube();
414 afx_msg void OnPatchWeld();
415 afx_msg void OnCurvePatchbevel();
416 afx_msg void OnCurvePatchendcap();
417 afx_msg void OnCurvePatchinvertedbevel();
418 afx_msg void OnCurvePatchinvertedendcap();
419 afx_msg void OnPatchDrilldown();
420 afx_msg void OnCurveInsertcolumn();
421 afx_msg void OnCurveInsertrow();
422 afx_msg void OnCurveDeletecolumn();
423 afx_msg void OnCurveDeleterow();
424 afx_msg void OnCurveInsertAddcolumn();
425 afx_msg void OnCurveInsertAddrow();
426 afx_msg void OnCurveInsertInsertcolumn();
427 afx_msg void OnCurveInsertInsertrow();
428 afx_msg void OnCurveNegative();
429 afx_msg void OnCurveNegativeTextureX();
430 afx_msg void OnCurveNegativeTextureY();
431 afx_msg void OnCurveDeleteFirstcolumn();
432 afx_msg void OnCurveDeleteFirstrow();
433 afx_msg void OnCurveDeleteLastcolumn();
434 afx_msg void OnCurveDeleteLastrow();
435 afx_msg void OnPatchBend();
436 afx_msg void OnPatchInsdel();
437 afx_msg void OnPatchEnter();
438 afx_msg void OnPatchTab();
439 afx_msg void OnCurvePatchdensetube();
440 afx_msg void OnCurvePatchverydensetube();
441 afx_msg void OnCurveCap();
442 afx_msg void OnCurveCapInvertedbevel();
443 afx_msg void OnCurveCapInvertedendcap();
444 afx_msg void OnCurveRedisperseCols();
445 afx_msg void OnCurveRedisperseRows();
446 afx_msg void OnPatchNaturalize();
447 afx_msg void OnPatchNaturalizeAlt();
448 afx_msg void OnSnapToGrid();
449 afx_msg void OnCurvePatchsquare();
450 afx_msg void OnTexturesTexturewindowscale10();
451 afx_msg void OnTexturesTexturewindowscale100();
452 afx_msg void OnTexturesTexturewindowscale200();
453 afx_msg void OnTexturesTexturewindowscale25();
454 afx_msg void OnTexturesTexturewindowscale50();
455 afx_msg void OnTexturesFlush();
456 afx_msg void OnCurveOverlayClear();
457 afx_msg void OnCurveOverlaySet();
458 afx_msg void OnCurveThicken();
459 afx_msg void OnCurveCyclecap();
460 afx_msg void OnCurveCyclecapAlt();
461 afx_msg void OnCurveMatrixTranspose();
462 afx_msg void OnTexturesReloadshaders();
463 afx_msg void OnShowEntities();
464 afx_msg void OnViewEntitiesasBoundingbox();
465 afx_msg void OnViewEntitiesasSelectedskinned();
466 afx_msg void OnViewEntitiesasSelectedwireframe();
467 afx_msg void OnViewEntitiesasSkinned();
468 afx_msg void OnViewEntitiesasSkinnedandboxed();
469 afx_msg void OnViewEntitiesasWireframe();
470 afx_msg void OnViewShowhint();
471 afx_msg void OnUpdateTexturesShowinuse(CCmdUI* pCmdUI);
472 afx_msg void OnTexturesShowall();
473 afx_msg void OnTexturesHideall();
474 afx_msg void OnPatchInspector();
475 afx_msg void OnViewOpengllighting();
476 afx_msg void OnSelectAll();
477 afx_msg void OnViewShowcaulk();
478 afx_msg void OnCurveFreeze();
479 afx_msg void OnCurveUnFreeze();
480 afx_msg void OnCurveUnFreezeAll();
481 afx_msg void OnSelectReselect();
482 afx_msg void OnViewShowangles();
483 afx_msg void OnEditSaveprefab();
484 afx_msg void OnCurveMoreendcapsbevelsSquarebevel();
485 afx_msg void OnCurveMoreendcapsbevelsSquareendcap();
486 afx_msg void OnBrushPrimitivesSphere();
487 afx_msg void OnViewCrosshair();
488 afx_msg void OnViewHideshowHideselected();
489 afx_msg void OnViewHideshowHideNotselected();
490 afx_msg void OnViewHideshowShowhidden();
491 afx_msg void OnTexturesShadersShow();
492 afx_msg void OnTexturesFlushUnused();
493 afx_msg void OnViewGroups();
494 afx_msg void OnDropGroupAddtoWorld();
495 afx_msg void OnDropGroupName();
496 afx_msg void OnDropGroupNewgroup();
497 afx_msg void OnDropGroupRemove();
498 afx_msg void OnProjectedLight();
499 afx_msg void OnShowLighttextures();
500 afx_msg void OnShowLightvolumes();
501 afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
502 afx_msg void OnSplinesMode();
503 afx_msg void OnSplinesLoad();
504 afx_msg void OnSplinesSave();
505 afx_msg void OnSplinesEdit();
506 afx_msg void OnSplineTest();
507 afx_msg void OnSplinesTarget();
508 afx_msg void OnSplinesTargetPoints();
509 afx_msg void OnSplinesCameraPoints();
510 afx_msg void OnPopupNewcameraInterpolated();
511 afx_msg void OnPopupNewcameraSpline();
512 afx_msg void OnPopupNewcameraFixed();
513 afx_msg void OnSelectionMoveonly();
514 afx_msg void OnSelectBrushesOnly();
515 afx_msg void OnSelectByBoundingBrush();
516 afx_msg void OnSelectBrushlight();
517 afx_msg void OnSelectionCombine();
518 afx_msg void OnPatchCombine();
519 afx_msg void OnShowDoom();
520 afx_msg void OnViewRendermode();
521 afx_msg void OnViewRebuildrenderdata();
522 afx_msg void OnViewRealtimerebuild();
523 afx_msg void OnViewRenderentityoutlines();
524 afx_msg void OnViewMaterialanimation();
525 afx_msg void OnAxialTextureByWidth();
526 afx_msg void OnAxialTextureByHeight();
527 afx_msg void OnAxialTextureArbitrary();
528 afx_msg void OnSelectionExportToobj();
529 afx_msg void OnSelectionExportToCM();
530 afx_msg void OnViewRenderselection();
531 afx_msg void OnSelectNomodels();
532 afx_msg void OnViewShowShowvisportals();
533 afx_msg void OnViewShowNoDraw();
534 afx_msg void OnViewRendersound();
535 afx_msg void OnSoundShowsoundvolumes();
536 afx_msg void OnSoundShowselectedsoundvolumes();
537 afx_msg void OnNurbEditor();
538 afx_msg void OnSelectCompleteEntity();
539 afx_msg void OnGenerateMaterialsList();
540 afx_msg void OnMru(unsigned int nID);
541 afx_msg void OnViewNearest(unsigned int nID);
542 afx_msg void OnTextureWad(unsigned int nID);
543 afx_msg void OnBspCommand(unsigned int nID);
544 afx_msg void OnGrid1(unsigned int nID);
545 afx_msg void OnDisplayChange(WPARAM wp, LPARAM lp);
546 afx_msg void OnSelectAlltargets();
549 void CheckTextureScale(int id);
551 DECLARE_MESSAGE_MAP()
554 /////////////////////////////////////////////////////////////////////////////
556 //{{AFX_INSERT_LOCATION}}
557 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
559 #endif // !defined(AFX_MAINFRM_H__330BBF0A_731C_11D1_B539_00AA00A410FC__INCLUDED_)