]> git.saurik.com Git - wxWidgets.git/blob - samples/docview/view.h
bakefile-generated makefiles for the sample
[wxWidgets.git] / samples / docview / view.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: view.h
3 // Purpose: View classes
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __VIEWSAMPLEH__
13 #define __VIEWSAMPLEH__
14
15 #include "wx/docview.h"
16
17 class MyCanvas: public wxScrolledWindow
18 {
19 public:
20 wxView *view;
21
22 MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
23 virtual void OnDraw(wxDC& dc);
24 void OnMouseEvent(wxMouseEvent& event);
25
26 DECLARE_EVENT_TABLE()
27 };
28
29 class MyTextWindow: public wxTextCtrl
30 {
31 public:
32 wxView *view;
33
34 MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
35 };
36
37 class DrawingView: public wxView
38 {
39 DECLARE_DYNAMIC_CLASS(DrawingView)
40 private:
41 public:
42 wxFrame *frame;
43 MyCanvas *canvas;
44
45 DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; };
46 ~DrawingView(void) {};
47
48 bool OnCreate(wxDocument *doc, long flags);
49 void OnDraw(wxDC *dc);
50 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
51 bool OnClose(bool deleteWindow = true);
52
53 void OnCut(wxCommandEvent& event);
54
55 DECLARE_EVENT_TABLE()
56 };
57
58 class TextEditView: public wxView
59 {
60 DECLARE_DYNAMIC_CLASS(TextEditView)
61 private:
62 public:
63 wxFrame *frame;
64 MyTextWindow *textsw;
65
66 TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
67 ~TextEditView(void) {}
68
69 bool OnCreate(wxDocument *doc, long flags);
70 void OnDraw(wxDC *dc);
71 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
72 bool OnClose(bool deleteWindow = true);
73 };
74
75 #endif