Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkWindow Class Reference

`#include <vtkWindow.h>`

Inheritance diagram for vtkWindow:

[legend]
Collaboration diagram for vtkWindow:

[legend]
List of all members.

## Detailed Description

window superclass for ImageWindow and RenderWindow

Date:
  2002/06/14 12:33:35

Revision:
  1.29

vtkWindow is an abstract object to specify the behavior of a rendering or imaging window. It contains vtkViewports.

See also:
  vtkImageWindow vtkRenderWindow vtkViewport

Created by:
  - Martin, Ken

CVS contributions (if > 5%):
  - Martin, Ken (71%)
  - Cedilnik, Andy (6%)

CVS logs (CVSweb):
  - .`cxx` (`/Common/vtkWindow.cxx)`
  - .`h` (`/Common/vtkWindow.h)`

Examples:
  vtkWindow (Examples)

Definition at line 50 of file vtkWindow.h.

## Public Types
typedef vtkObject | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | Render ()=0
virtual void | MakeCurrent ()
virtual void | SetDisplayId (void *)=0
virtual void | SetWindowId (void *)=0
virtual void | SetParentId (void *)=0
virtual void * | GetGenericDisplayId ()=0
virtual void * | GetGenericWindowId ()=0
virtual void * | GetGenericParentId ()=0
virtual void * | GetGenericContext ()=0
virtual void * | GetGenericDrawable ()=0
virtual void | SetWindowInfo (char *)=0
virtual void | SetParentInfo (char *)=0
virtual int * | GetPosition ()
virtual void | SetPosition (int, int)
virtual void | SetPosition (int a[2])
virtual int * | GetSize ()
virtual void | SetSize (int, int)
virtual void | SetSize (int a[2])
virtual void | SetMapped (int)
virtual int | GetMapped ()
virtual void | MappedOn ()
virtual void | MappedOff ()
virtual void | SetErase (int)
virtual int | GetErase ()
virtual void | EraseOn ()
virtual void | EraseOff ()
virtual void | SetDoubleBuffer (int)
virtual int | GetDoubleBuffer ()
virtual void | DoubleBufferOn ()
virtual void | DoubleBufferOff ()
virtual char * | GetWindowName ()
virtual void | SetWindowName (const char *)
virtual unsigned char * | GetPixelData (int, int, int, int, int)=0
virtual int | GetPixelData (int,int,int,int, int, vtkUnsignedCharArray *)=0
virtual int | GetDPI ()
virtual void | SetDPI (int)
virtual void | SetOffScreenRendering (int)
virtual int | GetOffScreenRendering ()
virtual void | OffScreenRenderingOn ()
virtual void | OffScreenRenderingOff ()
virtual void | SetTileScale (int)
virtual int | GetTileScale ()
virtual void | SetTileViewport (float, float, float, float)
virtual void | SetTileViewport (float[4])
virtual float * | GetTileViewport ()
virtual void | GetTileViewport (float &, float &, float &, float &)
virtual void | GetTileViewport (float[4])
## Static Public Methods
int | IsTypeOf (const char *type)
vtkWindow * | SafeDownCast (vtkObject *o)
## Protected Methods
| vtkWindow ()
| ~vtkWindow ()
## Protected Attributes
int | OffScreenRendering
char * | WindowName
int | Size [2]
int | Position [2]
int | Mapped
int | Erase
int | DoubleBuffer
int | DPI
float | TileViewport [4]
int | TileSize [2]
int | TileScale

## Member Typedef Documentation

typedef vtkObject vtkWindow::Superclass

| Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow. Definition at line 53 of file vtkWindow.h.

## Constructor & Destructor Documentation

vtkWindow::vtkWindow | ( |  | ) | `[protected]`

vtkWindow::~vtkWindow | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkWindow::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

int vtkWindow::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual int vtkWindow::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

vtkWindow* vtkWindow::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

void vtkWindow::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetDisplayId | ( | void * |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetWindowId | ( | void * |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetParentId | ( | void * |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void* vtkWindow::GetGenericDisplayId | ( |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void* vtkWindow::GetGenericWindowId | ( |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void* vtkWindow::GetGenericParentId | ( |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void* vtkWindow::GetGenericContext | ( |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void* vtkWindow::GetGenericDrawable | ( |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetWindowInfo | ( | char * |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetParentInfo | ( | char * |  | ) | `[pure virtual]`

| These are window system independent methods that are used to help interface vtkWindow to native windowing systems. Implemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual int* vtkWindow::GetPosition | ( |  | ) | `[virtual]`

| Set/Get the position in screen coordinates of the rendering window. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetPosition | ( | int | ,
|  | int |
| ) | `[virtual]`

| Set/Get the position in screen coordinates of the rendering window. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow. Referenced by vtkXOpenGLRenderWindow::SetPosition(), vtkXMesaRenderWindow::SetPosition(), and vtkWin32OpenGLRenderWindow::SetPosition().

virtual void vtkWindow::SetPosition | ( | int | a[2] | ) | `[virtual]`

| Set/Get the position in screen coordinates of the rendering window. Reimplemented in vtkWin32OpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual int* vtkWindow::GetSize | ( |  | ) | `[virtual]`

| Set/Get the size of the window in screen coordinates. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkWin32OpenGLRenderWindow, and vtkWinCEOpenGLRenderWindow.

virtual void vtkWindow::SetSize | ( | int | ,
|  | int |
| ) | `[virtual]`

| Set/Get the size of the window in screen coordinates. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow. Referenced by vtkXOpenGLRenderWindow::SetSize(), vtkXMesaRenderWindow::SetSize(), and vtkWin32OpenGLRenderWindow::SetSize().

virtual void vtkWindow::SetSize | ( | int | a[2] | ) | `[virtual]`

| Set/Get the size of the window in screen coordinates. Reimplemented in vtkWin32OpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::SetMapped | ( | int |  | ) | `[virtual]`

| Keep track of whether the rendering window has been mapped to screen.

virtual int vtkWindow::GetMapped | ( |  | ) | `[virtual]`

| Keep track of whether the rendering window has been mapped to screen.

virtual void vtkWindow::MappedOn | ( |  | ) | `[virtual]`

| Keep track of whether the rendering window has been mapped to screen.

virtual void vtkWindow::MappedOff | ( |  | ) | `[virtual]`

| Keep track of whether the rendering window has been mapped to screen.

virtual void vtkWindow::SetErase | ( | int |  | ) | `[virtual]`

| Turn on/off erasing the screen between images. This allows multiple exposure sequences if turned on. You will need to turn double buffering off or make use of the SwapBuffers methods to prevent you from swapping buffers between exposures.

virtual int vtkWindow::GetErase | ( |  | ) | `[virtual]`

| Turn on/off erasing the screen between images. This allows multiple exposure sequences if turned on. You will need to turn double buffering off or make use of the SwapBuffers methods to prevent you from swapping buffers between exposures.

virtual void vtkWindow::EraseOn | ( |  | ) | `[virtual]`

| Turn on/off erasing the screen between images. This allows multiple exposure sequences if turned on. You will need to turn double buffering off or make use of the SwapBuffers methods to prevent you from swapping buffers between exposures.

virtual void vtkWindow::EraseOff | ( |  | ) | `[virtual]`

| Turn on/off erasing the screen between images. This allows multiple exposure sequences if turned on. You will need to turn double buffering off or make use of the SwapBuffers methods to prevent you from swapping buffers between exposures.

virtual void vtkWindow::SetDoubleBuffer | ( | int |  | ) | `[virtual]`

| Keep track of whether double buffering is on or off

virtual int vtkWindow::GetDoubleBuffer | ( |  | ) | `[virtual]`

| Keep track of whether double buffering is on or off

virtual void vtkWindow::DoubleBufferOn | ( |  | ) | `[virtual]`

| Keep track of whether double buffering is on or off

virtual void vtkWindow::DoubleBufferOff | ( |  | ) | `[virtual]`

| Keep track of whether double buffering is on or off

virtual char* vtkWindow::GetWindowName | ( |  | ) | `[virtual]`

| Get name of rendering window

virtual void vtkWindow::SetWindowName | ( | const char * |  | ) | `[virtual]`

| Get name of rendering window Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkWin32OpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual void vtkWindow::Render | ( |  | ) | `[pure virtual]`

| Ask each viewport owned by this Window to render its image and synchronize this process. Implemented in vtkRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual unsigned char* vtkWindow::GetPixelData | ( | int | ,
|  | int | ,
|  | int | ,
|  | int | ,
|  | int |
| ) | `[pure virtual]`

| Get the pixel data of an image, transmitted as RGBRGBRGB. The front argument indicates if the front buffer should be used or the back buffer. It is the caller's responsibility to delete the resulting array. It is very important to realize that the memory in this array is organized from the bottom of the window to the top. The origin of the screen is in the lower left corner. The y axis increases as you go up the screen. So the storage of pixels is from left to right and from bottom to top. Implemented in vtkMesaRenderWindow, and vtkOpenGLRenderWindow.

virtual int vtkWindow::GetPixelData | ( | int | ,
|  | int | ,
|  | int | ,
|  | int | ,
|  | int | ,
|  | vtkUnsignedCharArray * |
| ) | `[pure virtual]`

| Get the pixel data of an image, transmitted as RGBRGBRGB. The front argument indicates if the front buffer should be used or the back buffer. It is the caller's responsibility to delete the resulting array. It is very important to realize that the memory in this array is organized from the bottom of the window to the top. The origin of the screen is in the lower left corner. The y axis increases as you go up the screen. So the storage of pixels is from left to right and from bottom to top. Implemented in vtkMesaRenderWindow, and vtkOpenGLRenderWindow.

virtual int vtkWindow::GetDPI | ( |  | ) | `[virtual]`

| Return a best estimate to the dots per inch of the display device being rendered (or printed).

virtual void vtkWindow::SetDPI | ( | int |  | ) | `[virtual]`

| Return a best estimate to the dots per inch of the display device being rendered (or printed).

virtual void vtkWindow::SetOffScreenRendering | ( | int |  | ) | `[virtual]`

| Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render. Reimplemented in vtkWin32OpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow.

virtual int vtkWindow::GetOffScreenRendering | ( |  | ) | `[virtual]`

| Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render.

virtual void vtkWindow::OffScreenRenderingOn | ( |  | ) | `[virtual]`

| Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render.

virtual void vtkWindow::OffScreenRenderingOff | ( |  | ) | `[virtual]`

| Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render.

virtual void vtkWindow::MakeCurrent | ( |  | ) | `[inline, virtual]`

| Make the window current. May be overridden in subclasses to do for example a glXMakeCurrent or a wglMakeCurrent. Reimplemented in vtkCarbonRenderWindow, vtkCocoaRenderWindow, vtkMesaRenderWindow, vtkOpenGLRenderWindow, vtkRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXMesaRenderWindow, and vtkXOpenGLRenderWindow. Definition at line 151 of file vtkWindow.h.

virtual void vtkWindow::SetTileScale | ( | int |  | ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual int vtkWindow::GetTileScale | ( |  | ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual void vtkWindow::SetTileViewport | ( | float | ,
|  | float | ,
|  | float | ,
|  | float |
| ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual void vtkWindow::SetTileViewport | ( | float | [4] | ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual float* vtkWindow::GetTileViewport | ( |  | ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual void vtkWindow::GetTileViewport | ( | float & | ,
|  | float & | ,
|  | float & | ,
|  | float & |
| ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

virtual void vtkWindow::GetTileViewport | ( | float | [4] | ) | `[virtual]`

| These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling. For 3D geometry these methods have no impact. It is just in handling annotation that this information must be available to the mappers and the coordinate calculations.

## Member Data Documentation

int vtkWindow::OffScreenRendering`[protected]`

| Definition at line 167 of file vtkWindow.h.

char* vtkWindow::WindowName`[protected]`

| Definition at line 171 of file vtkWindow.h.

int vtkWindow::Size[2]`[protected]`

| Definition at line 172 of file vtkWindow.h.

int vtkWindow::Position[2]`[protected]`

| Definition at line 173 of file vtkWindow.h.

int vtkWindow::Mapped`[protected]`

| Definition at line 174 of file vtkWindow.h.

int vtkWindow::Erase`[protected]`

| Definition at line 175 of file vtkWindow.h.

int vtkWindow::DoubleBuffer`[protected]`

| Definition at line 176 of file vtkWindow.h.

int vtkWindow::DPI`[protected]`

| Definition at line 177 of file vtkWindow.h.

float vtkWindow::TileViewport[4]`[protected]`

| Definition at line 179 of file vtkWindow.h.

int vtkWindow::TileSize[2]`[protected]`

| Definition at line 180 of file vtkWindow.h.

int vtkWindow::TileScale`[protected]`

| Definition at line 181 of file vtkWindow.h.

The documentation for this class was generated from the following file:

- Common/vtkWindow.h