VTK
vtkIOSRenderWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkIOSRenderWindow.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 =========================================================================*/
42 #ifndef vtkIOSRenderWindow_h
43 #define vtkIOSRenderWindow_h
44 
45 #include "vtkRenderingOpenGL2Module.h" // For export macro
46 #include "vtkOpenGLRenderWindow.h"
47 
48 class VTKRENDERINGOPENGL2_EXPORT vtkIOSRenderWindow : public vtkOpenGLRenderWindow
49 {
50 public:
51  static vtkIOSRenderWindow *New();
53  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54 
58  void Start() VTK_OVERRIDE;
59 
63  void Frame() VTK_OVERRIDE;
64 
68  virtual void WindowConfigure();
69 
78  void Initialize() VTK_OVERRIDE;
79 
86  void SetFullScreen(int) VTK_OVERRIDE;
87 
91  void WindowRemap() VTK_OVERRIDE;
92 
97  virtual void PrefFullScreen();
98 
100 
103  void SetSize(int a[2]) VTK_OVERRIDE;
104  void SetSize(int,int) VTK_OVERRIDE;
106 
110  int *GetSize() VTK_OVERRIDE;
111 
113 
116  void SetPosition(int a[2]) VTK_OVERRIDE;
117  void SetPosition(int,int) VTK_OVERRIDE;
119 
123  int *GetScreenSize() VTK_OVERRIDE;
124 
128  int *GetPosition() VTK_OVERRIDE;
129 
134  void SetWindowName(const char *) VTK_OVERRIDE;
135 
136  void SetNextWindowInfo(char *) VTK_OVERRIDE
137  {
138  vtkWarningMacro("SetNextWindowInfo not implemented (WindowRemap not implemented).");
139  }
140  void* GetGenericDrawable() VTK_OVERRIDE
141  {
142  vtkWarningMacro("Method not implemented.");
143  return 0;
144  }
145  void SetDisplayId(void*) VTK_OVERRIDE
146  {
147  vtkWarningMacro("Method not implemented.");
148  }
149  void *GetGenericDisplayId() VTK_OVERRIDE
150  {
151  vtkWarningMacro("Method not implemented.");
152  return 0;
153  }
154 
160  void SetWindowInfo(char*) VTK_OVERRIDE;
161 
167  void SetParentInfo(char*) VTK_OVERRIDE;
168 
169  void SetNextWindowId(void*) VTK_OVERRIDE
170  {
171  vtkWarningMacro("SetNextWindowId not implemented (WindowRemap not implemented).");
172  }
173 
178  bool InitializeFromCurrentContext() VTK_OVERRIDE;
179 
183  void StereoUpdate() VTK_OVERRIDE;
184 
191  void SetStereoCapableWindow(int capable) VTK_OVERRIDE;
192 
196  void MakeCurrent() VTK_OVERRIDE;
197 
201  bool IsCurrent() VTK_OVERRIDE;
202 
209  bool IsDrawable() VTK_OVERRIDE;
210 
214  void UpdateContext();
215 
219  const char *ReportCapabilities() VTK_OVERRIDE;
220 
224  int SupportsOpenGL() VTK_OVERRIDE;
225 
229  int IsDirect() VTK_OVERRIDE;
230 
236  void SetForceMakeCurrent() VTK_OVERRIDE;
237 
242  int GetEventPending() VTK_OVERRIDE;
243 
245 
248  virtual void SetupPalette(void *hDC);
249  virtual void SetupPixelFormat(void *hDC, void *dwFlags, int debug,
250  int bpp=16, int zbpp=16);
252 
256  void Finalize() VTK_OVERRIDE;
257 
261  int GetDepthBufferSize() VTK_OVERRIDE;
262 
264 
270  void HideCursor() VTK_OVERRIDE;
271  void ShowCursor() VTK_OVERRIDE;
272  void SetCursorPosition(int x, int y) VTK_OVERRIDE;
274 
278  void SetCurrentCursor(int) VTK_OVERRIDE;
279 
284  virtual int GetWindowCreated();
285 
287 
290  void SetContextId(void *);
291  void *GetContextId();
292  void *GetGenericContext() VTK_OVERRIDE {return this->GetContextId();}
294 
305  virtual void SetRootWindow(void *);
306 
310  virtual void *GetRootWindow();
311 
322  void SetWindowId(void *) VTK_OVERRIDE;
323 
327  virtual void *GetWindowId();
328  void *GetGenericWindowId() VTK_OVERRIDE {return this->GetWindowId();}
329 
336  void SetParentId(void *UIView) VTK_OVERRIDE;
337 
343  virtual void *GetParentId();
344  void *GetGenericParentId() VTK_OVERRIDE { return this->GetParentId(); }
345 
347 
350  void SetPixelFormat(void *pixelFormat);
351  void *GetPixelFormat();
353 
354 protected:
356  ~vtkIOSRenderWindow() VTK_OVERRIDE;
357 
358  void CreateGLContext();
359 
360  void CreateAWindow() VTK_OVERRIDE;
361  void DestroyWindow() VTK_OVERRIDE;
362  void DestroyOffScreenWindow();
363 
364  int OffScreenInitialized;
365  int OnScreenInitialized;
366 
367  // IOS seems to have issues with getting RGB data
368  int ReadPixels(
369  const vtkRecti& rect, int front, int glFormat, int glType, void* data) VTK_OVERRIDE;
370 
371 private:
372  vtkIOSRenderWindow(const vtkIOSRenderWindow&) VTK_DELETE_FUNCTION;
373  void operator=(const vtkIOSRenderWindow&) VTK_DELETE_FUNCTION;
374 
375 private:
376  int WindowCreated;
377  int ViewCreated;
378  int CursorHidden;
379 
380  int ForceMakeCurrent;
381 };
382 
383 #endif
OpenGL rendering window.
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on...
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated OpenGL cont...
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
void SetWindowId(void *) override=0
Dummy stubs for vtkWindow API.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetDisplayId(void *) override
Dummy stubs for vtkWindow API.
void SetWindowInfo(char *) override=0
Dummy stubs for vtkWindow API.
void SetParentId(void *) override=0
Dummy stubs for vtkWindow API.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Start()=0
Initialize the rendering process.
IOS OpenGL rendering window.
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.