VTK  9.7.1
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 
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 
21 VTK_ABI_NAMESPACE_BEGIN
22 // Forward declarations
23 class vtkImageData;
24 
25 class VTKRENDERINGUI_EXPORT VTK_MARSHALAUTO vtkXlibHardwareWindow : public vtkHardwareWindow
26 {
27 public:
28  static vtkXlibHardwareWindow* New();
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;
86  using vtkHardwareWindow::SetSize;
88 
90 
93  void SetPosition(int, int) override;
94  using vtkHardwareWindow::SetPosition;
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 
143  vtkTypeBool GetOwnDisplay();
144  void SetOwnDisplay(vtkTypeBool ownDisplay);
146 
152  void CloseDisplay();
153 
154 protected:
156  ~vtkXlibHardwareWindow() override;
157 
158  // Helper members
159  vtkXVisualInfo* GetDesiredVisualInfo();
160 
161  Display* DisplayId;
162  Window ParentId;
163  Window WindowId;
164  Colormap ColorMap;
165  vtkTypeBool OwnDisplay;
166  vtkTypeBool OwnWindow;
167  vtkTypeBool CursorHidden;
168 
169  // we must keep track of the cursors we are using
170  Cursor XCCrosshair;
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 
182 private:
183  vtkXlibHardwareWindow(const vtkXlibHardwareWindow&) = delete;
184  void operator=(const vtkXlibHardwareWindow&) = delete;
185 };
186 
187 VTK_ABI_NAMESPACE_END
188 #endif // vtkXlibHardwareWindow_h
create a window for renderers to draw into
static vtkHardwareWindow * New()
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
represents a window in a windows GUI
#define VTK_MARSHALEXCLUDE(reason)
#define VTK_MARSHALAUTO
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED