]> git.saurik.com Git - wxWidgets.git/blame - samples/docvwmdi/view.h
Fix compilation error
[wxWidgets.git] / samples / docvwmdi / view.h
CommitLineData
2108f33a
JS
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$
6aa89a22 8// Copyright: (c) Julian Smart
2f6c54eb 9// Licence: wxWindows license
2108f33a
JS
10/////////////////////////////////////////////////////////////////////////////
11
2108f33a
JS
12#ifndef __VIEWSAMPLEH__
13#define __VIEWSAMPLEH__
14
15#include "wx/docview.h"
16
17class MyCanvas: public wxScrolledWindow
18{
354aa1e3 19public:
2108f33a
JS
20 wxView *view;
21
b9f933ab 22 MyCanvas(wxView *v, wxMDIChildFrame *frame, const wxPoint& pos, const wxSize& size, long style);
2108f33a
JS
23 virtual void OnDraw(wxDC& dc);
24 void OnMouseEvent(wxMouseEvent& event);
25
354aa1e3
RR
26private:
27 DECLARE_EVENT_TABLE()
2108f33a
JS
28};
29
30class MyTextWindow: public wxTextCtrl
31{
354aa1e3 32public:
2108f33a
JS
33 wxView *view;
34
b9f933ab 35 MyTextWindow(wxView *v, wxMDIChildFrame *frame, const wxPoint& pos, const wxSize& size, long style);
2108f33a
JS
36};
37
38class DrawingView: public wxView
39{
354aa1e3 40public:
b9f933ab 41 wxMDIChildFrame *frame;
354aa1e3 42 MyCanvas *canvas;
2108f33a 43
b9f933ab 44 DrawingView() { canvas = (MyCanvas *) NULL; frame = (wxMDIChildFrame *) NULL; }
354aa1e3 45 ~DrawingView() {}
2108f33a 46
354aa1e3
RR
47 bool OnCreate(wxDocument *doc, long flags);
48 void OnDraw(wxDC *dc);
49 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
691d944f 50 bool OnClose(bool deleteWindow = true);
2108f33a 51
354aa1e3 52 void OnCut(wxCommandEvent& event);
2108f33a 53
354aa1e3
RR
54private:
55 DECLARE_DYNAMIC_CLASS(DrawingView)
56 DECLARE_EVENT_TABLE()
2108f33a
JS
57};
58
59class TextEditView: public wxView
60{
354aa1e3 61public:
b9f933ab 62 wxMDIChildFrame *frame;
354aa1e3 63 MyTextWindow *textsw;
2108f33a 64
b9f933ab 65 TextEditView(): wxView() { frame = (wxMDIChildFrame *) NULL; textsw = (MyTextWindow *) NULL; }
354aa1e3 66 ~TextEditView() {}
2108f33a 67
354aa1e3
RR
68 bool OnCreate(wxDocument *doc, long flags);
69 void OnDraw(wxDC *dc);
70 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
691d944f 71 bool OnClose(bool deleteWindow = true);
354aa1e3
RR
72
73private:
74 DECLARE_DYNAMIC_CLASS(TextEditView)
2108f33a
JS
75};
76
77#endif