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 =========================================================================*/
29 #ifndef vtkWindow_h
30 #define vtkWindow_h
31 
32 #include "vtkCommonCoreModule.h" // For export macro
33 #include "vtkObject.h"
34 
36 
37 class VTKCOMMONCORE_EXPORT vtkWindow : public vtkObject
38 {
39 public:
40  vtkTypeMacro(vtkWindow,vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44 
48  virtual void SetDisplayId(void *) = 0;
49  virtual void SetWindowId(void *) = 0;
50  virtual void SetParentId(void *) = 0;
51  virtual void *GetGenericDisplayId() = 0;
52  virtual void *GetGenericWindowId() = 0;
53  virtual void *GetGenericParentId() = 0;
54  virtual void *GetGenericContext() = 0;
55  virtual void *GetGenericDrawable() = 0;
56  virtual void SetWindowInfo(char *) = 0;
57  virtual void SetParentInfo(char *) = 0;
59 
61 
64  virtual int *GetPosition();
65  virtual void SetPosition(int,int);
66  virtual void SetPosition(int a[2]);
68 
70 
73  virtual int *GetSize();
74  virtual void SetSize(int,int);
75  virtual void SetSize(int a[2]);
77 
82  int *GetActualSize();
83 
87  virtual int *GetScreenSize() = 0;
88 
90 
93  vtkSetMacro(Mapped,int);
94  vtkGetMacro(Mapped,int);
95  vtkBooleanMacro(Mapped,int);
97 
99 
105  vtkSetMacro(Erase,int);
106  vtkGetMacro(Erase,int);
107  vtkBooleanMacro(Erase,int);
109 
111 
114  vtkSetMacro(DoubleBuffer,int);
115  vtkGetMacro(DoubleBuffer,int);
116  vtkBooleanMacro(DoubleBuffer,int);
118 
120 
123  vtkGetStringMacro(WindowName);
124  vtkSetStringMacro(WindowName);
126 
131  virtual void Render() = 0;
132 
134 
146  virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
147  int front) = 0;
148  virtual int GetPixelData(int x, int y, int x2, int y2, int front,
151 
153 
157  vtkGetMacro(DPI,int);
158  vtkSetClampMacro(DPI,int,1,VTK_INT_MAX);
160 
167  virtual bool DetectDPI() { return false; }
168 
170 
175  vtkSetMacro(OffScreenRendering,int);
176  vtkGetMacro(OffScreenRendering,int);
177  vtkBooleanMacro(OffScreenRendering,int);
179 
184  virtual void MakeCurrent() {}
185 
187 
193  vtkSetVector2Macro(TileScale,int);
194  vtkGetVector2Macro(TileScale,int);
195  void SetTileScale(int s) {this->SetTileScale(s,s);}
196  vtkSetVector4Macro(TileViewport,double);
197  vtkGetVector4Macro(TileViewport,double);
199 
200 protected:
201  int OffScreenRendering;
202  vtkWindow();
203  ~vtkWindow() VTK_OVERRIDE;
204 
205  char *WindowName;
206  int Size[2];
207  int Position[2];
208  int Mapped;
209  int Erase;
210  int DoubleBuffer;
211  int DPI;
212 
213  double TileViewport[4];
214  int TileSize[2];
215  int TileScale[2];
216 
217 private:
218  vtkWindow(const vtkWindow&) VTK_DELETE_FUNCTION;
219  void operator=(const vtkWindow&) VTK_DELETE_FUNCTION;
220 };
221 
222 #endif
223 
224 
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTileScale(int s)
These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by ...
Definition: vtkWindow.h:195
#define VTK_INT_MAX
Definition: vtkType.h:153
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
int OffScreenRendering
Definition: vtkWindow.h:197
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual void MakeCurrent()
Make the window current.
Definition: vtkWindow.h:184
virtual bool DetectDPI()
Attempt to detect and set the DPI of the display device by querying the system.
Definition: vtkWindow.h:167
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.