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 =========================================================================*/
26 #ifndef vtkWindow_h
27 #define vtkWindow_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 
34 class VTKCOMMONCORE_EXPORT vtkWindow : public vtkObject
35 {
36 public:
37  vtkTypeMacro(vtkWindow,vtkObject);
38  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 
41 
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 
61  virtual int *GetPosition();
62  virtual void SetPosition(int,int);
63  virtual void SetPosition(int a[2]);
65 
67 
70  virtual int *GetSize();
71  virtual void SetSize(int,int);
72  virtual void SetSize(int a[2]);
74 
79  int *GetActualSize();
80 
84  virtual int *GetScreenSize() = 0;
85 
87 
90  vtkSetMacro(Mapped,int);
91  vtkGetMacro(Mapped,int);
92  vtkBooleanMacro(Mapped,int);
94 
96 
102  vtkSetMacro(Erase,int);
103  vtkGetMacro(Erase,int);
104  vtkBooleanMacro(Erase,int);
106 
108 
111  vtkSetMacro(DoubleBuffer,int);
112  vtkGetMacro(DoubleBuffer,int);
113  vtkBooleanMacro(DoubleBuffer,int);
115 
117 
120  vtkGetStringMacro(WindowName);
121  vtkSetStringMacro(WindowName);
123 
128  virtual void Render() = 0;
129 
131 
143  virtual unsigned char *GetPixelData(int x, int y, int x2, int y2,
144  int front) = 0;
145  virtual int GetPixelData(int x, int y, int x2, int y2, int front,
148 
150 
154  vtkGetMacro(DPI,int);
155  vtkSetClampMacro(DPI,int,1,VTK_INT_MAX);
157 
164  virtual bool DetectDPI() { return false; }
165 
167 
172  vtkSetMacro(OffScreenRendering,int);
173  vtkGetMacro(OffScreenRendering,int);
174  vtkBooleanMacro(OffScreenRendering,int);
176 
181  virtual void MakeCurrent() {}
182 
184 
190  vtkSetVector2Macro(TileScale,int);
191  vtkGetVector2Macro(TileScale,int);
192  void SetTileScale(int s) {this->SetTileScale(s,s);}
193  vtkSetVector4Macro(TileViewport,double);
194  vtkGetVector4Macro(TileViewport,double);
196 
197 protected:
200  ~vtkWindow() VTK_OVERRIDE;
201 
202  char *WindowName;
203  int Size[2];
204  int Position[2];
205  int Mapped;
206  int Erase;
207  int DoubleBuffer;
208  int DPI;
209 
210  double TileViewport[4];
211  int TileSize[2];
212  int TileScale[2];
213 
214 private:
215  vtkWindow(const vtkWindow&) VTK_DELETE_FUNCTION;
216  void operator=(const vtkWindow&) VTK_DELETE_FUNCTION;
217 };
218 
219 #endif
220 
221 
vtkWindow::OffScreenRendering
int OffScreenRendering
Definition: vtkWindow.h:194
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkWindow::GetGenericParentId
virtual void * GetGenericParentId()=0
vtkWindow::SetSize
virtual void SetSize(int, int)
vtkWindow::~vtkWindow
~vtkWindow() override
vtkWindow::SetDisplayId
virtual void SetDisplayId(void *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkWindow::GetSize
virtual int * GetSize()
Set/Get the size of the window in screen coordinates in pixels.
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkWindow::vtkWindow
vtkWindow()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkWindow::GetGenericContext
virtual void * GetGenericContext()=0
vtkWindow::GetScreenSize
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
vtkWindow::GetPixelData
virtual int GetPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data)=0
vtkWindow::SetPosition
virtual void SetPosition(int a[2])
vtkWindow::SetTileScale
void SetTileScale(int s)
Definition: vtkWindow.h:192
vtkWindow::DetectDPI
virtual bool DetectDPI()
Attempt to detect and set the DPI of the display device by querying the system.
Definition: vtkWindow.h:164
vtkWindow::GetGenericDrawable
virtual void * GetGenericDrawable()=0
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkWindow::GetActualSize
int * GetActualSize()
GetSize() returns the size * this->TileScale, whereas this method returns the size without multiplyin...
vtkWindow::SetWindowId
virtual void SetWindowId(void *)=0
vtkWindow::SetSize
virtual void SetSize(int a[2])
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWindow::SetWindowInfo
virtual void SetWindowInfo(char *)=0
vtkWindow::Render
virtual void Render()=0
Ask each viewport owned by this Window to render its image and synchronize this process.
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkObject.h
vtkWindow::GetPixelData
virtual unsigned char * GetPixelData(int x, int y, int x2, int y2, int front)=0
Get the pixel data of an image, transmitted as RGBRGBRGB.
vtkWindow::GetPosition
virtual int * GetPosition()
Set/Get the position in screen coordinates of the rendering window.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkWindow::MakeCurrent
virtual void MakeCurrent()
Make the window current.
Definition: vtkWindow.h:181
vtkWindow::SetPosition
virtual void SetPosition(int, int)
vtkWindow::GetGenericDisplayId
virtual void * GetGenericDisplayId()=0
vtkWindow::GetGenericWindowId
virtual void * GetGenericWindowId()=0
vtkWindow::SetParentInfo
virtual void SetParentInfo(char *)=0
vtkWindow::SetParentId
virtual void SetParentId(void *)=0