VTK  9.7.20260804
vtkXlibHardwareWindow.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
3
11
12#ifndef vtkXlibHardwareWindow_h
13#define vtkXlibHardwareWindow_h
14
15#include "vtkHardwareWindow.h"
16#include "vtkRenderingUIModule.h" // For export macro
17
18#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
19#include "vtkX11Functions.h" // Needed for X types used in the public interface
20
21VTK_ABI_NAMESPACE_BEGIN
22// Forward declarations
23class vtkImageData;
24
25class VTKRENDERINGUI_EXPORT VTK_MARSHALAUTO vtkXlibHardwareWindow : public vtkHardwareWindow
26{
27public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
33
40 Display* GetDisplayId();
42 void SetDisplayId(Display* display);
44
49 void SetParentId(Window);
50
55 Window GetWindowId();
56
58
62 void SetWindowId(Window);
63 void SetWindowId(void*) override;
65
66 void Create() override;
67 void Destroy() override;
68
70
74 void SetDisplayId(void*) override;
75 void SetParentId(void*) override;
76 void* GetGenericDisplayId() override;
77 void* GetGenericWindowId() override;
78 void* GetGenericParentId() override;
80
82
85 void SetSize(int, int) override;
88
90
93 void SetPosition(int, int) override;
96
98
102 void HideCursor() override;
103 void ShowCursor() override;
105
109 void SetCurrentCursor(int) override;
110
114 void SetWindowName(const char*) override;
115
120 void SetIcon(vtkImageData* img) override;
121
125 void SetWindowInfo(const char* info) override;
126
131 void SetCoverable(vtkTypeBool coverable) override;
132
136 bool EnsureDisplay() override;
137
139
144 void SetOwnDisplay(vtkTypeBool ownDisplay);
146
153
154protected:
157
158 // Helper members
159 vtkXVisualInfo* GetDesiredVisualInfo();
160
161 Display* DisplayId;
162 Window ParentId;
163 Window WindowId;
164 Colormap ColorMap;
168
169 // we must keep track of the cursors we are using
171 Cursor XCArrow;
172 Cursor XCSizeAll;
173 Cursor XCSizeNS;
174 Cursor XCSizeWE;
175 Cursor XCSizeNE;
176 Cursor XCSizeNW;
177 Cursor XCSizeSE;
178 Cursor XCSizeSW;
179 Cursor XCHand;
180 Cursor XCCustom;
181
182private:
184 void operator=(const vtkXlibHardwareWindow&) = delete;
185};
186
187VTK_ABI_NAMESPACE_END
188#endif // vtkXlibHardwareWindow_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
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...
vtkXVisualInfo * GetDesiredVisualInfo()
void SetParentId(Window)
Sets the parent of the window that WILL BE created.
void Create() override
void * GetGenericWindowId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
Window GetWindowId()
Get this RenderWindow's X window id.
void SetCoverable(vtkTypeBool coverable) override
Set whether this xwindow should be coverable by other windows, as opposed to always on top.
void * GetGenericParentId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetSize(int, int) override
Set the size of the window in pixels.
void SetOwnDisplay(vtkTypeBool ownDisplay)
Get/set whether this window owns the X11 Display connection.
void CloseDisplay()
Close the X11 Display connection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Destroy() override
void SetWindowName(const char *) override
Set name of window.
void SetWindowInfo(const char *info) override
Set this RenderWindow's X window id to a pre-existing window.
void * GetGenericDisplayId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
vtkTypeBool GetOwnDisplay()
Get/set whether this window owns the X11 Display connection.
static vtkXlibHardwareWindow * New()
void SetCurrentCursor(int) override
Change the shape of the cursor.
void SetDisplayId(Display *display)
Get/set the X11 display.
bool EnsureDisplay() override
Ensure the X display is opened.
void SetPosition(int, int) override
Set the position of the window.
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 SetIcon(vtkImageData *img) override
For window manager that supports it, set the icon displayed in the taskbar and the title bar.
void SetWindowId(Window)
Set this RenderWindow's X window id to a pre-existing window.
Display * GetDisplayId()
Get/set the X11 display.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)