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 "vtkTDxDevice.h" 00031 00032 class vtkRenderWindowInteractor; 00033 00034 // including <WinDef.h> directly leads to the following error: 00035 // "C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(81) : 00036 // fatal error C1189: #error : "No Target Architecture" " 00037 // so we need to include <windows.h> instead. 00038 #include <windows.h> // we need HWND from <WinDef.h> 00039 00040 class vtkTDxWinDevicePrivate; 00041 00042 class VTK_RENDERING_EXPORT vtkTDxWinDevice : public vtkTDxDevice 00043 { 00044 public: 00045 static vtkTDxWinDevice *New(); 00046 vtkTypeMacro(vtkTDxWinDevice,vtkTDxDevice); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 HWND GetWindowHandle() const; 00051 00054 void SetWindowHandle(HWND hWnd); 00055 00062 void Initialize(); 00063 00065 virtual void Close(); 00066 00068 bool GetIsListening() const; 00069 00072 void StartListening(); 00073 00076 void StopListening(); 00077 00079 void ProcessEvent(); 00080 00081 protected: 00083 vtkTDxWinDevice(); 00084 00087 virtual ~vtkTDxWinDevice(); 00088 00089 HWND WindowHandle; 00090 00091 vtkTDxWinDevicePrivate *Private; 00092 bool IsListening; 00093 00094 private: 00095 vtkTDxWinDevice(const vtkTDxWinDevice&); // Not implemented. 00096 void operator=(const vtkTDxWinDevice&); // Not implemented. 00097 }; 00098 00099 #endif