VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/OpenGL2/vtkOSOpenGLRenderWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkOSOpenGLRenderWindow.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00031 #ifndef vtkOSOpenGLRenderWindow_h
00032 #define vtkOSOpenGLRenderWindow_h
00033 
00034 #include "vtkRenderingOpenGL2Module.h" // For export macro
00035 #include "vtkOpenGLRenderWindow.h"
00036 
00037 class vtkIdList;
00038 class vtkOSOpenGLRenderWindowInternal;
00039 
00040 class VTKRENDERINGOPENGL2_EXPORT vtkOSOpenGLRenderWindow : public vtkOpenGLRenderWindow
00041 {
00042 public:
00043   static vtkOSOpenGLRenderWindow *New();
00044   vtkTypeMacro(vtkOSOpenGLRenderWindow,vtkOpenGLRenderWindow);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048   virtual void Start(void);
00049 
00051   virtual void Frame(void);
00052 
00054   virtual void WindowInitialize(void);
00055 
00060   virtual void Initialize(void);
00061 
00066   virtual void Finalize(void);
00067 
00069   virtual void SetFullScreen(int);
00070 
00072 
00073   virtual void SetSize(int x,int y);
00074   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
00076 
00078   virtual int     *GetScreenSize();
00079 
00081   virtual int     *GetPosition();
00082 
00084 
00085   void     SetPosition(int x, int y);
00086   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
00088 
00093   virtual void SetStereoCapableWindow(int capable);
00094 
00096   void MakeCurrent();
00097 
00100   virtual bool IsCurrent();
00101 
00105   void SetForceMakeCurrent();
00106 
00108   const char *ReportCapabilities();
00109 
00111   int SupportsOpenGL();
00112 
00114   int IsDirect();
00115 
00117   virtual void WindowRemap(void);
00118 
00120 
00121   virtual void *GetGenericDisplayId() {return 0;}
00122   virtual void *GetGenericWindowId();
00123   virtual void *GetGenericParentId()  {return 0;}
00124   virtual void *GetGenericContext();
00125   virtual void *GetGenericDrawable()  {return 0;}
00127 
00130   void     SetDisplayId(void *) {}
00131 
00133   void     SetParentId(void *);
00134 
00136   void     SetWindowId(void *);
00137 
00140   void     SetNextWindowId(void *);
00141 
00142   void     SetWindowName(const char *);
00143 
00145 
00147   void HideCursor() {}
00148   void ShowCursor() {}
00150 
00152   virtual void SetCurrentCursor(int);
00153 
00157   virtual  int GetEventPending();
00158 
00160   void     SetWindowInfo(char *info);
00161 
00163   void     SetNextWindowInfo(char *info);
00164 
00166   void     SetParentInfo(char *info);
00167 
00169   void SetOffScreenRendering(int i);
00170 
00171 protected:
00172   vtkOSOpenGLRenderWindow();
00173   ~vtkOSOpenGLRenderWindow();
00174 
00175   vtkOSOpenGLRenderWindowInternal *Internal;
00176 
00177   int      OwnWindow;
00178   int      OwnDisplay;
00179   int      ScreenSize[2];
00180   int      CursorHidden;
00181   int      ForceMakeCurrent;
00182   char    *Capabilities;
00183 
00184   void CreateAWindow();
00185   void DestroyWindow();
00186   void CreateOffScreenWindow(int width, int height);
00187   void DestroyOffScreenWindow();
00188   void ResizeOffScreenWindow(int width, int height);
00189 
00190 
00191 private:
00192   vtkOSOpenGLRenderWindow(const vtkOSOpenGLRenderWindow&);  // Not implemented.
00193   void operator=(const vtkOSOpenGLRenderWindow&);  // Not implemented.
00194 };
00195 
00196 
00197 
00198 #endif