Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWindow.h,v $
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 =========================================================================*/
00039 #ifndef __vtkWindow_h
00040 #define __vtkWindow_h
00041 
00042 #include "vtkObject.h"
00043 
00044 class vtkUnsignedCharArray;
00045 
00046 class VTK_COMMON_EXPORT vtkWindow : public vtkObject
00047 {
00048 public:
00049   vtkTypeRevisionMacro(vtkWindow,vtkObject);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00055   virtual void SetDisplayId(void *) = 0;
00056   virtual void SetWindowId(void *)  = 0;
00057   virtual void SetParentId(void *)  = 0;
00058   virtual void *GetGenericDisplayId() = 0;
00059   virtual void *GetGenericWindowId()  = 0;
00060   virtual void *GetGenericParentId()  = 0;
00061   virtual void *GetGenericContext()   = 0;
00062   virtual void *GetGenericDrawable()  = 0;  
00063   virtual void SetWindowInfo(char *) = 0;
00064   virtual void SetParentInfo(char *) = 0;
00066 
00068 
00069   virtual int *GetPosition();
00070   virtual void SetPosition(int,int);
00071   virtual void SetPosition(int a[2]);
00073 
00075 
00076   virtual int *GetSize();
00077   virtual void SetSize(int,int);
00078   virtual void SetSize(int a[2]);
00080 
00082   virtual int     *GetScreenSize() = 0;
00083 
00085 
00086   vtkSetMacro(Mapped,int);
00087   vtkGetMacro(Mapped,int);
00088   vtkBooleanMacro(Mapped,int);
00090 
00092 
00096   vtkSetMacro(Erase,int);
00097   vtkGetMacro(Erase,int);
00098   vtkBooleanMacro(Erase,int);
00100 
00102 
00103   vtkSetMacro(DoubleBuffer,int);
00104   vtkGetMacro(DoubleBuffer,int);
00105   vtkBooleanMacro(DoubleBuffer,int);
00107 
00109 
00110   vtkGetStringMacro(WindowName);
00111   virtual void SetWindowName(const char *);
00113 
00116   virtual void Render() = 0;
00117 
00119 
00127   virtual unsigned char *GetPixelData(int, int, int, int, int) = 0;
00128   virtual int GetPixelData(int ,int ,int ,int , int,
00129                            vtkUnsignedCharArray*) = 0;
00131 
00133 
00135   vtkGetMacro(DPI,int);
00136   vtkSetClampMacro(DPI,int,1,3000);
00138   
00140 
00143   vtkSetMacro(OffScreenRendering,int);
00144   vtkGetMacro(OffScreenRendering,int);
00145   vtkBooleanMacro(OffScreenRendering,int);
00147 
00150   virtual void MakeCurrent() {};
00151 
00153 
00158   vtkSetVector2Macro(TileScale,int);
00159   vtkGetVector2Macro(TileScale,int);
00160   void SetTileScale(int s) {this->SetTileScale(s,s);}
00161   vtkSetVector4Macro(TileViewport,double);
00162   vtkGetVector4Macro(TileViewport,double);
00164 
00165 protected:
00166   int OffScreenRendering;
00167   vtkWindow();
00168   ~vtkWindow();
00169 
00170   char *WindowName;
00171   int Size[2];
00172   int Position[2];
00173   int Mapped;
00174   int Erase;
00175   int DoubleBuffer;
00176   int DPI;
00177 
00178   double TileViewport[4];
00179   int    TileSize[2];
00180   int    TileScale[2];
00181   
00182 private:
00183   vtkWindow(const vtkWindow&);  // Not implemented.
00184   void operator=(const vtkWindow&);  // Not implemented.
00185 };
00186 
00187 #endif
00188 
00189