Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / RibbonFrame / src / View.h
1 //////////////////////////////////////////////////////\r
2 // View.h\r
3 //  Declaration of the CView class\r
4 \r
5 #ifndef VIEW_H\r
6 #define VIEW_H\r
7 \r
8 \r
9 class CView : public CWnd\r
10 {\r
11 public:\r
12         CView();\r
13         virtual ~CView();\r
14         virtual void ClearPoints();\r
15         virtual BOOL FileOpen(LPCTSTR szFilename);\r
16         virtual BOOL FileSave(LPCTSTR szFilename);\r
17         virtual void SetPen(COLORREF Color);\r
18 \r
19 protected:\r
20         virtual void OnDraw(CDC* pDC);\r
21         virtual void PreCreate(CREATESTRUCT &cs);\r
22         virtual void PreRegisterClass(WNDCLASS &wc);\r
23         virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);\r
24 \r
25 private:\r
26         struct PlotPoint\r
27         {\r
28                 int x;\r
29                 int y;\r
30                 bool PenDown;\r
31                 COLORREF color;\r
32         };\r
33 \r
34         void DrawLine(int x, int y);\r
35         void OnLButtonDown(LPARAM lParam);\r
36         void OnLButtonUp(LPARAM lParam);\r
37         void OnMouseMove(WPARAM wParam, LPARAM lParam);\r
38         void StorePoint(int x, int y, bool PenDown);\r
39 \r
40         CBrush m_hBrush;\r
41         std::vector<PlotPoint> m_points;        // Points of lines to draw\r
42         COLORREF m_PenColor;\r
43 };\r
44 \r
45 \r
46 #endif // CVIEW_H\r

UCC git Repository :: git.ucc.asn.au