]> icculus.org git repositories - taylor/freespace2.git/blob - src/helped/helpedview.cpp
Initial revision
[taylor/freespace2.git] / src / helped / helpedview.cpp
1 // HelpEdView.cpp : implementation of the CHelpEdView class
2 //
3
4 #include "stdafx.h"
5 #include "helped.h"
6
7 #include "helpeddoc.h"
8 #include "helpedview.h"
9
10 #ifdef _DEBUG
11 #define new DEBUG_NEW
12 #undef THIS_FILE
13 static char THIS_FILE[] = __FILE__;
14 #endif
15
16 /////////////////////////////////////////////////////////////////////////////
17 // CHelpEdView
18
19 IMPLEMENT_DYNCREATE(CHelpEdView, CView)
20
21 BEGIN_MESSAGE_MAP(CHelpEdView, CView)
22         //{{AFX_MSG_MAP(CHelpEdView)
23                 // NOTE - the ClassWizard will add and remove mapping macros here.
24                 //    DO NOT EDIT what you see in these blocks of generated code!
25         //}}AFX_MSG_MAP
26 END_MESSAGE_MAP()
27
28 /////////////////////////////////////////////////////////////////////////////
29 // CHelpEdView construction/destruction
30
31 CHelpEdView::CHelpEdView()
32 {
33         // TODO: add construction code here
34
35 }
36
37 CHelpEdView::~CHelpEdView()
38 {
39 }
40
41 BOOL CHelpEdView::PreCreateWindow(CREATESTRUCT& cs)
42 {
43         // TODO: Modify the Window class or styles here by modifying
44         //  the CREATESTRUCT cs
45
46         return CView::PreCreateWindow(cs);
47 }
48
49 /////////////////////////////////////////////////////////////////////////////
50 // CHelpEdView drawing
51
52 void CHelpEdView::OnDraw(CDC* pDC)
53 {
54         pDC;
55         CHelpEdDoc* pDoc = GetDocument();
56         ASSERT_VALID(pDoc);
57         // TODO: add draw code for native data here
58 }
59
60 /////////////////////////////////////////////////////////////////////////////
61 // CHelpEdView diagnostics
62
63 #ifdef _DEBUG
64 void CHelpEdView::AssertValid() const
65 {
66         CView::AssertValid();
67 }
68
69 void CHelpEdView::Dump(CDumpContext& dc) const
70 {
71         CView::Dump(dc);
72 }
73
74 CHelpEdDoc* CHelpEdView::GetDocument() // non-debug version is inline
75 {
76         ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CHelpEdDoc)));
77         return (CHelpEdDoc*)m_pDocument;
78 }
79 #endif //_DEBUG
80
81 /////////////////////////////////////////////////////////////////////////////
82 // CHelpEdView message handlers
83
84 void CHelpEdView::OnLButtonDown(UINT nFlags, CPoint point)
85 {
86         // Capture the mouse, so no other application can
87         // grab it if the mouse leaves the window area
88         SetCapture();
89         // Save the point
90         m_ptPrevPos = point;
91
92         // pass mouse event up the chain
93         CView::OnLButtonDown(nFlags, point);
94 }
95
96
97 //DEL void CHelpEdView::blah()
98 //DEL {
99 //DEL 
100 //DEL }