VTK
vtkWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWindow.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkWindow_h
29 #define vtkWindow_h
30 
31 #include "vtkCommonCoreModule.h" // For export macro
32 #include "vtkObject.h"
33 
35 
37 {
38 public:
39  vtkTypeMacro(vtkWindow,vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
45  virtual void SetDisplayId(void *) = 0;
46  virtual void SetWindowId(void *) = 0;
47  virtual void SetParentId(void *) = 0;
48  virtual void *GetGenericDisplayId() = 0;
49  virtual void *GetGenericWindowId() = 0;
50  virtual void *GetGenericParentId() = 0;
51  virtual void *GetGenericContext() = 0;
52  virtual void *GetGenericDrawable() = 0;
53  virtual void SetWindowInfo(char *) = 0;
54  virtual void SetParentInfo(char *) = 0;
56 
58 
59  virtual int *GetPosition();
60  virtual void SetPosition(int,int);
61  virtual void SetPosition(int a[2]);
63 
65 
66  virtual int *GetSize();
67  virtual void SetSize(int,int);
68  virtual void SetSize(int a[2]);
70 
73  int *GetActualSize();
74 
76  virtual int *GetScreenSize() = 0;
77 
79 
80  vtkSetMacro(Mapped,int);
81  vtkGetMacro(Mapped,int);
82  vtkBooleanMacro(Mapped,int);
84 
86 
90  vtkSetMacro(Erase,int);
91  vtkGetMacro(Erase,int);
92  vtkBooleanMacro(Erase,int);
94 
96 
97  vtkSetMacro(DoubleBuffer,int);
98  vtkGetMacro(DoubleBuffer,int);
99  vtkBooleanMacro(DoubleBuffer,int);
101 
103 
104  vtkGetStringMacro(WindowName);
105  vtkSetStringMacro(WindowName);
107 
110  virtual void Render() = 0;
111 
113 
122  virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
123  int front) = 0;
124  virtual int GetPixelData(int x, int y, int x2, int y2, int front,
127 
129 
131  vtkGetMacro(DPI,int);
132  vtkSetClampMacro(DPI,int,1,VTK_INT_MAX);
134 
139  virtual bool DetectDPI() { return false; }
140 
142 
145  vtkSetMacro(OffScreenRendering,int);
146  vtkGetMacro(OffScreenRendering,int);
147  vtkBooleanMacro(OffScreenRendering,int);
149 
152  virtual void MakeCurrent() {}
153 
155 
160  vtkSetVector2Macro(TileScale,int);
161  vtkGetVector2Macro(TileScale,int);
162  void SetTileScale(int s) {this->SetTileScale(s,s);}
163  vtkSetVector4Macro(TileViewport,double);
164  vtkGetVector4Macro(TileViewport,double);
166 
167 protected:
168  int OffScreenRendering;
169  vtkWindow();
170  ~vtkWindow();
171 
172  char *WindowName;
173  int Size[2];
174  int Position[2];
175  int Mapped;
176  int Erase;
178  int DPI;
179 
180  double TileViewport[4];
181  int TileSize[2];
182  int TileScale[2];
183 
184 private:
185  vtkWindow(const vtkWindow&); // Not implemented.
186  void operator=(const vtkWindow&); // Not implemented.
187 };
188 
189 #endif
190 
191 
char * WindowName
Definition: vtkWindow.h:172
abstract base class for most VTK objects
Definition: vtkObject.h:61
void SetTileScale(int s)
Definition: vtkWindow.h:162
#define VTKCOMMONCORE_EXPORT
#define VTK_INT_MAX
Definition: vtkType.h:132
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
int DoubleBuffer
Definition: vtkWindow.h:177
int Erase
Definition: vtkWindow.h:176
virtual void PrintSelf(ostream &os, vtkIndent indent)
int Mapped
Definition: vtkWindow.h:175
a simple class to control print indentation
Definition: vtkIndent.h:38
int OffScreenRendering
Definition: vtkWindow.h:164
virtual void MakeCurrent()
Definition: vtkWindow.h:152
virtual bool DetectDPI()
Definition: vtkWindow.h:139
dynamic, self-adjusting array of unsigned char