Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Common/vtkWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWindow.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00043 #ifndef __vtkWindow_h
00044 #define __vtkWindow_h
00045 
00046 #include "vtkObject.h"
00047 
00048 class vtkUnsignedCharArray;
00049 
00050 class VTK_COMMON_EXPORT vtkWindow : public vtkObject
00051 {
00052 public:
00053   vtkTypeRevisionMacro(vtkWindow,vtkObject);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00059   virtual void SetDisplayId(void *) = 0;
00060   virtual void SetWindowId(void *)  = 0;
00061   virtual void SetParentId(void *)  = 0;
00062   virtual void *GetGenericDisplayId() = 0;
00063   virtual void *GetGenericWindowId()  = 0;
00064   virtual void *GetGenericParentId()  = 0;
00065   virtual void *GetGenericContext()   = 0;
00066   virtual void *GetGenericDrawable()  = 0;  
00067   virtual void SetWindowInfo(char *) = 0;
00068   virtual void SetParentInfo(char *) = 0;
00070 
00072 
00073   virtual int *GetPosition();
00074   virtual void SetPosition(int,int);
00075   virtual void SetPosition(int a[2]);
00077 
00079 
00080   virtual int *GetSize();
00081   virtual void SetSize(int,int);
00082   virtual void SetSize(int a[2]);
00084 
00086 
00087   vtkSetMacro(Mapped,int);
00088   vtkGetMacro(Mapped,int);
00089   vtkBooleanMacro(Mapped,int);
00091 
00093 
00097   vtkSetMacro(Erase,int);
00098   vtkGetMacro(Erase,int);
00099   vtkBooleanMacro(Erase,int);
00101 
00103 
00104   vtkSetMacro(DoubleBuffer,int);
00105   vtkGetMacro(DoubleBuffer,int);
00106   vtkBooleanMacro(DoubleBuffer,int);
00108 
00110 
00111   vtkGetStringMacro(WindowName);
00112   virtual void SetWindowName(const char *);
00114 
00117   virtual void Render() = 0;
00118 
00120 
00128   virtual unsigned char *GetPixelData(int, int, int, int, int) = 0;
00129   virtual int GetPixelData(int ,int ,int ,int , int,
00130                            vtkUnsignedCharArray*) = 0;
00132 
00134 
00136   vtkGetMacro(DPI,int);
00137   vtkSetClampMacro(DPI,int,1,3000);
00139   
00141 
00144   vtkSetMacro(OffScreenRendering,int);
00145   vtkGetMacro(OffScreenRendering,int);
00146   vtkBooleanMacro(OffScreenRendering,int);
00148 
00151   virtual void MakeCurrent() {};
00152 
00154 
00159   vtkSetMacro(TileScale,int);
00160   vtkGetMacro(TileScale,int);
00161   vtkSetVector4Macro(TileViewport,float);
00162   vtkGetVector4Macro(TileViewport,float);
00164   
00165 
00166 protected:
00167   int OffScreenRendering;
00168   vtkWindow();
00169   ~vtkWindow();
00170 
00171   char *WindowName;
00172   int Size[2];
00173   int Position[2];
00174   int Mapped;
00175   int Erase;
00176   int DoubleBuffer;
00177   int DPI;
00178 
00179   float TileViewport[4];
00180   int   TileSize[2];
00181   int   TileScale;
00182   
00183 private:
00184   vtkWindow(const vtkWindow&);  // Not implemented.
00185   void operator=(const vtkWindow&);  // Not implemented.
00186 };
00187 
00188 #endif
00189 
00190