Loading [MathJax]/extensions/tex2jax.js
VTK  9.4.20250421
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
15#ifndef vtkXWebGPURenderWindow_h
16#define vtkXWebGPURenderWindow_h
17
18#include "vtkRenderingWebGPUModule.h" // For export macro
20#include <X11/Xlib.h> // Needed for X types used in the public interface
21
22VTK_ABI_NAMESPACE_BEGIN
23// Forward declarations
24
25class VTKRENDERINGWEBGPU_EXPORT vtkXWebGPURenderWindow : public vtkWebGPURenderWindow
26{
27public:
32
34
38 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 void Frame() override;
45
49 virtual void WindowInitialize();
50
57 bool WindowSetup() override;
58
64 void Finalize() override;
65
69 void SetFullScreen(vtkTypeBool) override;
70
74 void WindowRemap() override;
75
76 // Call X funcs to map unmap
77 void SetShowWindow(bool val) override;
78
82 virtual void PrefFullScreen();
83
96 void SetSize(int width, int height) override;
97 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
98
105 void SetStereoCapableWindow(vtkTypeBool capable) override;
106
110 const char* ReportCapabilities() override;
111
116
120 void* GetGenericDisplayId() override { return this->GetDisplayId(); }
121
122 void* GetGenericWindowId() override;
123 void* GetGenericParentId() override { return reinterpret_cast<void*>(this->ParentId); }
124
125 void* GetGenericDrawable() override { return reinterpret_cast<void*>(this->WindowId); }
126
131 int* GetScreenSize() VTK_SIZEHINT(2) override;
132
137 int* GetPosition() VTK_SIZEHINT(2) override;
138
142 Display* GetDisplayId();
143
147 bool EnsureDisplay() override;
148
150
154 void SetDisplayId(Display*);
155 void SetDisplayId(void*) override;
157
161 Window GetParentId();
162
164
167 void SetParentId(Window);
168 void SetParentId(void*) override;
170
174 Window GetWindowId();
175
177
180 void SetWindowId(Window);
181 void SetWindowId(void*) override;
183
187 void SetNextWindowId(Window);
188
194 void SetNextWindowId(void*) override;
195
199 void SetWindowName(const char*) override;
200
205 void SetIcon(vtkImageData* img) override;
206
211 bool InitializeFromCurrentContext() override;
212
216 bool GetPlatformSupportsRenderWindowSharing() override { return true; }
217
219
224 void SetPosition(int x, int y) override;
225 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
227
229
233 void HideCursor() override;
234 void ShowCursor() override;
236
240 void SetCurrentCursor(int) override;
241
248
252 void SetWindowInfo(const char* info) override;
253
257 void SetNextWindowInfo(const char* info) override;
258
262 void SetParentInfo(const char* info) override;
263
268 void Render() override;
269
270protected:
273
274 // Helper members
275 Window ParentId;
276 Window WindowId;
278 Display* DisplayId;
279 Colormap ColorMap;
284
285 // we must keep track of the cursors we are using
287 Cursor XCArrow;
288 Cursor XCSizeAll;
289 Cursor XCSizeNS;
290 Cursor XCSizeWE;
291 Cursor XCSizeNE;
292 Cursor XCSizeNW;
293 Cursor XCSizeSE;
294 Cursor XCSizeSW;
295 Cursor XCHand;
296 Cursor XCCustom;
297
298 std::string MakeDefaultWindowNameWithBackend() override;
299 void CreateAWindow() override;
300 void DestroyWindow() override;
302
303private:
305 void operator=(const vtkXWebGPURenderWindow&) = delete;
306};
307
308VTK_ABI_NAMESPACE_END
309#endif // vtkXWebGPURenderWindow_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
WebGPU rendering window.
WebGPU rendering window for the X Window system.
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
virtual void WindowInitialize()
Initialize the window for rendering.
void CreateAWindow() override
Create a not-off-screen window.
void SetCurrentCursor(int) override
Change the shape of the cursor.
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.
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()
~vtkXWebGPURenderWindow() override
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).
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
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 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 DestroyWindow() override
Destroy a not-off-screen window.
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(...)