VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTDxUnixDevice.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 __vtkTDxUnixDevice_h 00028 #define __vtkTDxUnixDevice_h 00029 00030 #include "vtkTDxDevice.h" 00031 //#include <X11/Xlib.h> // Needed for X types used in the public interface 00032 class vtkRenderWindowInteractor; 00033 00034 // We cannot include <X11/Xlib.h> (which defines "Display *", 00035 // "Window" and "XEvent *") because it defines macro like None that would 00036 // conflict with qt4/Qt/qcoreevent.h which defines None as a QEvent::Type 00037 // value. 00038 typedef void vtkTDxUnixDeviceDisplay; 00039 typedef unsigned int vtkTDxUnixDeviceWindow; 00040 typedef void vtkTDxUnixDeviceXEvent; 00041 00042 class VTK_RENDERING_EXPORT vtkTDxUnixDevice : public vtkTDxDevice 00043 { 00044 public: 00045 static vtkTDxUnixDevice *New(); 00046 vtkTypeMacro(vtkTDxUnixDevice,vtkTDxDevice); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00051 vtkTDxUnixDeviceDisplay *GetDisplayId() const; 00052 00055 vtkTDxUnixDeviceWindow GetWindowId() const; 00056 00059 void SetDisplayId(vtkTDxUnixDeviceDisplay *id); 00060 00063 void SetWindowId(vtkTDxUnixDeviceWindow id); 00064 00075 void Initialize(); 00076 00078 virtual void Close(); 00079 00086 bool ProcessEvent(const vtkTDxUnixDeviceXEvent *e); 00087 00089 00091 vtkGetMacro(TranslationScale,double); 00092 vtkSetMacro(TranslationScale,double); 00094 00096 00098 vtkGetMacro(RotationScale,double); 00099 vtkSetMacro(RotationScale,double); 00101 00104 void SetSensitivity(double sensitivity); 00105 00106 protected: 00109 vtkTDxUnixDevice(); 00110 00113 virtual ~vtkTDxUnixDevice(); 00114 00115 vtkTDxUnixDeviceDisplay *DisplayId; 00116 vtkTDxUnixDeviceWindow WindowId; 00117 00118 double TranslationScale; 00119 double RotationScale; 00120 00121 private: 00122 vtkTDxUnixDevice(const vtkTDxUnixDevice&); // Not implemented. 00123 void operator=(const vtkTDxUnixDevice&); // Not implemented. 00124 }; 00125 00126 #endif