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

Rendering/vtkXMesaRenderWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMesaRenderWindow.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 =========================================================================*/
00042 #ifndef __vtkXMesaRenderWindow_h
00043 #define __vtkXMesaRenderWindow_h
00044 
00045 #include "vtkMesaRenderWindow.h"
00046 #include <X11/Xlib.h> // Needed for X types used in the public interface
00047 #include <X11/Xutil.h> // Needed for X types used in the public interface
00048 
00049 class vtkIdList;
00050 class vtkXMesaRenderWindowInternal;
00051 
00052 class VTK_RENDERING_EXPORT vtkXMesaRenderWindow : public vtkMesaRenderWindow
00053 {
00054 public:
00055   static vtkXMesaRenderWindow *New();
00056   vtkTypeRevisionMacro(vtkXMesaRenderWindow,vtkMesaRenderWindow);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060   virtual void Start(void);
00061 
00063   virtual void Frame(void);
00064 
00066   virtual void WindowInitialize(void);
00067 
00069   virtual void Initialize(void);
00070 
00072   virtual void SetFullScreen(int);
00073 
00075   virtual void WindowRemap(void);
00076 
00078   virtual void PrefFullScreen(void);
00079 
00081 
00082   virtual void SetSize(int,int);
00083   virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
00085 
00087 
00088   virtual Colormap GetDesiredColormap();
00089   virtual Visual  *GetDesiredVisual();
00090   virtual XVisualInfo     *GetDesiredVisualInfo();
00091   virtual int      GetDesiredDepth();
00093 
00098   virtual void SetStereoCapableWindow(int capable);
00099 
00101   void MakeCurrent();
00102   
00106   void SetForceMakeCurrent();
00107 
00109   const char *ReportCapabilities();
00110 
00112   int SupportsOpenGL();
00113 
00115   int IsDirect();
00116 
00118 
00119   virtual void *GetGenericDisplayId() {return (void *)this->GetDisplayId();};
00120   virtual void *GetGenericWindowId();
00121   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
00122   virtual void *GetGenericContext();
00123   virtual void *GetGenericDrawable()  {return (void *)this->WindowId;};
00125   
00127   virtual int     *GetScreenSize();
00128 
00130   virtual int     *GetPosition();
00131 
00133   Display *GetDisplayId();
00134 
00136 
00138   void     SetDisplayId(Display *);
00139   void     SetDisplayId(void *);
00141 
00143   Window   GetParentId();
00144 
00146 
00147   void     SetParentId(Window);
00148   void     SetParentId(void *);
00150   
00152   Window   GetWindowId();
00153 
00155 
00156   void     SetWindowId(Window);
00157   void     SetWindowId(void *);
00159 
00161 
00162   void     SetNextWindowId(Window);
00163   void     SetWindowName(const char *);
00165 
00167 
00168   void     SetPosition(int,int);
00169   void     SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
00171   
00173 
00175   void HideCursor();
00176   void ShowCursor();
00178 
00180   virtual void SetCurrentCursor(int);
00181 
00184   virtual  int GetEventPending();
00185   
00187   void     SetWindowInfo(char *info);
00188 
00190   void     SetParentInfo(char *info);
00191 
00194   void Render();  
00195 
00197   void SetOffScreenRendering(int i);
00198 
00199 protected:
00200   vtkXMesaRenderWindow();
00201   ~vtkXMesaRenderWindow();
00202 
00203   vtkXMesaRenderWindowInternal *Internal;
00204   
00205   Window   ParentId;
00206   Window   WindowId;
00207   Window   NextWindowId;
00208   Display *DisplayId;
00209   Colormap ColorMap;
00210   int      OwnWindow;
00211   int      OwnDisplay;
00212   int      ScreenSize[2];
00213   int      CursorHidden;
00214   int      ForceMakeCurrent;
00215   int      UsingHardware;
00216   char    *Capabilities;
00217 
00218   // we must keep track of the cursors we are using
00219   Cursor XCArrow;
00220   Cursor XCSizeAll;
00221   Cursor XCSizeNS;
00222   Cursor XCSizeWE;
00223   Cursor XCSizeNE;
00224   Cursor XCSizeNW;
00225   Cursor XCSizeSE;
00226   Cursor XCSizeSW;
00227   
00228 private:
00229   vtkXMesaRenderWindow(const vtkXMesaRenderWindow&);  // Not implemented.
00230   void operator=(const vtkXMesaRenderWindow&);  // Not implemented.
00231 };
00232 
00233 
00234 
00235 #endif