1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkHardwareWindow.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /**
16  * @class   vtkWin32HardwareWindow
17  * @brief   represents a window in a windows GUI
18  */
19 
20 #ifndef vtkWin32HardwareWindow_h
21 #define vtkWin32HardwareWindow_h
22 
23 #include "vtkHardwareWindow.h"
24 #include "vtkRenderingUIModule.h" // For export macro
25 #include "vtkWindows.h"           // For windows API
26 
27 class VTKRENDERINGUI_EXPORT vtkWin32HardwareWindow : public vtkHardwareWindow
28 {
29 public:
30   static vtkWin32HardwareWindow* New();
31   vtkTypeMacro(vtkWin32HardwareWindow, vtkHardwareWindow);
32   void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34   HINSTANCE GetApplicationInstance();
35 
36   HWND GetWindowId();
37 
38   void Create() override;
39   void Destroy() override;
40 
41   ///@{
42   /**
43    * These are window system independent methods that are used
44    * to help interface vtkWindow to native windowing systems.
45    */
46   void SetDisplayId(void*) override;
47   void SetWindowId(void*) override;
48   void SetParentId(void*) override;
49   void* GetGenericDisplayId() override;
50   void* GetGenericWindowId() override;
51   void* GetGenericParentId() override;
52   ///@}
53 
54   ///@{
55   /**
56    * Set the size of the window in pixels.
57    */
58   void SetSize(int, int) override;
59   using vtkHardwareWindow::SetSize;
60   ///@}
61 
62   ///@{
63   /**
64    * Set the position of the window.
65    */
66   void SetPosition(int, int) override;
67   using vtkHardwareWindow::SetPosition;
68   ///@}
69 
70 protected:
71   vtkWin32HardwareWindow();
72   ~vtkWin32HardwareWindow() override;
73 
74   HWND ParentId;
75   HWND WindowId;
76   HINSTANCE ApplicationInstance;
77 
78 private:
79   vtkWin32HardwareWindow(const vtkWin32HardwareWindow&) = delete;
80   void operator=(const vtkWin32HardwareWindow&) = delete;
81 };
82 
83 #endif
84