leocad/win/Mainfrm.h

119 lines
3.2 KiB
C
Raw Normal View History

2011-09-15 05:00:08 +02:00
#ifndef _MAINFRM_H_
#define _MAINFRM_H_
2011-09-07 23:06:51 +02:00
#include "PieceBar.h"
#include "CADBar.h"
#include "propertiespane.h"
2011-09-07 23:06:51 +02:00
class MainWnd;
2011-09-15 04:48:44 +02:00
class CDynamicSplitterWnd;
2011-09-07 23:06:51 +02:00
class CMFCToolBarNoUpdate : public CMFCToolBar
{
public:
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
CMFCToolBar::OnUpdateCmdUI(pTarget, FALSE);
}
};
class CMainFrame : public CFrameWndEx
2011-09-07 23:06:51 +02:00
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
virtual BOOL OnShowPopupMenu(CMFCPopupMenu* pMenuPopup);
2011-09-07 23:06:51 +02:00
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Control bar embedded members
CMFCMenuBar m_wndMenuBar;
2011-09-07 23:06:51 +02:00
CCADStatusBar m_wndStatusBar;
CMFCToolBarNoUpdate m_wndStandardBar;
CMFCToolBarNoUpdate m_wndToolsBar;
CMFCToolBarNoUpdate m_wndAnimationBar;
CPiecesBar m_wndPiecesBar;
2012-03-17 21:14:34 +01:00
CPropertiesPane m_wndProperties;
2011-09-15 04:48:44 +02:00
CTypedPtrArray<CPtrArray, CDynamicSplitterWnd*> m_SplitterList;
2011-09-07 23:06:51 +02:00
int mTransformMode;
2011-09-07 23:06:51 +02:00
void UpdateMenuAccelerators();
void SetStatusBarPane(UINT ID, const char* Text);
void SetStatusBarMessage(const char* Message)
{ m_strStatusBar = Message; }
protected:
CString m_strStatusBar;
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnClose();
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnViewFullscreen();
afx_msg void OnFilePrintPieceList();
afx_msg void OnActivateApp(BOOL bActive, DWORD hTask);
2011-09-07 23:06:51 +02:00
afx_msg LRESULT OnSetMessageString(WPARAM wParam, LPARAM lParam);
afx_msg void OnDropFiles(HDROP hDropInfo);
//}}AFX_MSG
// Status bar
void GetMessageString(UINT nID, CString& rMessage) const;
afx_msg void OnPieceBar(UINT nID);
afx_msg void OnUpdatePieceBar(CCmdUI* pCmdUI);
afx_msg void OnUpdateAction(CCmdUI* pCmdUI);
afx_msg void OnUpdateSnap(CCmdUI* pCmdUI);
afx_msg void OnUpdateLock(CCmdUI* pCmdUI);
afx_msg void OnUpdateCamera(CCmdUI* pCmdUI);
afx_msg void OnUpdateSnapXY(CCmdUI* pCmdUI);
afx_msg void OnUpdateSnapZ(CCmdUI* pCmdUI);
afx_msg void OnUpdateSnapA(CCmdUI* pCmdUI);
afx_msg void OnUpdateTransform(CCmdUI* pCmdUI);
2012-02-25 01:52:50 +01:00
afx_msg void OnUpdateStepNext(CCmdUI* pCmdUI);
afx_msg void OnUpdateStepPrevious(CCmdUI* pCmdUI);
afx_msg void OnUpdateStepFirst(CCmdUI* pCmdUI);
afx_msg void OnUpdateStepLast(CCmdUI* pCmdUI);
2011-09-07 23:06:51 +02:00
afx_msg LRESULT OnUpdateList(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnPopupClose(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnAddString(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUpdateInfo(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT UpdateSettings(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnToolbarReset(WPARAM wParam, LPARAM lParam);
2011-09-07 23:06:51 +02:00
2011-09-15 04:48:44 +02:00
afx_msg void OnViewSplitVertically();
afx_msg void OnViewSplitHorizontally();
afx_msg void OnViewDeleteView();
afx_msg void OnViewResetViews();
2011-09-07 23:06:51 +02:00
DECLARE_MESSAGE_MAP()
};
2011-09-15 05:00:08 +02:00
#endif // _MAINFRM_H_