00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkWindow_h
00026 #define __vtkWindow_h
00027
00028 #include "vtkObject.h"
00029
00030 class vtkUnsignedCharArray;
00031
00032 class VTK_COMMON_EXPORT vtkWindow : public vtkObject
00033 {
00034 public:
00035 vtkTypeRevisionMacro(vtkWindow,vtkObject);
00036 void PrintSelf(ostream& os, vtkIndent indent);
00037
00039
00041 virtual void SetDisplayId(void *) = 0;
00042 virtual void SetWindowId(void *) = 0;
00043 virtual void SetParentId(void *) = 0;
00044 virtual void *GetGenericDisplayId() = 0;
00045 virtual void *GetGenericWindowId() = 0;
00046 virtual void *GetGenericParentId() = 0;
00047 virtual void *GetGenericContext() = 0;
00048 virtual void *GetGenericDrawable() = 0;
00049 virtual void SetWindowInfo(char *) = 0;
00050 virtual void SetParentInfo(char *) = 0;
00052
00054
00055 virtual int *GetPosition();
00056 virtual void SetPosition(int,int);
00057 virtual void SetPosition(int a[2]);
00059
00061
00062 virtual int *GetSize();
00063 virtual void SetSize(int,int);
00064 virtual void SetSize(int a[2]);
00066
00069 int *GetActualSize();
00070
00072 virtual int *GetScreenSize() = 0;
00073
00075
00076 vtkSetMacro(Mapped,int);
00077 vtkGetMacro(Mapped,int);
00078 vtkBooleanMacro(Mapped,int);
00080
00082
00086 vtkSetMacro(Erase,int);
00087 vtkGetMacro(Erase,int);
00088 vtkBooleanMacro(Erase,int);
00090
00092
00093 vtkSetMacro(DoubleBuffer,int);
00094 vtkGetMacro(DoubleBuffer,int);
00095 vtkBooleanMacro(DoubleBuffer,int);
00097
00099
00100 vtkGetStringMacro(WindowName);
00101 vtkSetStringMacro(WindowName);
00103
00106 virtual void Render() = 0;
00107
00109
00118 virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
00119 int front) = 0;
00120 virtual int GetPixelData(int x, int y, int x2, int y2, int front,
00121 vtkUnsignedCharArray *data) = 0;
00123
00125
00127 vtkGetMacro(DPI,int);
00128 vtkSetClampMacro(DPI,int,1,3000);
00130
00132
00135 vtkSetMacro(OffScreenRendering,int);
00136 vtkGetMacro(OffScreenRendering,int);
00137 vtkBooleanMacro(OffScreenRendering,int);
00139
00142 virtual void MakeCurrent() {};
00143
00145
00150 vtkSetVector2Macro(TileScale,int);
00151 vtkGetVector2Macro(TileScale,int);
00152 void SetTileScale(int s) {this->SetTileScale(s,s);}
00153 vtkSetVector4Macro(TileViewport,double);
00154 vtkGetVector4Macro(TileViewport,double);
00156
00157 protected:
00158 int OffScreenRendering;
00159 vtkWindow();
00160 ~vtkWindow();
00161
00162 char *WindowName;
00163 int Size[2];
00164 int Position[2];
00165 int Mapped;
00166 int Erase;
00167 int DoubleBuffer;
00168 int DPI;
00169
00170 double TileViewport[4];
00171 int TileSize[2];
00172 int TileScale[2];
00173
00174 private:
00175 vtkWindow(const vtkWindow&);
00176 void operator=(const vtkWindow&);
00177 };
00178
00179 #endif
00180
00181