VTK
dox/Rendering/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 "vtkOpenGLRenderWindow.h"
00035 
00036 class vtkIdList;
00037 class vtkOSOpenGLRenderWindowInternal;
00038 
00039 class VTK_RENDERING_EXPORT vtkOSOpenGLRenderWindow : public vtkOpenGLRenderWindow
00040 {
00041 public:
00042   static vtkOSOpenGLRenderWindow *New();
00043   vtkTypeMacro(vtkOSOpenGLRenderWindow,vtkOpenGLRenderWindow);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047   virtual void Start(void);
00048 
00050   virtual void Frame(void);
00051 
00053   virtual void WindowInitialize(void);
00054 
00059   virtual void Initialize(void);
00060 
00065   virtual void Finalize(void);
00066 
00068   virtual void SetFullScreen(int);
00069 
00071 
00072   virtual void SetSize(int x,int y);
00073   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
00075 
00077   virtual int     *GetScreenSize();
00078 
00080   virtual int     *GetPosition();
00081 
00083 
00084   void     SetPosition(int x, int y);
00085   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
00087 
00092   virtual void SetStereoCapableWindow(int capable);
00093 
00095   void MakeCurrent();
00096 
00099   virtual bool IsCurrent();
00100   
00104   void SetForceMakeCurrent();
00105 
00107   const char *ReportCapabilities();
00108 
00110   int SupportsOpenGL();
00111 
00113   int IsDirect();
00114 
00116   virtual void WindowRemap(void);
00117 
00119 
00120   virtual void *GetGenericDisplayId() {return 0;}
00121   virtual void *GetGenericWindowId();
00122   virtual void *GetGenericParentId()  {return 0;}
00123   virtual void *GetGenericContext();
00124   virtual void *GetGenericDrawable()  {return 0;}
00126 
00129   void     SetDisplayId(void *) {}
00130 
00132   void     SetParentId(void *);
00133   
00135   void     SetWindowId(void *);
00136 
00139   void     SetNextWindowId(void *);
00140 
00141   void     SetWindowName(const char *);
00142 
00144 
00146   void HideCursor() {}
00147   void ShowCursor() {}
00149 
00151   virtual void SetCurrentCursor(int);
00152 
00156   virtual  int GetEventPending();
00157   
00159   void     SetWindowInfo(char *info);
00160 
00162   void     SetNextWindowInfo(char *info);
00163 
00165   void     SetParentInfo(char *info);
00166 
00168   void SetOffScreenRendering(int i);
00169 
00170 protected:
00171   vtkOSOpenGLRenderWindow();
00172   ~vtkOSOpenGLRenderWindow();
00173 
00174   vtkOSOpenGLRenderWindowInternal *Internal;
00175 
00176   int      OwnWindow;
00177   int      OwnDisplay;
00178   int      ScreenSize[2];
00179   int      CursorHidden;
00180   int      ForceMakeCurrent;
00181   char    *Capabilities;
00182 
00183   void CreateAWindow();
00184   void DestroyWindow();
00185   void CreateOffScreenWindow(int width, int height);
00186   void DestroyOffScreenWindow();
00187   void ResizeOffScreenWindow(int width, int height);
00188 
00189   
00190 private:
00191   vtkOSOpenGLRenderWindow(const vtkOSOpenGLRenderWindow&);  // Not implemented.
00192   void operator=(const vtkOSOpenGLRenderWindow&);  // Not implemented.
00193 };
00194 
00195 
00196 
00197 #endif