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 =========================================================================*/
25 #ifndef vtkWindow_h
26 #define vtkWindow_h
27 
28 #include "vtkCommonCoreModule.h" // For export macro
29 #include "vtkObject.h"
30 
32 
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40 
42  virtual void SetDisplayId(void *) = 0;
43  virtual void SetWindowId(void *) = 0;
44  virtual void SetParentId(void *) = 0;
45  virtual void *GetGenericDisplayId() = 0;
46  virtual void *GetGenericWindowId() = 0;
47  virtual void *GetGenericParentId() = 0;
48  virtual void *GetGenericContext() = 0;
49  virtual void *GetGenericDrawable() = 0;
50  virtual void SetWindowInfo(char *) = 0;
51  virtual void SetParentInfo(char *) = 0;
53 
55 
56  virtual int *GetPosition();
57  virtual void SetPosition(int,int);
58  virtual void SetPosition(int a[2]);
60 
62 
63  virtual int *GetSize();
64  virtual void SetSize(int,int);
65  virtual void SetSize(int a[2]);
67 
70  int *GetActualSize();
71 
73  virtual int *GetScreenSize() = 0;
74 
76 
77  vtkSetMacro(Mapped,int);
78  vtkGetMacro(Mapped,int);
79  vtkBooleanMacro(Mapped,int);
81 
83 
87  vtkSetMacro(Erase,int);
88  vtkGetMacro(Erase,int);
89  vtkBooleanMacro(Erase,int);
91 
93 
94  vtkSetMacro(DoubleBuffer,int);
95  vtkGetMacro(DoubleBuffer,int);
96  vtkBooleanMacro(DoubleBuffer,int);
98 
100 
101  vtkGetStringMacro(WindowName);
102  vtkSetStringMacro(WindowName);
104 
107  virtual void Render() = 0;
108 
110 
119  virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
120  int front) = 0;
121  virtual int GetPixelData(int x, int y, int x2, int y2, int front,
124 
126 
128  vtkGetMacro(DPI,int);
129  vtkSetClampMacro(DPI,int,1,3000);
131 
133 
136  vtkSetMacro(OffScreenRendering,int);
137  vtkGetMacro(OffScreenRendering,int);
138  vtkBooleanMacro(OffScreenRendering,int);
140 
143  virtual void MakeCurrent() {}
144 
146 
151  vtkSetVector2Macro(TileScale,int);
152  vtkGetVector2Macro(TileScale,int);
153  void SetTileScale(int s) {this->SetTileScale(s,s);}
154  vtkSetVector4Macro(TileViewport,double);
155  vtkGetVector4Macro(TileViewport,double);
157 
158 protected:
159  int OffScreenRendering;
160  vtkWindow();
161  ~vtkWindow();
162 
163  char *WindowName;
164  int Size[2];
165  int Position[2];
166  int Mapped;
167  int Erase;
169  int DPI;
170 
171  double TileViewport[4];
172  int TileSize[2];
173  int TileScale[2];
174 
175 private:
176  vtkWindow(const vtkWindow&); // Not implemented.
177  void operator=(const vtkWindow&); // Not implemented.
178 };
179 
180 #endif
181 
182 
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
char * WindowName
Definition: vtkWindow.h:163
abstract base class for most VTK objects
Definition: vtkObject.h:61
void SetTileScale(int s)
Definition: vtkWindow.h:153
#define VTKCOMMONCORE_EXPORT
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:133
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
int DoubleBuffer
Definition: vtkWindow.h:168
int Erase
Definition: vtkWindow.h:167
virtual void PrintSelf(ostream &os, vtkIndent indent)
int Mapped
Definition: vtkWindow.h:166
#define vtkSetVector4Macro(name, type)
Definition: vtkSetGet.h:312
a simple class to control print indentation
Definition: vtkIndent.h:38
int OffScreenRendering
Definition: vtkWindow.h:155
#define vtkGetVector4Macro(name, type)
Definition: vtkSetGet.h:331
virtual void MakeCurrent()
Definition: vtkWindow.h:143
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
dynamic, self-adjusting array of unsigned char
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
#define vtkGetVector2Macro(name, type)
Definition: vtkSetGet.h:260
GLdouble s
Definition: vtkgl.h:11594
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
#define vtkSetVector2Macro(name, type)
Definition: vtkSetGet.h:244
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69