home *** CD-ROM | disk | FTP | other *** search
/ Learn 3D Graphics Programming on the PC / Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso / rwwin / rwmfcvw.h_ / rwmfcvw.bin
Text File  |  1995-11-14  |  2KB  |  75 lines

  1. // rwmfcvw.h : interface of the CRwView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CRwView:public CView
  6. {
  7.     protected:                  // create from serialization only
  8.     CRwView();
  9.     DECLARE_DYNCREATE(CRwView)
  10.  
  11. // Attributes
  12.     private:
  13.     typedef enum
  14.     {
  15.         rwvNOACTION,
  16.         rwvSPINOBJECT,
  17.         rwvDRAGOBJECT
  18.     }
  19.     MouseMode;
  20.  
  21.     MouseMode m_mouseMode;
  22.     BOOL m_leftButtonDown;
  23.     CPoint m_lastPoint;
  24.     RwClump *m_selectedClump;
  25.  
  26.       public:
  27.       RwInt32 m_cameraMaxWidth;
  28.     RwInt32 m_cameraMaxHeight;
  29.     RwCamera *m_camera;
  30.     CRwDoc *GetDocument();
  31.  
  32. // Operations
  33.       public:
  34.     void ReRenderView(CDC * dc);
  35.     virtual void OnUpdate(CView * pSender, LPARAM lHint, CObject * pHint);
  36.  
  37. // Implementation
  38.       public:
  39.       virtual ~ CRwView();
  40.     virtual void OnDraw(CDC * pDC);  // overridden to draw this view
  41. #ifdef _DEBUG
  42.     virtual void AssertValid() const;
  43.     virtual void Dump(CDumpContext & dc) const;
  44. #endif
  45.  
  46.       protected:
  47.  
  48.     // Printing support
  49.       virtual BOOL OnPreparePrinting(CPrintInfo * pInfo);
  50.     virtual void OnBeginPrinting(CDC * pDC, CPrintInfo * pInfo);
  51.     virtual void OnEndPrinting(CDC * pDC, CPrintInfo * pInfo);
  52.  
  53. // Generated message map functions
  54.       protected:
  55.     //{{AFX_MSG(CRwView)
  56.       afx_msg void OnSize(UINT nType, int cx, int cy);
  57.     afx_msg BOOL OnEraseBkgnd(CDC * pDC);
  58.     afx_msg void OnAppAboutlibrary();
  59.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  60.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  61.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  62.     //}}AFX_MSG
  63.       DECLARE_MESSAGE_MAP()
  64. };
  65.  
  66. #ifndef _DEBUG                  // debug version in rwmfcvw.cpp
  67. inline CRwDoc *CRwView::
  68. GetDocument()
  69. {
  70.     return (CRwDoc *) m_pDocument;
  71. }
  72. #endif
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75.