VTK: GUISupport/MFC/vtkMFCWindow.h Source File

| VTK 9.3.1

vtkMFCWindow.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
4 #ifndef vtkMFCWindow_h
5 #define vtkMFCWindow_h
6
7 #include "afxwin.h"
8 #include "vtkGUISupportMFCModule.h" // For export macro
9
10 VTK_ABI_NAMESPACE_BEGIN
11 class vtkWin32OpenGLRenderWindow;
12 class vtkRenderWindowInteractor;
13
15 class VTKGUISUPPORTMFC_EXPORT vtkMFCWindow : public CWnd
16 {
17 public:
19 vtkMFCWindow(CWnd* pcWnd);
21 virtual ~vtkMFCWindow();
22
23 #ifdef _DEBUG
24 virtual void AssertValid() const;
25 virtual void Dump(CDumpContext& dc) const;
26 #endif
27
29 void DrawDC(CDC* pDC);
30
32 virtual void SetRenderWindow(vtkWin32OpenGLRenderWindow*);
34 virtual vtkWin32OpenGLRenderWindow* GetRenderWindow();
36 virtual vtkRenderWindowInteractor* GetInteractor();
37
38 protected:
40 afx_msg void OnSize(UINT nType, int cx, int cy);
42 afx_msg void OnPaint();
44 afx_msg void OnDestroy();
46 BOOL OnEraseBkgnd(CDC* pDC);
47
48 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
49 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
50 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
51 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
52 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
53 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
54 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
55 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
56 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
57 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
58 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
59 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
60 afx_msg void OnTimer(UINT_PTR nIDEvent);
61
63 vtkWin32OpenGLRenderWindow* pvtkWin32OpenGLRW;
64
65 DECLARE_MESSAGE_MAP()
66 };
67
68 VTK_ABI_NAMESPACE_END
69 #endif
70
71 // VTK-HeaderTest-Exclude: vtkMFCWindow.h
vtkMFCWindow
class to display a VTK window in an MFC window
Definition: vtkMFCWindow.h:16
vtkMFCWindow::OnMouseMove
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
vtkMFCWindow::OnMButtonDown
afx_msg void OnMButtonDown(UINT nFlags, CPoint point)
vtkMFCWindow::OnEraseBkgnd
BOOL OnEraseBkgnd(CDC *pDC)
don't clear background
vtkMFCWindow::vtkMFCWindow
vtkMFCWindow(CWnd *pcWnd)
constructor requires a parent
vtkMFCWindow::OnRButtonDown
afx_msg void OnRButtonDown(UINT nFlags, CPoint point)
vtkMFCWindow::pvtkWin32OpenGLRW
vtkWin32OpenGLRenderWindow * pvtkWin32OpenGLRW
the vtk window
Definition: vtkMFCWindow.h:63
vtkMFCWindow::SetRenderWindow
virtual void SetRenderWindow(vtkWin32OpenGLRenderWindow *)
give an instance of a vtk render window to the mfc window
vtkMFCWindow::OnRButtonUp
afx_msg void OnRButtonUp(UINT nFlags, CPoint point)
vtkMFCWindow::OnLButtonDown
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
vtkMFCWindow::OnMButtonUp
afx_msg void OnMButtonUp(UINT nFlags, CPoint point)
vtkMFCWindow::~vtkMFCWindow
virtual ~vtkMFCWindow()
destructor
vtkMFCWindow::OnSize
afx_msg void OnSize(UINT nType, int cx, int cy)
handle size events
vtkMFCWindow::OnPaint
afx_msg void OnPaint()
handle paint events
vtkMFCWindow::GetInteractor
virtual vtkRenderWindowInteractor * GetInteractor()
get the interactor
vtkMFCWindow::OnDestroy
afx_msg void OnDestroy()
handle destroy events
vtkMFCWindow::GetRenderWindow
virtual vtkWin32OpenGLRenderWindow * GetRenderWindow()
get the render window
vtkMFCWindow::OnKeyUp
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
vtkMFCWindow::OnLButtonUp
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
vtkMFCWindow::OnLButtonDblClk
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point)
vtkMFCWindow::OnKeyDown
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
vtkMFCWindow::OnChar
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
vtkMFCWindow::DrawDC
void DrawDC(CDC *pDC)
draw to a device context
vtkMFCWindow::OnTimer
afx_msg void OnTimer(UINT_PTR nIDEvent)
vtkMFCWindow::OnMouseWheel
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkWin32OpenGLRenderWindow
Definition: vtkWin32OpenGLRenderWindow.h:28
vtkX3D::point
@ point
Definition: vtkX3D.h:236