VTK  9.6.20260209
vtkIOSRenderWindow.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
29
30#ifndef vtkIOSRenderWindow_h
31#define vtkIOSRenderWindow_h
32
34#include "vtkRenderingOpenGL2Module.h" // For export macro
35
36VTK_ABI_NAMESPACE_BEGIN
38class VTKRENDERINGOPENGL2_EXPORT vtkIOSRenderWindow : public vtkOpenGLRenderWindow
39{
40public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
50 void Frame() override;
51
55 virtual void WindowConfigure();
56
61
65 void Initialize() override;
66
73 void SetFullScreen(vtkTypeBool) override;
74
78 void WindowRemap() override;
79
84 virtual void PrefFullScreen();
85
87
95 void SetSize(int width, int height) override;
96 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
98
103 int* GetSize() VTK_SIZEHINT(2) override;
104
106
111 void SetPosition(int x, int y) override;
112 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
114
119 int* GetScreenSize() VTK_SIZEHINT(2) override;
120
125 int* GetPosition() VTK_SIZEHINT(2) override;
126
131 void SetWindowName(const char*) override;
132
133 void SetNextWindowInfo(const char*) override
134 {
135 vtkWarningMacro("SetNextWindowInfo not implemented (WindowRemap not implemented).");
136 }
137 void* GetGenericDrawable() override
138 {
139 vtkWarningMacro("Method not implemented.");
140 return 0;
141 }
142 void SetDisplayId(void*) override { vtkWarningMacro("Method not implemented."); }
143 void* GetGenericDisplayId() override
144 {
145 vtkWarningMacro("Method not implemented.");
146 return 0;
147 }
148
154 void SetWindowInfo(const char*) override;
155
161 void SetParentInfo(const char*) override;
162
163 void SetNextWindowId(void*) override
164 {
165 vtkWarningMacro("SetNextWindowId not implemented (WindowRemap not implemented).");
166 }
167
173
180 void SetStereoCapableWindow(vtkTypeBool capable) override;
181
185 void MakeCurrent() override;
186
190 bool IsCurrent() override;
191
196
200 const char* ReportCapabilities() override;
201
205 int SupportsOpenGL() override;
206
211
217 void SetForceMakeCurrent() override;
218
224
226
229 virtual void SetupPalette(void* hDC);
230 virtual void SetupPixelFormat(void* hDC, void* dwFlags, int debug, int bpp = 16, int zbpp = 16);
232
236 void Finalize() override;
237
241 int GetDepthBufferSize() override;
242
244
250 void HideCursor() override;
251 void ShowCursor() override;
252 void SetCursorPosition(int x, int y) override;
254
258 void SetCurrentCursor(int) override;
259
264 virtual int GetWindowCreated();
265
267
270 void SetContextId(void*);
272 void* GetGenericContext() override { return this->GetContextId(); }
274
285 virtual void SetRootWindow(void*);
286
290 virtual void* GetRootWindow();
291
302 void SetWindowId(void*) override;
303
307 virtual void* GetWindowId();
308 void* GetGenericWindowId() override { return this->GetWindowId(); }
309
316 void SetParentId(void* UIView) override;
317
323 virtual void* GetParentId();
324 void* GetGenericParentId() override { return this->GetParentId(); }
325
327
330 void SetPixelFormat(void* pixelFormat);
333
334protected:
337
339
340 // blits the display buffers to the appropriate hardware buffers
342
343 void CreateAWindow() override;
344 void DestroyWindow() override;
346
349
350 // IOS seems to have issues with getting RGB data
352 const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right = 0) override;
353
354private:
355 vtkIOSRenderWindow(const vtkIOSRenderWindow&) = delete;
356 void operator=(const vtkIOSRenderWindow&) = delete;
357
358 vtkTypeBool WindowCreated;
359 vtkTypeBool ViewCreated;
360 vtkTypeBool CursorHidden;
361
362 vtkTypeBool ForceMakeCurrent;
363};
364
365#define vtkIOSRenderWindow_OVERRIDE_ATTRIBUTES vtkIOSRenderWindow::CreateOverrideAttributes()
366VTK_ABI_NAMESPACE_END
367#endif
void SetPixelFormat(void *pixelFormat)
Accessors for the pixel format object (Really an NSOpenGLPixelFormat*).
int * GetPosition() override
Get the position (x and y) of the rendering window in screen coordinates (in pixels).
void SetNextWindowId(void *) override
Dummy stubs for vtkWindow API.
void Frame() override
Finish the rendering process.
void ShowCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
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 SetContextId(void *)
Accessors for the OpenGL context (Really an NSOpenGLContext*).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void * GetContextId()
Accessors for the OpenGL context (Really an NSOpenGLContext*).
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.
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration?
int * GetSize() override
Get the size (width and height) of the rendering window in screen coordinates (in pixels).
void SetPosition(int x, int y) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
vtkTypeBool OnScreenInitialized
void SetForceMakeCurrent() override
If called, allow MakeCurrent() to skip cache-check when called.
void SetCursorPosition(int x, int y) override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
void Initialize() override
Initialize the window for rendering.
void DestroyOffScreenWindow()
void Finalize() override
Clean up device contexts, rendering contexts, etc.
void HideCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void SetupPixelFormat(void *hDC, void *dwFlags, int debug, int bpp=16, int zbpp=16)
Initialize OpenGL for this window.
static vtkIOSRenderWindow * New()
void * GetGenericDrawable() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
int SupportsOpenGL() override
Does this render window support OpenGL?
bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
vtkTypeBool GetEventPending() override
Check to see if an event is pending for this window.
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
void WindowRemap() override
Remap the window.
virtual int GetWindowCreated()
Get the WindowCreated flag.
void * GetPixelFormat()
Accessors for the pixel format object (Really an NSOpenGLPixelFormat*).
void * GetGenericWindowId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void * GetGenericDisplayId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetNextWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
void * GetGenericContext() override
Accessors for the OpenGL context (Really an NSOpenGLContext*).
void MakeCurrent() override
Make this windows OpenGL context the current context.
void UpdateContext()
Update this window's OpenGL context, e.g.
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...
const char * ReportCapabilities() override
Get report of capabilities for the render window.
int GetDepthBufferSize() override
Get the size of the depth buffer.
void SetCurrentCursor(int) override
Change the shape of the cursor.
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().
static vtkOverrideAttribute * CreateOverrideAttributes()
void SetWindowName(const char *) override
Set the name of the window.
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
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual void SetupPalette(void *hDC)
Initialize OpenGL for this window.
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
These are window system independent methods that are used to help interface vtkWindow to native windo...
a simple class to control print indentation
Definition vtkIndent.h:108
Attribute for vtkObjectFactory overrides.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_NEWINSTANCE