VTK  9.5.2
vtkXWebGPURenderWindow.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
11
12#ifndef vtkXWebGPURenderWindow_h
13#define vtkXWebGPURenderWindow_h
14
15#include "vtkRenderingWebGPUModule.h" // For export macro
17#include <X11/Xlib.h> // Needed for X types used in the public interface
18
19VTK_ABI_NAMESPACE_BEGIN
20// Forward declarations
21
22class VTKRENDERINGWEBGPU_EXPORT vtkXWebGPURenderWindow : public vtkWebGPURenderWindow
23{
24public:
29
31
35 void PrintSelf(ostream& os, vtkIndent indent) override;
37
41 void Frame() override;
42
46 virtual void WindowInitialize();
47
54 bool WindowSetup() override;
55
61 void Finalize() override;
62
66 void SetFullScreen(vtkTypeBool) override;
67
71 void WindowRemap() override;
72
73 // Call X funcs to map unmap
74 void SetShowWindow(bool val) override;
75
79 virtual void PrefFullScreen();
80
93 void SetSize(int width, int height) override;
94 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
95
102 void SetStereoCapableWindow(vtkTypeBool capable) override;
103
107 const char* ReportCapabilities() override;
108
113
117 void* GetGenericDisplayId() override { return this->GetDisplayId(); }
118
119 void* GetGenericWindowId() override;
120 void* GetGenericParentId() override { return reinterpret_cast<void*>(this->ParentId); }
121
122 void* GetGenericDrawable() override { return reinterpret_cast<void*>(this->WindowId); }
123
128 int* GetScreenSize() VTK_SIZEHINT(2) override;
129
134 int* GetPosition() VTK_SIZEHINT(2) override;
135
139 Display* GetDisplayId();
140
144 bool EnsureDisplay() override;
145
147
151 void SetDisplayId(Display*);
152 void SetDisplayId(void*) override;
154
158 Window GetParentId();
159
161
164 void SetParentId(Window);
165 void SetParentId(void*) override;
167
171 Window GetWindowId();
172
174
177 void SetWindowId(Window);
178 void SetWindowId(void*) override;
180
184 void SetNextWindowId(Window);
185
191 void SetNextWindowId(void*) override;
192
196 void SetWindowName(const char*) override;
197
202 void SetIcon(vtkImageData* img) override;
203
209
213 bool GetPlatformSupportsRenderWindowSharing() override { return true; }
214
216
221 void SetPosition(int x, int y) override;
222 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
224
226
230 void HideCursor() override;
231 void ShowCursor() override;
233
237 void SetCurrentCursor(int) override;
238
245
249 void SetWindowInfo(const char* info) override;
250
254 void SetNextWindowInfo(const char* info) override;
255
259 void SetParentInfo(const char* info) override;
260
265 void Render() override;
266
267protected:
270
271 // Helper members
272 Window ParentId;
273 Window WindowId;
275 Display* DisplayId;
276 Colormap ColorMap;
281
282 // we must keep track of the cursors we are using
284 Cursor XCArrow;
285 Cursor XCSizeAll;
286 Cursor XCSizeNS;
287 Cursor XCSizeWE;
288 Cursor XCSizeNE;
289 Cursor XCSizeNW;
290 Cursor XCSizeSE;
291 Cursor XCSizeSW;
292 Cursor XCHand;
293 Cursor XCCustom;
294
295 std::string MakeDefaultWindowNameWithBackend() override;
296 void CreateAWindow() override;
297 void DestroyWindow() override;
299
300private:
302 void operator=(const vtkXWebGPURenderWindow&) = delete;
303};
304
305VTK_ABI_NAMESPACE_END
306#endif // vtkXWebGPURenderWindow_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
virtual void WindowInitialize()
Initialize the window for rendering.
Window GetParentId()
Get this RenderWindow's parent X window id.
void CreateAWindow() override
Create a not-off-screen window.
void SetCurrentCursor(int) override
Change the shape of the cursor.
bool EnsureDisplay() override
Ensure RenderWindow's X display is opened.
void SetWindowName(const char *) override
Set name of rendering window.
void Render() override
This computes the size of the render window before calling the supper classes render.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
std::string MakeDefaultWindowNameWithBackend() override
Construct the window title as "Visualization Toolkit - <WindowSystem> <GraphicsBackend>" Ex: "Visuali...
void SetPosition(int a[2]) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
Display * GetDisplayId()
Get this RenderWindow's X display id.
bool GetPlatformSupportsRenderWindowSharing() override
Does this platform support render window data sharing.
void SetNextWindowId(Window)
Specify the X window id to use if a WindowRemap is done.
virtual void PrefFullScreen()
Set the preferred window size to full screen.
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...
void SetNextWindowInfo(const char *info) override
Set the window info that will be used after WindowRemap().
void SetDisplayId(Display *)
Set the X display id for this RenderWindow to use to a pre-existing X display id.
~vtkXWebGPURenderWindow() override
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated native grap...
bool WindowSetup() override
Initialize the rendering window.
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed or mouse wheel activated.
void SetPosition(int x, int y) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
void SetIcon(vtkImageData *img) override
For window manager that supports it, set the icon displayed in the taskbar and the title bar.
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration?
void SetSize(int width, int height) override
Set the size (width and height in pixels) of the rendering window.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the VTK class.
void WindowRemap() override
Resize the window.
void SetParentId(Window)
Sets the parent of the window that WILL BE created.
void Frame() override
End the rendering process and display the image.
void SetSize(int a[2]) override
Get the size (width and height) of the rendering window in screen coordinates (in pixels).
void SetShowWindow(bool val) override
Show or not Show the window.
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
const char * ReportCapabilities() override
Get report of capabilities for the render window.
void Finalize() override
"Deinitialize" the rendering window.
void SetWindowId(Window)
Set this RenderWindow's X window id to a pre-existing window.
Window GetWindowId()
Get this RenderWindow's X window id.
void DestroyWindow() override
Destroy a not-off-screen window.
int * GetPosition() override
Get the position (x and y) of the rendering window in screen coordinates (in pixels).
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetParentInfo(const char *info) override
Sets the X window id of the window that WILL BE created.
void SetFullScreen(vtkTypeBool) override
Change the window to fill the entire screen.
static vtkXWebGPURenderWindow * New()
Instantiate the class.
void SetWindowInfo(const char *info) override
Set this RenderWindow's X window id to a pre-existing window.
void * GetGenericDisplayId() override
Xwindow get set functions.
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...
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)