VTK
vtkXMesaRenderWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMesaRenderWindow.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef __vtkXMesaRenderWindow_h
31 #define __vtkXMesaRenderWindow_h
32 
33 #include "vtkMesaRenderWindow.h"
34 #include <X11/Xlib.h> // Needed for X types used in the public interface
35 #include <X11/Xutil.h> // Needed for X types used in the public interface
36 
37 class vtkIdList;
38 class vtkXMesaRenderWindowInternal;
39 
41 {
42 public:
43  static vtkXMesaRenderWindow *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48  virtual void Start(void);
49 
51  virtual void Frame(void);
52 
54  virtual void WindowInitialize(void);
55 
57  virtual void Initialize(void);
58 
60  virtual void Finalize(void);
61 
63  virtual void SetFullScreen(int);
64 
66  virtual void WindowRemap(void);
67 
69  virtual void PrefFullScreen(void);
70 
72 
73  virtual void SetSize(int,int);
74  virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);};
76 
78 
79  virtual Colormap GetDesiredColormap();
80  virtual Visual *GetDesiredVisual();
81  virtual XVisualInfo *GetDesiredVisualInfo();
82  virtual int GetDesiredDepth();
84 
89  virtual void SetStereoCapableWindow(int capable);
90 
92  void MakeCurrent();
93 
97  void SetForceMakeCurrent();
98 
100  const char *ReportCapabilities();
101 
103  int SupportsOpenGL();
104 
106  int IsDirect();
107 
109 
110  virtual void *GetGenericDisplayId() {return (void *)this->GetDisplayId();};
111  virtual void *GetGenericWindowId();
112  virtual void *GetGenericParentId() {return (void *)this->ParentId;};
113  virtual void *GetGenericContext();
114  virtual void *GetGenericDrawable() {return (void *)this->WindowId;};
116 
118  virtual int *GetScreenSize();
119 
121  virtual int *GetPosition();
122 
124  Display *GetDisplayId();
125 
127 
129  void SetDisplayId(Display *);
130  void SetDisplayId(void *);
132 
134  Window GetParentId();
135 
137 
138  void SetParentId(Window);
139  void SetParentId(void *);
141 
143  Window GetWindowId();
144 
146 
147  void SetWindowId(Window);
148  void SetWindowId(void *);
150 
152 
153  void SetNextWindowId(Window);
154  void SetNextWindowId(void *);
155  void SetWindowName(const char *);
157 
159 
160  void SetPosition(int,int);
161  void SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
163 
165 
167  void HideCursor();
168  void ShowCursor();
170 
172  virtual void SetCurrentCursor(int);
173 
176  virtual int GetEventPending();
177 
179  void SetWindowInfo(char *info);
180 
181  void SetNextWindowInfo(char *);
182 
184  void SetParentInfo(char *info);
185 
188  void Render();
189 
191  void SetOffScreenRendering(int i);
192 
193 protected:
196 
197  vtkXMesaRenderWindowInternal *Internal;
198 
199  Window ParentId;
200  Window WindowId;
201  Window NextWindowId;
202  Display *DisplayId;
203  Colormap ColorMap;
206  int ScreenSize[2];
211 
212  // we must keep track of the cursors we are using
213  Cursor XCArrow;
214  Cursor XCSizeAll;
215  Cursor XCSizeNS;
216  Cursor XCSizeWE;
217  Cursor XCSizeNE;
218  Cursor XCSizeNW;
219  Cursor XCSizeSE;
220  Cursor XCSizeSW;
221 
222 
223  void CreateAWindow();
224  void DestroyWindow();
225  void CreateOffScreenWindow(int x, int y);
226  void DestroyOffScreenWindow();
227  void ResizeOffScreenWindow(int x, int y);
228 
229 private:
230  vtkXMesaRenderWindow(const vtkXMesaRenderWindow&); // Not implemented.
231  void operator=(const vtkXMesaRenderWindow&); // Not implemented.
232 };
233 
234 
235 
236 #endif
virtual void SetOffScreenRendering(int)
virtual void Finalize()=0
virtual void SetForceMakeCurrent()
virtual void SetWindowInfo(char *)=0
virtual void WindowRemap()=0
virtual void * GetGenericContext()=0
virtual void * GetGenericParentId()
virtual void HideCursor()=0
static vtkRenderWindow * New()
virtual int * GetScreenSize()=0
virtual void SetWindowId(void *)=0
virtual void SetCurrentCursor(int)
virtual void SetNextWindowInfo(char *)=0
virtual void SetFullScreen(int)=0
vtkXMesaRenderWindowInternal * Internal
virtual int GetEventPending()=0
virtual void SetSize(int, int)
virtual void SetStereoCapableWindow(int capable)
virtual const char * ReportCapabilities()
virtual int IsDirect()
virtual int SupportsOpenGL()
virtual void SetParentInfo(char *)=0
virtual void SetParentId(void *)=0
virtual void * GetGenericDrawable()
a simple class to control print indentation
Definition: vtkIndent.h:37
Mesa rendering window.
Mesa rendering window.
list of point or cell ids
Definition: vtkIdList.h:34
virtual void SetDisplayId(void *)=0
virtual void SetNextWindowId(void *)=0
virtual int * GetPosition()
virtual void Frame()=0
#define VTK_RENDERING_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetSize(int a[2])
virtual void Start()=0
virtual void SetWindowName(const char *)
virtual void SetPosition(int, int)
virtual void Render()
virtual void * GetGenericDisplayId()
virtual void ShowCursor()=0
virtual void * GetGenericWindowId()=0