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,VTK_INT_MAX);
131 
136  virtual bool DetectDPI() { return false; }
137 
139 
142  vtkSetMacro(OffScreenRendering,int);
143  vtkGetMacro(OffScreenRendering,int);
144  vtkBooleanMacro(OffScreenRendering,int);
146 
149  virtual void MakeCurrent() {}
150 
152 
157  vtkSetVector2Macro(TileScale,int);
158  vtkGetVector2Macro(TileScale,int);
159  void SetTileScale(int s) {this->SetTileScale(s,s);}
160  vtkSetVector4Macro(TileViewport,double);
161  vtkGetVector4Macro(TileViewport,double);
163 
164 protected:
165  int OffScreenRendering;
166  vtkWindow();
167  ~vtkWindow();
168 
169  char *WindowName;
170  int Size[2];
171  int Position[2];
172  int Mapped;
173  int Erase;
175  int DPI;
176 
177  double TileViewport[4];
178  int TileSize[2];
179  int TileScale[2];
180 
181 private:
182  vtkWindow(const vtkWindow&); // Not implemented.
183  void operator=(const vtkWindow&); // Not implemented.
184 };
185 
186 #endif
187 
188 
char * WindowName
Definition: vtkWindow.h:169
abstract base class for most VTK objects
Definition: vtkObject.h:61
void SetTileScale(int s)
Definition: vtkWindow.h:159
#define VTKCOMMONCORE_EXPORT
#define VTK_INT_MAX
Definition: vtkType.h:132
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
int DoubleBuffer
Definition: vtkWindow.h:174
int Erase
Definition: vtkWindow.h:173
virtual void PrintSelf(ostream &os, vtkIndent indent)
int Mapped
Definition: vtkWindow.h:172
#define vtkSetVector4Macro(name, type)
Definition: vtkSetGet.h:322
a simple class to control print indentation
Definition: vtkIndent.h:38
int OffScreenRendering
Definition: vtkWindow.h:161
#define vtkGetVector4Macro(name, type)
Definition: vtkSetGet.h:341
virtual void MakeCurrent()
Definition: vtkWindow.h:149
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:130
virtual bool DetectDPI()
Definition: vtkWindow.h:136
dynamic, self-adjusting array of unsigned char
#define vtkGetVector2Macro(name, type)
Definition: vtkSetGet.h:270
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:244
#define vtkSetVector2Macro(name, type)
Definition: vtkSetGet.h:254
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:79