+ wxView *m_view;
+
+ // the segment being currently drawn or NULL if none
+ DoodleSegment *m_currentSegment;
+
+ // the last mouse press position
+ wxPoint m_lastMousePos;
+
+ DECLARE_EVENT_TABLE()
+};
+
+// The view using MyCanvas to show its contents
+class DrawingView : public wxView
+{
+public:
+ DrawingView() { m_canvas = NULL; m_frame = NULL; }
+
+ virtual bool OnCreate(wxDocument *doc, long flags);
+ virtual void OnDraw(wxDC *dc);
+ virtual void OnUpdate(wxView *sender, wxObject *hint = NULL);
+ virtual bool OnClose(bool deleteWindow = true);
+
+ DrawingDocument* GetDocument();
+
+private:
+ void OnCut(wxCommandEvent& event);
+
+ wxFrame *m_frame;
+ MyCanvas *m_canvas;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(DrawingView)