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

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 =========================================================================*/
00037 #ifndef __vtkXOpenGLRenderWindow_h
00038 #define __vtkXOpenGLRenderWindow_h
00039 
00040 #include "vtkOpenGLRenderWindow.h"
00041 #include <X11/Xlib.h> // Needed for X types used in the public interface
00042 #include <X11/Xutil.h> // Needed for X types used in the public interface
00043 
00044 class vtkIdList;
00045 class vtkXOpenGLRenderWindowInternal;
00046 
00047 class VTK_RENDERING_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow
00048 {
00049 public:
00050   static vtkXOpenGLRenderWindow *New();
00051   vtkTypeRevisionMacro(vtkXOpenGLRenderWindow,vtkOpenGLRenderWindow);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055   virtual void Start(void);
00056 
00058   virtual void Frame(void);
00059 
00061   virtual void WindowInitialize(void);
00062 
00064   virtual void Initialize(void);
00065 
00067   virtual void SetFullScreen(int);
00068 
00070   virtual void WindowRemap(void);
00071 
00073   virtual void PrefFullScreen(void);
00074 
00076 
00077   virtual void SetSize(int,int);
00078   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
00080 
00082 
00083   virtual Colormap GetDesiredColormap();
00084   virtual Visual  *GetDesiredVisual();
00085   virtual XVisualInfo     *GetDesiredVisualInfo();
00086   virtual int      GetDesiredDepth();
00088 
00093   virtual void SetStereoCapableWindow(int capable);
00094 
00096   void MakeCurrent();
00097 
00101   void SetForceMakeCurrent();
00102 
00104   const char *ReportCapabilities();
00105 
00107   int SupportsOpenGL();
00108 
00110   int IsDirect();
00111 
00113 
00114   virtual void *GetGenericDisplayId() {return (void *)this->GetDisplayId();};
00115   virtual void *GetGenericWindowId();
00116   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
00117   virtual void *GetGenericContext();
00118   virtual void *GetGenericDrawable()  {return (void *)this->WindowId;};
00120   
00122   virtual int     *GetScreenSize();
00123 
00125   virtual int     *GetPosition();
00126 
00128   Display *GetDisplayId();
00129 
00131 
00133   void     SetDisplayId(Display *);
00134   void     SetDisplayId(void *);
00136 
00138   Window   GetParentId();
00139 
00141 
00142   void     SetParentId(Window);
00143   void     SetParentId(void *);
00145   
00147   Window   GetWindowId();
00148 
00150 
00151   void     SetWindowId(Window);
00152   void     SetWindowId(void *);
00154 
00156 
00157   void     SetNextWindowId(Window);
00158   void     SetWindowName(const char *);
00160 
00162 
00163   void     SetPosition(int,int);
00164   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
00166   
00168 
00170   void HideCursor();
00171   void ShowCursor();
00173 
00175   virtual void SetCurrentCursor(int);
00176 
00180   virtual  int GetEventPending();
00181   
00183   void     SetWindowInfo(char *info);
00184 
00186   void     SetParentInfo(char *info);
00187 
00190   void Render();  
00191 
00193   void SetOffScreenRendering(int i);
00194 
00195 protected:
00196   vtkXOpenGLRenderWindow();
00197   ~vtkXOpenGLRenderWindow();
00198 
00199   vtkXOpenGLRenderWindowInternal *Internal;
00200   
00201   Window   ParentId;
00202   Window   WindowId;
00203   Window   NextWindowId;
00204   Display *DisplayId;
00205   Colormap ColorMap;
00206   int      OwnWindow;
00207   int      OwnDisplay;
00208   int      ScreenSize[2];
00209   int      CursorHidden;
00210   int      ForceMakeCurrent;
00211   int      UsingHardware;
00212   char    *Capabilities;
00213 
00214   // we must keep track of the cursors we are using
00215   Cursor XCArrow;
00216   Cursor XCSizeAll;
00217   Cursor XCSizeNS;
00218   Cursor XCSizeWE;
00219   Cursor XCSizeNE;
00220   Cursor XCSizeNW;
00221   Cursor XCSizeSE;
00222   Cursor XCSizeSW;
00223   
00224 private:
00225   vtkXOpenGLRenderWindow(const vtkXOpenGLRenderWindow&);  // Not implemented.
00226   void operator=(const vtkXOpenGLRenderWindow&);  // Not implemented.
00227 };
00228 
00229 
00230 
00231 #endif