VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMFCWindow.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00016 #ifndef C_VTK_MFC_WINDOW 00017 #define C_VTK_MFC_WINDOW 00018 00019 #include "afxwin.h" 00020 00021 class vtkWin32OpenGLRenderWindow; 00022 class vtkRenderWindowInteractor; 00023 00024 #include "vtkMFCConfigure.h" 00025 00026 #if !defined(VTK_MFC_STATIC) 00027 # if defined(vtkMFC_EXPORTS) 00028 # define VTK_MFC_EXPORT __declspec( dllexport ) 00029 # else 00030 # define VTK_MFC_EXPORT __declspec( dllimport ) 00031 # endif 00032 #else 00033 # define VTK_MFC_EXPORT 00034 #endif 00035 00037 class VTK_MFC_EXPORT vtkMFCWindow : public CWnd 00038 { 00039 public: 00041 vtkMFCWindow(CWnd *pcWnd); 00043 virtual ~vtkMFCWindow(); 00044 00045 #ifdef _DEBUG 00046 virtual void AssertValid() const; 00047 virtual void Dump(CDumpContext& dc) const; 00048 #endif 00049 00051 void DrawDC(CDC* pDC); 00052 00054 virtual void SetRenderWindow(vtkWin32OpenGLRenderWindow*); 00056 virtual vtkWin32OpenGLRenderWindow* GetRenderWindow(); 00058 virtual vtkRenderWindowInteractor* GetInteractor(); 00059 00060 protected: 00061 00063 afx_msg void OnSize(UINT nType, int cx, int cy); 00065 afx_msg void OnPaint(); 00067 afx_msg void OnDestroy(); 00069 BOOL OnEraseBkgnd(CDC* pDC); 00070 00071 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); 00072 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 00073 afx_msg void OnMButtonDown(UINT nFlags, CPoint point); 00074 afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 00075 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 00076 afx_msg void OnMButtonUp(UINT nFlags, CPoint point); 00077 afx_msg void OnRButtonUp(UINT nFlags, CPoint point); 00078 afx_msg void OnMouseMove(UINT nFlags, CPoint point); 00079 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); 00080 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); 00081 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); 00082 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 00083 afx_msg void OnTimer(UINT_PTR nIDEvent); 00084 00086 vtkWin32OpenGLRenderWindow* pvtkWin32OpenGLRW; 00087 00088 DECLARE_MESSAGE_MAP() 00089 }; 00090 00091 #endif