VTK
dox/Common/Core/vtkWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWindow.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 =========================================================================*/
00028 #ifndef __vtkWindow_h
00029 #define __vtkWindow_h
00030 
00031 #include "vtkCommonCoreModule.h" // For export macro
00032 #include "vtkObject.h"
00033 
00034 class vtkUnsignedCharArray;
00035 
00036 class VTKCOMMONCORE_EXPORT vtkWindow : public vtkObject
00037 {
00038 public:
00039   vtkTypeMacro(vtkWindow,vtkObject);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00045   virtual void SetDisplayId(void *) = 0;
00046   virtual void SetWindowId(void *)  = 0;
00047   virtual void SetParentId(void *)  = 0;
00048   virtual void *GetGenericDisplayId() = 0;
00049   virtual void *GetGenericWindowId()  = 0;
00050   virtual void *GetGenericParentId()  = 0;
00051   virtual void *GetGenericContext()   = 0;
00052   virtual void *GetGenericDrawable()  = 0;
00053   virtual void SetWindowInfo(char *) = 0;
00054   virtual void SetParentInfo(char *) = 0;
00056 
00058 
00059   virtual int *GetPosition();
00060   virtual void SetPosition(int,int);
00061   virtual void SetPosition(int a[2]);
00063 
00065 
00066   virtual int *GetSize();
00067   virtual void SetSize(int,int);
00068   virtual void SetSize(int a[2]);
00070 
00073   int *GetActualSize();
00074 
00076   virtual int     *GetScreenSize() = 0;
00077 
00079 
00080   vtkSetMacro(Mapped,int);
00081   vtkGetMacro(Mapped,int);
00082   vtkBooleanMacro(Mapped,int);
00084 
00086 
00090   vtkSetMacro(Erase,int);
00091   vtkGetMacro(Erase,int);
00092   vtkBooleanMacro(Erase,int);
00094 
00096 
00097   vtkSetMacro(DoubleBuffer,int);
00098   vtkGetMacro(DoubleBuffer,int);
00099   vtkBooleanMacro(DoubleBuffer,int);
00101 
00103 
00104   vtkGetStringMacro(WindowName);
00105   vtkSetStringMacro(WindowName);
00107 
00110   virtual void Render() = 0;
00111 
00113 
00122   virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
00123                                       int front) = 0;
00124   virtual int GetPixelData(int x, int y, int x2, int y2, int front,
00125                            vtkUnsignedCharArray *data) = 0;
00127 
00129 
00131   vtkGetMacro(DPI,int);
00132   vtkSetClampMacro(DPI,int,1,3000);
00134 
00136 
00139   vtkSetMacro(OffScreenRendering,int);
00140   vtkGetMacro(OffScreenRendering,int);
00141   vtkBooleanMacro(OffScreenRendering,int);
00143 
00146   virtual void MakeCurrent() {}
00147 
00149 
00154   vtkSetVector2Macro(TileScale,int);
00155   vtkGetVector2Macro(TileScale,int);
00156   void SetTileScale(int s) {this->SetTileScale(s,s);}
00157   vtkSetVector4Macro(TileViewport,double);
00158   vtkGetVector4Macro(TileViewport,double);
00160 
00161 protected:
00162   int OffScreenRendering;
00163   vtkWindow();
00164   ~vtkWindow();
00165 
00166   char *WindowName;
00167   int Size[2];
00168   int Position[2];
00169   int Mapped;
00170   int Erase;
00171   int DoubleBuffer;
00172   int DPI;
00173 
00174   double TileViewport[4];
00175   int    TileSize[2];
00176   int    TileScale[2];
00177 
00178 private:
00179   vtkWindow(const vtkWindow&);  // Not implemented.
00180   void operator=(const vtkWindow&);  // Not implemented.
00181 };
00182 
00183 #endif
00184 
00185