Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / tutorials / Tutorial6 / View.h
diff --git a/research/transmission_spectroscopy/TOF/Win32++/tutorials/Tutorial6/View.h b/research/transmission_spectroscopy/TOF/Win32++/tutorials/Tutorial6/View.h
new file mode 100644 (file)
index 0000000..b19b366
--- /dev/null
@@ -0,0 +1,47 @@
+//////////////////////////////////////////////////////\r
+// View.h\r
+//  Declaration of the CView class\r
+\r
+\r
+#ifndef VIEW_H\r
+#define VIEW_H\r
+\r
+\r
+#include "wincore.h"\r
+#include <vector>\r
+\r
+using std::vector;\r
+\r
+\r
+class CView : public CWnd\r
+{\r
+public:\r
+       CView();\r
+       virtual ~CView();\r
+\r
+protected:\r
+       virtual void OnDraw(CDC* pDC);\r
+       virtual void PreCreate(CREATESTRUCT &cs);\r
+       virtual void PreRegisterClass(WNDCLASS &wc);\r
+       virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);\r
+\r
+private:\r
+       struct PlotPoint\r
+       {\r
+               int x;\r
+               int y;\r
+               bool PenDown;\r
+       };\r
+\r
+       void DrawLine(int x, int y);\r
+       void OnLButtonDown(LPARAM lParam);\r
+       void OnLButtonUp(LPARAM lParam);\r
+       void OnMouseMove(WPARAM wParam, LPARAM lParam);\r
+       void StorePoint(int x, int y, bool PenDown);\r
+\r
+       CBrush m_Brush;\r
+       vector<PlotPoint> m_points;     // Points of lines to draw\r
+};\r
+\r
+\r
+#endif // CVIEW_H\r

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