2011-09-07 23:06:51 +02:00
|
|
|
#ifndef _CADVIEW_H_
|
|
|
|
#define _CADVIEW_H_
|
|
|
|
|
|
|
|
class View;
|
|
|
|
class CCADDoc;
|
|
|
|
|
|
|
|
class CCADView : public CView
|
|
|
|
{
|
|
|
|
protected: // create from serialization only
|
|
|
|
CCADView();
|
|
|
|
DECLARE_DYNCREATE(CCADView)
|
|
|
|
|
|
|
|
// Attributes
|
|
|
|
public:
|
|
|
|
CCADDoc* GetDocument();
|
|
|
|
void PrintHeader(BOOL bFooter, HDC hDC, CRect rc, UINT nCurPage, UINT nMaxPage, BOOL bCatalog);
|
|
|
|
|
|
|
|
// Operations
|
|
|
|
public:
|
2012-12-13 00:54:58 +01:00
|
|
|
View* GetView() const
|
|
|
|
{
|
|
|
|
return m_pView;
|
|
|
|
}
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
// ClassWizard generated virtual function overrides
|
|
|
|
//{{AFX_VIRTUAL(CCADView)
|
|
|
|
public:
|
|
|
|
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
|
|
|
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
|
|
|
protected:
|
|
|
|
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
|
|
|
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
|
|
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
|
|
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
|
|
|
|
virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
|
|
|
|
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
//}}AFX_VIRTUAL
|
|
|
|
|
|
|
|
// Implementation
|
|
|
|
public:
|
|
|
|
virtual ~CCADView();
|
|
|
|
#ifdef _DEBUG
|
|
|
|
virtual void AssertValid() const;
|
|
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Generated message map functions
|
|
|
|
protected:
|
|
|
|
HCURSOR m_hCursor;
|
2011-09-13 08:04:21 +02:00
|
|
|
View* m_pView;
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
//{{AFX_MSG(CCADView)
|
|
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
|
|
afx_msg void OnDestroy();
|
|
|
|
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
|
|
|
|
afx_msg void OnCaptureChanged(CWnd *pWnd);
|
|
|
|
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
|
|
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
|
|
afx_msg void OnTimer(UINT nIDEvent);
|
|
|
|
afx_msg void OnFilePrintPreview();
|
|
|
|
//}}AFX_MSG
|
|
|
|
afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult);
|
|
|
|
afx_msg LONG OnSetStep(UINT lParam, LONG wParam);
|
|
|
|
afx_msg LONG OnChangeCursor(UINT lParam, LONG wParam);
|
|
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef _DEBUG // debug version in CADView.cpp
|
|
|
|
inline CCADDoc* CCADView::GetDocument()
|
|
|
|
{ return (CCADDoc*)m_pDocument; }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
|
|
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
|
|
|
|
|
|
|
#endif // _CADVIEW_H_
|