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

Rendering/vtkXOpenGLRenderWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXOpenGLRenderWindow.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00051 #ifndef __vtkXOpenGLRenderWindow_h
00052 #define __vtkXOpenGLRenderWindow_h
00053 
00054 #include "vtkOpenGLRenderWindow.h"
00055 #include <X11/Xlib.h> // Needed for X types used in the public interface
00056 #include <X11/Xutil.h> // Needed for X types used in the public interface
00057 
00058 class vtkIdList;
00059 class vtkXOpenGLRenderWindowInternal;
00060 
00061 class VTK_RENDERING_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow
00062 {
00063 public:
00064   static vtkXOpenGLRenderWindow *New();
00065   vtkTypeRevisionMacro(vtkXOpenGLRenderWindow,vtkOpenGLRenderWindow);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00069   virtual void Start(void);
00070 
00072   virtual void Frame(void);
00073 
00075   virtual void WindowInitialize(void);
00076 
00078   virtual void Initialize(void);
00079 
00081   virtual void SetFullScreen(int);
00082 
00084   virtual void WindowRemap(void);
00085 
00087   virtual void PrefFullScreen(void);
00088 
00090 
00091   virtual void SetSize(int,int);
00092   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
00094 
00096 
00097   virtual Colormap GetDesiredColormap();
00098   virtual Visual  *GetDesiredVisual();
00099   virtual XVisualInfo     *GetDesiredVisualInfo();
00100   virtual int      GetDesiredDepth();
00102 
00107   virtual void SetStereoCapableWindow(int capable);
00108 
00110   void MakeCurrent();
00111 
00115   void SetForceMakeCurrent();
00116 
00118   const char *ReportCapabilities();
00119 
00121   int SupportsOpenGL();
00122 
00124   int IsDirect();
00125 
00127 
00128   virtual void *GetGenericDisplayId() {return (void *)this->GetDisplayId();};
00129   virtual void *GetGenericWindowId();
00130   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
00131   virtual void *GetGenericContext();
00132   virtual void *GetGenericDrawable()  {return (void *)this->WindowId;};
00134   
00136   virtual int     *GetScreenSize();
00137 
00139   virtual int     *GetPosition();
00140 
00142   Display *GetDisplayId();
00143 
00145 
00147   void     SetDisplayId(Display *);
00148   void     SetDisplayId(void *);
00150 
00152   Window   GetParentId();
00153 
00155 
00156   void     SetParentId(Window);
00157   void     SetParentId(void *);
00159   
00161   Window   GetWindowId();
00162 
00164 
00165   void     SetWindowId(Window);
00166   void     SetWindowId(void *);
00168 
00170 
00171   void     SetNextWindowId(Window);
00172   void     SetWindowName(const char *);
00174 
00176 
00177   void     SetPosition(int,int);
00178   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
00180   
00182 
00184   void HideCursor();
00185   void ShowCursor();
00187 
00189   virtual void SetCurrentCursor(int);
00190 
00194   virtual  int GetEventPending();
00195   
00197   void     SetWindowInfo(char *info);
00198 
00200   void     SetParentInfo(char *info);
00201 
00204   void Render();  
00205 
00207   void SetOffScreenRendering(int i);
00208 
00209 protected:
00210   vtkXOpenGLRenderWindow();
00211   ~vtkXOpenGLRenderWindow();
00212 
00213   vtkXOpenGLRenderWindowInternal *Internal;
00214   
00215   Window   ParentId;
00216   Window   WindowId;
00217   Window   NextWindowId;
00218   Display *DisplayId;
00219   Colormap ColorMap;
00220   int      OwnWindow;
00221   int      OwnDisplay;
00222   int      ScreenSize[2];
00223   int      CursorHidden;
00224   int      ForceMakeCurrent;
00225   int      UsingHardware;
00226   char    *Capabilities;
00227 
00228   // we must keep track of the cursors we are using
00229   Cursor XCArrow;
00230   Cursor XCSizeAll;
00231   Cursor XCSizeNS;
00232   Cursor XCSizeWE;
00233   Cursor XCSizeNE;
00234   Cursor XCSizeNW;
00235   Cursor XCSizeSE;
00236   Cursor XCSizeSW;
00237   
00238 private:
00239   vtkXOpenGLRenderWindow(const vtkXOpenGLRenderWindow&);  // Not implemented.
00240   void operator=(const vtkXOpenGLRenderWindow&);  // Not implemented.
00241 };
00242 
00243 
00244 
00245 #endif