1 // XPreplayView.h : interface of the CXPreplayView class
2 //
3 /////////////////////////////////////////////////////////////////////////////
4
5 //#include "XPreplayDoc.h"
6 #if !defined(AFX_XPREPLAYVIEW_H__909E260C_85C6_11D5_A796_0000B48FE580__INCLUDED_)
7 #define AFX_XPREPLAYVIEW_H__909E260C_85C6_11D5_A796_0000B48FE580__INCLUDED_
8
9 #if _MSC_VER >= 1000
10 #pragma once
11 #endif // _MSC_VER >= 1000
12
13 class CXPreplayView : public CScrollView
14 {
15 protected: // create from serialization only
16 CXPreplayView();
17 DECLARE_DYNCREATE(CXPreplayView)
18
19 public:
20 CXPreplayDoc* GetDocument();
21
22 private:
23 CPen *pencolor;
24 CPen *pencolordashed;
25 CBrush *brushcolor;
26 CBitmap *bitmapcolor;
27 CBitmap items[21];
28 bool Trustheader;
29 CDC bgDC; // for flickerfree drawing
30 CBitmap bgBitmap; // for flickerfree drawing
31 CFont gameFont;
32 CFont msgFont;
33
34 short *ConvertItem(unsigned char *c_bits);
35 void DrawFrame(CXPreplayDoc::frame *frame);
36
37 // Overrides
38 // ClassWizard generated virtual function overrides
39 //{{AFX_VIRTUAL(CXPreplayView)
40 public:
41 virtual void OnDraw(CDC* pDC); // overridden to draw this view
42 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
43 protected:
44 virtual void OnInitialUpdate(); // called first time after construct
45 virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
46 //}}AFX_VIRTUAL
47
48 // Implementation
49 public:
50 virtual ~CXPreplayView();
51 #ifdef _DEBUG
52 virtual void AssertValid() const;
53 virtual void Dump(CDumpContext& dc) const;
54 #endif
55
56 protected:
57 enum {
58 s_toStart,
59 s_rewind,
60 s_reverse,
61 s_slowback,
62 s_slowplay,
63 s_playing,
64 s_forward,
65 s_toEnd,
66 s_stopped,
67 s_paused
68 } status;
69 int nTimer;
70
71 // Generated message map functions
72 protected:
73 //{{AFX_MSG(CXPreplayView)
74 afx_msg void OnTimer(UINT nIDEvent);
75 afx_msg void OnPlay();
76 afx_msg void OnStop();
77 afx_msg void OnPause();
78 afx_msg void OnReverse();
79 afx_msg void OnRewind();
80 afx_msg void OnForward();
81 afx_msg void OnToend();
82 afx_msg void OnTostart();
83 afx_msg void OnUpdateForward(CCmdUI* pCmdUI);
84 afx_msg void OnUpdatePause(CCmdUI* pCmdUI);
85 afx_msg void OnUpdatePlay(CCmdUI* pCmdUI);
86 afx_msg void OnUpdateReverse(CCmdUI* pCmdUI);
87 afx_msg void OnUpdateRewind(CCmdUI* pCmdUI);
88 afx_msg void OnUpdateStop(CCmdUI* pCmdUI);
89 afx_msg void OnUpdateToend(CCmdUI* pCmdUI);
90 afx_msg void OnUpdateTostart(CCmdUI* pCmdUI);
91 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
92 afx_msg void OnOptionsTrustheader();
93 afx_msg void OnUpdateOptionsTrustheader(CCmdUI* pCmdUI);
94 afx_msg void OnSlowback();
95 afx_msg void OnUpdateSlowback(CCmdUI* pCmdUI);
96 afx_msg void OnSlowplay();
97 afx_msg void OnUpdateSlowplay(CCmdUI* pCmdUI);
98 afx_msg void OnStartframe();
99 afx_msg void OnEndframe();
100 afx_msg void OnUpdateStartframe(CCmdUI* pCmdUI);
101 afx_msg void OnUpdateEndframe(CCmdUI* pCmdUI);
102 //}}AFX_MSG
103 DECLARE_MESSAGE_MAP()
104 };
105
106 #ifndef _DEBUG // debug version in XPreplayView.cpp
GetDocument()107 inline CXPreplayDoc* CXPreplayView::GetDocument()
108 { return (CXPreplayDoc*)m_pDocument; }
109 #endif
110
111 /////////////////////////////////////////////////////////////////////////////
112
113 //{{AFX_INSERT_LOCATION}}
114 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
115
116 #endif // !defined(AFX_XPREPLAYVIEW_H__909E260C_85C6_11D5_A796_0000B48FE580__INCLUDED_)
117