0031521: Samples - update MFC ImportExport sample to use AIS_ViewController
[occt.git] / samples / mfc / standard / 08_HLR / src / HLRView2D.cpp
1 // HLRView.cpp : implementation of the CHLRView2D class
2 //
3
4 #include "stdafx.h"
5 #include "HLRView2D.h"
6 #include "HLRApp.h"
7 #include "HLRDoc.h"
8 #include "resource2d\RectangularGrid.h"
9 #include "resource2d\CircularGrid.h"
10
11 #ifdef _DEBUG
12 //#define new DEBUG_NEW
13 #undef THIS_FILE
14 static char THIS_FILE[] = __FILE__;
15 #endif
16
17 /////////////////////////////////////////////////////////////////////////////
18 // CHLRView2D
19
20 IMPLEMENT_DYNCREATE(CHLRView2D, OCC_2dView)
21
22 BEGIN_MESSAGE_MAP(CHLRView2D, OCC_2dView)
23   //{{AFX_MSG_MAP(CHLRView2D)
24   //}}AFX_MSG_MAP
25 END_MESSAGE_MAP()
26
27 /////////////////////////////////////////////////////////////////////////////
28 // CHLRView2D construction/destruction
29
30 CHLRView2D::CHLRView2D()
31 {
32   /// TODO
33   /// Override MouseMove event to exclude rectangle selection emulation as
34   /// no selection is supported in DragEvent2D for this view.
35 }
36
37 CHLRView2D::~CHLRView2D()
38 {
39 }
40
41 const Handle(AIS_InteractiveContext)& CHLRView2D::GetAISContext() const
42 {
43   return ((CHLRDoc*)m_pDocument)->GetInteractiveContext2D();
44 }
45
46 CHLRDoc* CHLRView2D::GetDocument() // non-debug version is inline
47 {
48   //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc)));
49   return (CHLRDoc*)m_pDocument;
50 }
51
52 #ifdef _DEBUG
53 void CHLRView2D::AssertValid() const
54 {
55   OCC_2dView::AssertValid();
56 }
57
58 void CHLRView2D::Dump(CDumpContext& dc) const
59 {
60   OCC_2dView::Dump(dc);
61 }
62
63 #endif