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
34class VTKCOMMONCORE_EXPORT vtkWindow : public vtkObject
35{
36public:
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
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
197protected:
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
214private:
215 vtkWindow(const vtkWindow&) VTK_DELETE_FUNCTION;
216 void operator=(const vtkWindow&) VTK_DELETE_FUNCTION;
217};
218
219#endif
220
221
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
dynamic, self-adjusting array of unsigned char
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
virtual void * GetGenericContext()=0
int OffScreenRendering
Definition: vtkWindow.h:198
virtual bool DetectDPI()
Attempt to detect and set the DPI of the display device by querying the system.
Definition: vtkWindow.h:164
virtual void * GetGenericWindowId()=0
virtual void * GetGenericParentId()=0
int * GetActualSize()
GetSize() returns the size * this->TileScale, whereas this method returns the size without multiplyin...
~vtkWindow() override
virtual int GetPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data)=0
virtual void SetParentInfo(char *)=0
virtual void * GetGenericDisplayId()=0
virtual void SetPosition(int, int)
virtual void SetWindowInfo(char *)=0
virtual void SetWindowId(void *)=0
virtual int * GetPosition()
Set/Get the position in screen coordinates of the rendering window.
virtual void SetParentId(void *)=0
virtual void SetDisplayId(void *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual void Render()=0
Ask each viewport owned by this Window to render its image and synchronize this process.
virtual void SetSize(int, int)
virtual void SetSize(int a[2])
virtual void * GetGenericDrawable()=0
virtual void SetPosition(int a[2])
virtual int * GetSize()
Set/Get the size of the window in screen coordinates in pixels.
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
void SetTileScale(int s)
Definition: vtkWindow.h:192
virtual void MakeCurrent()
Make the window current.
Definition: vtkWindow.h:181
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
#define VTK_INT_MAX
Definition: vtkType.h:153