VTK
dox/Common/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 "vtkObject.h"
00032 
00033 class vtkUnsignedCharArray;
00034 
00035 class VTK_COMMON_EXPORT vtkWindow : public vtkObject
00036 {
00037 public:
00038   vtkTypeMacro(vtkWindow,vtkObject);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042 
00044   virtual void SetDisplayId(void *) = 0;
00045   virtual void SetWindowId(void *)  = 0;
00046   virtual void SetParentId(void *)  = 0;
00047   virtual void *GetGenericDisplayId() = 0;
00048   virtual void *GetGenericWindowId()  = 0;
00049   virtual void *GetGenericParentId()  = 0;
00050   virtual void *GetGenericContext()   = 0;
00051   virtual void *GetGenericDrawable()  = 0;  
00052   virtual void SetWindowInfo(char *) = 0;
00053   virtual void SetParentInfo(char *) = 0;
00055 
00057 
00058   virtual int *GetPosition();
00059   virtual void SetPosition(int,int);
00060   virtual void SetPosition(int a[2]);
00062 
00064 
00065   virtual int *GetSize();
00066   virtual void SetSize(int,int);
00067   virtual void SetSize(int a[2]);
00069 
00072   int *GetActualSize();
00073 
00075   virtual int     *GetScreenSize() = 0;
00076 
00078 
00079   vtkSetMacro(Mapped,int);
00080   vtkGetMacro(Mapped,int);
00081   vtkBooleanMacro(Mapped,int);
00083 
00085 
00089   vtkSetMacro(Erase,int);
00090   vtkGetMacro(Erase,int);
00091   vtkBooleanMacro(Erase,int);
00093 
00095 
00096   vtkSetMacro(DoubleBuffer,int);
00097   vtkGetMacro(DoubleBuffer,int);
00098   vtkBooleanMacro(DoubleBuffer,int);
00100 
00102 
00103   vtkGetStringMacro(WindowName);
00104   vtkSetStringMacro(WindowName);
00106 
00109   virtual void Render() = 0;
00110 
00112 
00121   virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
00122                                       int front) = 0;
00123   virtual int GetPixelData(int x, int y, int x2, int y2, int front,
00124                            vtkUnsignedCharArray *data) = 0;
00126 
00128 
00130   vtkGetMacro(DPI,int);
00131   vtkSetClampMacro(DPI,int,1,3000);
00133   
00135 
00138   vtkSetMacro(OffScreenRendering,int);
00139   vtkGetMacro(OffScreenRendering,int);
00140   vtkBooleanMacro(OffScreenRendering,int);
00142 
00145   virtual void MakeCurrent() {};
00146 
00148 
00153   vtkSetVector2Macro(TileScale,int);
00154   vtkGetVector2Macro(TileScale,int);
00155   void SetTileScale(int s) {this->SetTileScale(s,s);}
00156   vtkSetVector4Macro(TileViewport,double);
00157   vtkGetVector4Macro(TileViewport,double);
00159 
00160 protected:
00161   int OffScreenRendering;
00162   vtkWindow();
00163   ~vtkWindow();
00164 
00165   char *WindowName;
00166   int Size[2];
00167   int Position[2];
00168   int Mapped;
00169   int Erase;
00170   int DoubleBuffer;
00171   int DPI;
00172 
00173   double TileViewport[4];
00174   int    TileSize[2];
00175   int    TileScale[2];
00176   
00177 private:
00178   vtkWindow(const vtkWindow&);  // Not implemented.
00179   void operator=(const vtkWindow&);  // Not implemented.
00180 };
00181 
00182 #endif
00183 
00184