]>
git.saurik.com Git - wxWidgets.git/blob - samples/docvwmdi/view.h
8416484d481605ed584d0d7d2c6db31a0c5c36f7
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: View classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
16 #ifndef __VIEWSAMPLEH__
17 #define __VIEWSAMPLEH__
19 #include "wx/docview.h"
21 class MyCanvas
: public wxScrolledWindow
26 MyCanvas(wxView
*v
, wxMDIChildFrame
*frame
, const wxPoint
& pos
, const wxSize
& size
, long style
);
27 virtual void OnDraw(wxDC
& dc
);
28 void OnMouseEvent(wxMouseEvent
& event
);
34 class MyTextWindow
: public wxTextCtrl
39 MyTextWindow(wxView
*v
, wxMDIChildFrame
*frame
, const wxPoint
& pos
, const wxSize
& size
, long style
);
42 class DrawingView
: public wxView
45 wxMDIChildFrame
*frame
;
48 DrawingView() { canvas
= (MyCanvas
*) NULL
; frame
= (wxMDIChildFrame
*) NULL
; }
51 bool OnCreate(wxDocument
*doc
, long flags
);
52 void OnDraw(wxDC
*dc
);
53 void OnUpdate(wxView
*sender
, wxObject
*hint
= (wxObject
*) NULL
);
54 bool OnClose(bool deleteWindow
= true);
56 void OnCut(wxCommandEvent
& event
);
59 DECLARE_DYNAMIC_CLASS(DrawingView
)
63 class TextEditView
: public wxView
66 wxMDIChildFrame
*frame
;
69 TextEditView(): wxView() { frame
= (wxMDIChildFrame
*) NULL
; textsw
= (MyTextWindow
*) NULL
; }
72 bool OnCreate(wxDocument
*doc
, long flags
);
73 void OnDraw(wxDC
*dc
);
74 void OnUpdate(wxView
*sender
, wxObject
*hint
= (wxObject
*) NULL
);
75 bool OnClose(bool deleteWindow
= true);
78 DECLARE_DYNAMIC_CLASS(TextEditView
)