]>
git.saurik.com Git - wxWidgets.git/blob - samples/docvwmdi/view.h
57e4573ae5fd501bc35339a38765febcf9607836
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: View classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __VIEWSAMPLEH__
13 #define __VIEWSAMPLEH__
15 #include "wx/docview.h"
17 class MyCanvas
: public wxScrolledWindow
22 MyCanvas(wxView
*v
, wxMDIChildFrame
*frame
, const wxPoint
& pos
, const wxSize
& size
, long style
);
23 virtual void OnDraw(wxDC
& dc
);
24 void OnMouseEvent(wxMouseEvent
& event
);
30 class MyTextWindow
: public wxTextCtrl
35 MyTextWindow(wxView
*v
, wxMDIChildFrame
*frame
, const wxPoint
& pos
, const wxSize
& size
, long style
);
38 class DrawingView
: public wxView
41 wxMDIChildFrame
*frame
;
44 DrawingView() { canvas
= (MyCanvas
*) NULL
; frame
= (wxMDIChildFrame
*) NULL
; }
47 bool OnCreate(wxDocument
*doc
, long flags
);
48 void OnDraw(wxDC
*dc
);
49 void OnUpdate(wxView
*sender
, wxObject
*hint
= (wxObject
*) NULL
);
50 bool OnClose(bool deleteWindow
= true);
52 void OnCut(wxCommandEvent
& event
);
55 DECLARE_DYNAMIC_CLASS(DrawingView
)
59 class TextEditView
: public wxView
62 wxMDIChildFrame
*frame
;
65 TextEditView(): wxView() { frame
= (wxMDIChildFrame
*) NULL
; textsw
= (MyTextWindow
*) NULL
; }
68 bool OnCreate(wxDocument
*doc
, long flags
);
69 void OnDraw(wxDC
*dc
);
70 void OnUpdate(wxView
*sender
, wxObject
*hint
= (wxObject
*) NULL
);
71 bool OnClose(bool deleteWindow
= true);
74 DECLARE_DYNAMIC_CLASS(TextEditView
)