VTK  9.1.0
vtkIOSRenderWindow.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: Visualization Toolkit
4Module: vtkIOSRenderWindow.h
5
6Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7All rights reserved.
8See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10This software is distributed WITHOUT ANY WARRANTY; without even
11the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
42#ifndef vtkIOSRenderWindow_h
43#define vtkIOSRenderWindow_h
44
46#include "vtkRenderingOpenGL2Module.h" // For export macro
47
48class VTKRENDERINGOPENGL2_EXPORT vtkIOSRenderWindow : public vtkOpenGLRenderWindow
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 void Frame() override;
59
63 virtual void WindowConfigure();
64
73 void Initialize() override;
74
81 void SetFullScreen(vtkTypeBool) override;
82
86 void WindowRemap() override;
87
92 virtual void PrefFullScreen();
93
95
103 void SetSize(int width, int height) override;
104 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
106
111 int* GetSize() VTK_SIZEHINT(2) override;
112
114
119 void SetPosition(int x, int y) override;
120 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
122
127 int* GetScreenSize() VTK_SIZEHINT(2) override;
128
133 int* GetPosition() VTK_SIZEHINT(2) override;
134
139 void SetWindowName(const char*) override;
140
141 void SetNextWindowInfo(const char*) override
142 {
143 vtkWarningMacro("SetNextWindowInfo not implemented (WindowRemap not implemented).");
144 }
145 void* GetGenericDrawable() override
146 {
147 vtkWarningMacro("Method not implemented.");
148 return 0;
149 }
150 void SetDisplayId(void*) override { vtkWarningMacro("Method not implemented."); }
151 void* GetGenericDisplayId() override
152 {
153 vtkWarningMacro("Method not implemented.");
154 return 0;
155 }
156
162 void SetWindowInfo(const char*) override;
163
169 void SetParentInfo(const char*) override;
170
171 void SetNextWindowId(void*) override
172 {
173 vtkWarningMacro("SetNextWindowId not implemented (WindowRemap not implemented).");
174 }
175
181
188 void SetStereoCapableWindow(vtkTypeBool capable) override;
189
193 void MakeCurrent() override;
194
198 bool IsCurrent() override;
199
207 "Deprecated in 9.1 because no one knows what it's for and nothing uses it")
208 bool IsDrawable() override;
209
213 void UpdateContext();
214
218 const char* ReportCapabilities() override;
219
223 int SupportsOpenGL() override;
224
228 vtkTypeBool IsDirect() override;
229
235 void SetForceMakeCurrent() override;
236
241 vtkTypeBool GetEventPending() override;
242
244
247 virtual void SetupPalette(void* hDC);
248 virtual void SetupPixelFormat(void* hDC, void* dwFlags, int debug, int bpp = 16, int zbpp = 16);
250
254 void Finalize() override;
255
259 int GetDepthBufferSize() override;
260
262
268 void HideCursor() override;
269 void ShowCursor() override;
270 void SetCursorPosition(int x, int y) override;
272
276 void SetCurrentCursor(int) override;
277
282 virtual int GetWindowCreated();
283
285
288 void SetContextId(void*);
289 void* GetContextId();
290 void* GetGenericContext() override { return this->GetContextId(); }
292
303 virtual void SetRootWindow(void*);
304
308 virtual void* GetRootWindow();
309
320 void SetWindowId(void*) override;
321
325 virtual void* GetWindowId();
326 void* GetGenericWindowId() override { return this->GetWindowId(); }
327
334 void SetParentId(void* UIView) override;
335
341 virtual void* GetParentId();
342 void* GetGenericParentId() override { return this->GetParentId(); }
343
345
348 void SetPixelFormat(void* pixelFormat);
351
352protected:
355
357
358 // blits the display buffers to the appropriate hardware buffers
360
361 void CreateAWindow() override;
362 void DestroyWindow() override;
364
367
368 // IOS seems to have issues with getting RGB data
370 const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right = 0) override;
371
372private:
373 vtkIOSRenderWindow(const vtkIOSRenderWindow&) = delete;
374 void operator=(const vtkIOSRenderWindow&) = delete;
375
376private:
377 vtkTypeBool WindowCreated;
378 vtkTypeBool ViewCreated;
379 vtkTypeBool CursorHidden;
380
381 vtkTypeBool ForceMakeCurrent;
382};
383
384#endif
IOS OpenGL rendering window.
void SetPixelFormat(void *pixelFormat)
Accessors for the pixel format object (Really an NSOpenGLPixelFormat*).
void SetNextWindowId(void *) override
Dummy stubs for vtkWindow API.
void Frame() override
Finish the rendering process.
void CreateAWindow() override
Create a not-off-screen window.
~vtkIOSRenderWindow() override
virtual void PrefFullScreen()
Set the preferred window size to full screen.
void SetSize(int a[2]) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels).
void DestroyWindow() override
Destroy a not-off-screen window.
virtual void SetRootWindow(void *)
Sets the NSWindow* associated with this vtkRenderWindow.
void BlitDisplayFramebuffersToHardware() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetFullScreen(vtkTypeBool) override
Change the window to fill the entire screen.
void SetParentId(void *UIView) override
Set the UIView* for the vtkRenderWindow to be parented within.
int * GetSize() override
Get the size (width and height) of the rendering window in screen coordinates (in pixels).
vtkTypeBool OnScreenInitialized
void Initialize() override
Initialize the window for rendering.
void DestroyOffScreenWindow()
static vtkIOSRenderWindow * New()
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
void WindowRemap() override
Remap the window.
void * GetPixelFormat()
Accessors for the pixel format object (Really an NSOpenGLPixelFormat*).
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
void MakeCurrent() override
Make this windows OpenGL context the current context.
void SetPosition(int a[2]) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated OpenGL cont...
int * GetScreenSize() override
Get the current size of the screen in pixels.
virtual void * GetRootWindow()
Returns the NSWindow* associated with this vtkRenderWindow.
virtual void * GetParentId()
Get the parent UIView* for this vtkRenderWindow.
vtkTypeBool OffScreenInitialized
void SetWindowInfo(const char *) override
Set this RenderWindow's window id to a pre-existing window.
void SetParentInfo(const char *) override
See the documentation for SetParentId().
void SetSize(int width, int height) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels).
void SetWindowId(void *) override
Sets the UIView* associated with this vtkRenderWindow.
virtual void * GetWindowId()
Returns the UIView* associated with this vtkRenderWindow.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
int ReadPixels(const vtkRecti &rect, int front, int glFormat, int glType, void *data, int right=0) override
virtual void WindowConfigure()
Specify various window parameters.
void SetDisplayId(void *) override
Dummy stubs for vtkWindow API.
a simple class to control print indentation
Definition: vtkIndent.h:113
OpenGL rendering window.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_DEPRECATED_IN_9_1_0(reason)
#define VTK_SIZEHINT(...)