mainfrm.h
来自「quake3工具源码。包括生成bsp文件」· C头文件 代码 · 共 470 行 · 第 1/2 页
H
470 行
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__330BBF0A_731C_11D1_B539_00AA00A410FC__INCLUDED_)
#define AFX_MAINFRM_H__330BBF0A_731C_11D1_B539_00AA00A410FC__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "LstToolBar.h"
#include "XYWnd.h"
#include "TexWnd.h"
#include "ZWnd.h"
#include "CamWnd.h"
#include "RADEditWnd.h"
#include "TextureBar.h"
#include "PlugInManager.h"
#include "PlugIn.h"
#include "groupdlg.h"
const int RAD_SHIFT = 0x01;
const int RAD_ALT = 0x02;
const int RAD_CONTROL = 0x04;
const int RAD_PRESS = 0x08;
struct SCommandInfo
{
char* m_strCommand;
unsigned int m_nKey;
unsigned int m_nModifiers;
unsigned int m_nCommand;
};
struct SKeyInfo
{
char* m_strName;
unsigned int m_nVKKey;
};
class CMainFrame : public CFrameWnd
{
DECLARE_DYNAMIC(CMainFrame)
public:
CMainFrame();
void HandleKey(UINT nChar, UINT nRepCnt, UINT nFlags, bool bDown = true)
{
if (bDown)
OnKeyDown(nChar, nRepCnt, nFlags);
else
OnKeyUp(nChar, nRepCnt, nFlags);
};
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
//}}AFX_VIRTUAL
// Implementation
public:
void UpdatePatchToolbarButtons();
void NudgeSelection(int nDirection, int nAmount);
void UpdateTextureBar();
void SetButtonMenuStates();
void SetTexValStatus();
void SetGridStatus();
void RoutineProcessing();
CXYWnd* ActiveXY();
void UpdateWindows(int nBits);
void SetStatusText(int nPane, const char* pText);
void UpdateStatusText();
void SetWindowStyle(int nStyle);
virtual ~CMainFrame();
CXYWnd* GetXYWnd() {return m_pXYWnd;};
CXYWnd* GetXZWnd() {return m_pXZWnd;};
CXYWnd* GetYZWnd() {return m_pYZWnd;};
CCamWnd* GetCamera() {return m_pCamWnd;};
CTexWnd* GetTexWnd() {return m_pTexWnd;};
void SetActiveXY(CXYWnd* p)
{
if (m_pActiveXY)
m_pActiveXY->SetActive(false);
m_pActiveXY = p;
if (m_pActiveXY)
m_pActiveXY->SetActive(true);
};
int CurrentStyle() { return m_nCurrentStyle; };
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CLstToolBar m_wndToolBar;
CLstToolBar m_wndScaleBar;
CDialogBar m_wndHelpBar;
CTextureBar m_wndTextureBar;
CSplitterWnd m_wndSplit;
CSplitterWnd m_wndSplit2;
CSplitterWnd m_wndSplit3;
CXYWnd* m_pXYWnd;
CXYWnd* m_pYZWnd;
CXYWnd* m_pXZWnd;
CCamWnd* m_pCamWnd;
CTexWnd* m_pTexWnd;
CZWnd* m_pZWnd;
CRADEditWnd* m_pEditWnd;
int m_nCurrentStyle;
CString m_strStatus[15];
CXYWnd* m_pActiveXY;
bool m_bCamPreview;
CPlugInManager m_PlugInMgr;
int m_nNextPlugInID;
// Generated message map functions
protected:
bool m_bDoLoop;
bool m_bSplittersOK;
void CreateQEChildren();
void LoadCommandMap();
void ShowMenuItemKeyBindings(CMenu *pMenu);
void SetEntityCheck();
afx_msg void OnBSPStatus(UINT wParam, long lParam);
afx_msg void OnBSPDone(UINT wParam, long lParam);
public:
void Nudge(int nDim, float fNudge);
CPlugInManager &GetPlugInMgr() {return m_PlugInMgr;};
void AddPlugInMenuItem(CPlugIn* pPlugIn);
void CleanPlugInMenu();
// these are public so i can easily reflect messages
// from child windows..
//{{AFX_MSG(CMainFrame)
afx_msg void OnParentNotify(UINT message, LPARAM lParam);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
afx_msg void OnClose();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void ToggleCamera();
afx_msg void OnFileClose();
afx_msg void OnFileExit();
afx_msg void OnFileLoadproject();
afx_msg void OnFileNew();
afx_msg void OnFileOpen();
afx_msg void OnFilePointfile();
afx_msg void OnFilePrint();
afx_msg void OnFilePrintPreview();
afx_msg void OnFileSave();
afx_msg void OnFileSaveas();
afx_msg void OnView100();
afx_msg void OnViewCenter();
afx_msg void OnViewConsole();
afx_msg void OnViewDownfloor();
afx_msg void OnViewEntity();
afx_msg void OnViewFront();
afx_msg void OnViewShowblocks();
afx_msg void OnViewShowclip();
afx_msg void OnViewShowcoordinates();
afx_msg void OnViewShowdetail();
afx_msg void OnViewShowent();
afx_msg void OnViewShowlights();
afx_msg void OnViewShownames();
afx_msg void OnViewShowpath();
afx_msg void OnViewShowwater();
afx_msg void OnViewShowworld();
afx_msg void OnViewTexture();
afx_msg void OnViewUpfloor();
afx_msg void OnViewXy();
afx_msg void OnViewZ100();
afx_msg void OnViewZoomin();
afx_msg void OnViewZoomout();
afx_msg void OnViewZzoomin();
afx_msg void OnViewZzoomout();
afx_msg void OnViewSide();
afx_msg void OnTexturesShowinuse();
afx_msg void OnTexturesInspector();
afx_msg void OnMiscBenchmark();
afx_msg void OnMiscFindbrush();
afx_msg void OnMiscGamma();
afx_msg void OnMiscNextleakspot();
afx_msg void OnMiscPreviousleakspot();
afx_msg void OnMiscPrintxy();
afx_msg void OnMiscSelectentitycolor();
afx_msg void OnTexturebk();
afx_msg void OnColorsMajor();
afx_msg void OnColorsMinor();
afx_msg void OnColorsXybk();
afx_msg void OnBrush3sided();
afx_msg void OnBrush4sided();
afx_msg void OnBrush5sided();
afx_msg void OnBrush6sided();
afx_msg void OnBrush7sided();
afx_msg void OnBrush8sided();
afx_msg void OnBrush9sided();
afx_msg void OnBrushArbitrarysided();
afx_msg void OnBrushFlipx();
afx_msg void OnBrushFlipy();
afx_msg void OnBrushFlipz();
afx_msg void OnBrushRotatex();
afx_msg void OnBrushRotatey();
afx_msg void OnBrushRotatez();
afx_msg void OnRegionOff();
afx_msg void OnRegionSetbrush();
afx_msg void OnRegionSetselection();
afx_msg void OnRegionSettallbrush();
afx_msg void OnRegionSetxy();
afx_msg void OnSelectionArbitraryrotation();
afx_msg void OnSelectionClone();
afx_msg void OnSelectionConnect();
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?