Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00050 #ifndef __vtkXOpenGLRenderWindow_h
    00051 #define __vtkXOpenGLRenderWindow_h
    00052
    00053 #include "vtkOpenGLRenderWindow.h"
    00054 #include <X11/Xlib.h> // Needed for X types used in the public interface
    00055 #include <X11/Xutil.h> // Needed for X types used in the public interface
    00056
    00057 class vtkIdList;
    00058 class vtkXOpenGLRenderWindowInternal;
    00059
    00060 class VTK_RENDERING_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow
    00061 {
    00062 public:
    00063   static vtkXOpenGLRenderWindow *New();
    00064   vtkTypeRevisionMacro(vtkXOpenGLRenderWindow,vtkOpenGLRenderWindow);
    00065   void PrintSelf(ostream& os, vtkIndent indent);
    00066
    00068   virtual void Start(void);
    00069
    00071   virtual void Frame(void);
    00072
    00074   virtual void WindowInitialize(void);
    00075
    00077   virtual void Initialize(void);
    00078
    00080   virtual void SetFullScreen(int);
    00081
    00083   virtual void WindowRemap(void);
    00084
    00086   virtual void PrefFullScreen(void);
    00087
    00089
    00090   virtual void SetSize(int,int);
    00091   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
    00093
    00095
    00096   virtual Colormap GetDesiredColormap();
    00097   virtual Visual  *GetDesiredVisual();
    00098   virtual XVisualInfo     *GetDesiredVisualInfo();
    00099   virtual int      GetDesiredDepth();
    00101
    00106   virtual void SetStereoCapableWindow(int capable);
    00107
    00109   void MakeCurrent();
    00110
    00114   void SetForceMakeCurrent();
    00115
    00117   const char *ReportCapabilities();
    00118
    00120   int SupportsOpenGL();
    00121
    00123   int IsDirect();
    00124
    00126
    00127   virtual void *GetGenericDisplayId() {return (void *)this->GetDisplayId();};
    00128   virtual void *GetGenericWindowId();
    00129   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
    00130   virtual void *GetGenericContext();
    00131   virtual void *GetGenericDrawable()  {return (void *)this->WindowId;};
    00133
    00135   virtual int     *GetScreenSize();
    00136
    00138   virtual int     *GetPosition();
    00139
    00141   Display *GetDisplayId();
    00142
    00144
    00146   void     SetDisplayId(Display *);
    00147   void     SetDisplayId(void *);
    00149
    00151   Window   GetParentId();
    00152
    00154
    00155   void     SetParentId(Window);
    00156   void     SetParentId(void *);
    00158
    00160   Window   GetWindowId();
    00161
    00163
    00164   void     SetWindowId(Window);
    00165   void     SetWindowId(void *);
    00167
    00169
    00170   void     SetNextWindowId(Window);
    00171   void     SetWindowName(const char *);
    00173
    00175
    00176   void     SetPosition(int,int);
    00177   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
    00179
    00181
    00183   void HideCursor();
    00184   void ShowCursor();
    00186
    00188   virtual void SetCurrentCursor(int);
    00189
    00193   virtual  int GetEventPending();
    00194
    00196   void     SetWindowInfo(char *info);
    00197
    00199   void     SetParentInfo(char *info);
    00200
    00203   void Render();
    00204
    00206   void SetOffScreenRendering(int i);
    00207
    00208 protected:
    00209   vtkXOpenGLRenderWindow();
    00210   ~vtkXOpenGLRenderWindow();
    00211
    00212   vtkXOpenGLRenderWindowInternal *Internal;
    00213
    00214   Window   ParentId;
    00215   Window   WindowId;
    00216   Window   NextWindowId;
    00217   Display *DisplayId;
    00218   Colormap ColorMap;
    00219   int      OwnWindow;
    00220   int      OwnDisplay;
    00221   int      ScreenSize[2];
    00222   int      CursorHidden;
    00223   int      ForceMakeCurrent;
    00224   int      UsingHardware;
    00225   char    *Capabilities;
    00226
    00227   // we must keep track of the cursors we are using
    00228   Cursor XCArrow;
    00229   Cursor XCSizeAll;
    00230   Cursor XCSizeNS;
    00231   Cursor XCSizeWE;
    00232   Cursor XCSizeNE;
    00233   Cursor XCSizeNW;
    00234   Cursor XCSizeSE;
    00235   Cursor XCSizeSW;
    00236
    00237 private:
    00238   vtkXOpenGLRenderWindow(const vtkXOpenGLRenderWindow&);  // Not implemented.
    00239   void operator=(const vtkXOpenGLRenderWindow&);  // Not implemented.
    00240 };
    00241
    00242
    00243
    00244 #endif