VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTDxWinDevice.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 =========================================================================*/ 00027 #ifndef __vtkTDxWinDevice_h 00028 #define __vtkTDxWinDevice_h 00029 00030 #include "vtkRenderingOpenGLModule.h" // For export macro 00031 #include "vtkTDxDevice.h" 00032 00033 class vtkRenderWindowInteractor; 00034 00035 // including <WinDef.h> directly leads to the following error: 00036 // "C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(81) : 00037 // fatal error C1189: #error : "No Target Architecture" " 00038 // so we need to include <windows.h> instead. 00039 #include <windows.h> // we need HWND from <WinDef.h> 00040 00041 class vtkTDxWinDevicePrivate; 00042 00043 class VTKRENDERINGOPENGL_EXPORT vtkTDxWinDevice : public vtkTDxDevice 00044 { 00045 public: 00046 static vtkTDxWinDevice *New(); 00047 vtkTypeMacro(vtkTDxWinDevice,vtkTDxDevice); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 HWND GetWindowHandle() const; 00052 00055 void SetWindowHandle(HWND hWnd); 00056 00063 void Initialize(); 00064 00066 virtual void Close(); 00067 00069 bool GetIsListening() const; 00070 00073 void StartListening(); 00074 00077 void StopListening(); 00078 00080 void ProcessEvent(); 00081 00082 protected: 00084 vtkTDxWinDevice(); 00085 00088 virtual ~vtkTDxWinDevice(); 00089 00090 HWND WindowHandle; 00091 00092 vtkTDxWinDevicePrivate *Private; 00093 bool IsListening; 00094 00095 private: 00096 vtkTDxWinDevice(const vtkTDxWinDevice&); // Not implemented. 00097 void operator=(const vtkTDxWinDevice&); // Not implemented. 00098 }; 00099 00100 #endif