]> git.saurik.com Git - wxWidgets.git/blame - samples/docview/view.h
regenerated makefiles
[wxWidgets.git] / samples / docview / view.h
CommitLineData
457814b5
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
457814b5
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13// #pragma interface
14#endif
15
16#ifndef __VIEWSAMPLEH__
17#define __VIEWSAMPLEH__
18
19#include "wx/docview.h"
20
21class MyCanvas: public wxScrolledWindow
22{
f6bcfd97 23public:
457814b5
JS
24 wxView *view;
25
26 MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
27 virtual void OnDraw(wxDC& dc);
28 void OnMouseEvent(wxMouseEvent& event);
f6bcfd97
BP
29
30 DECLARE_EVENT_TABLE()
457814b5
JS
31};
32
33class MyTextWindow: public wxTextCtrl
34{
f6bcfd97 35public:
457814b5
JS
36 wxView *view;
37
38 MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
39};
40
41class DrawingView: public wxView
42{
f6bcfd97
BP
43 DECLARE_DYNAMIC_CLASS(DrawingView)
44private:
45public:
46 wxFrame *frame;
47 MyCanvas *canvas;
48
49 DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; };
50 ~DrawingView(void) {};
51
52 bool OnCreate(wxDocument *doc, long flags);
53 void OnDraw(wxDC *dc);
54 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
55 bool OnClose(bool deleteWindow = TRUE);
56
57 void OnCut(wxCommandEvent& event);
58
59 DECLARE_EVENT_TABLE()
457814b5
JS
60};
61
62class TextEditView: public wxView
63{
f6bcfd97
BP
64 DECLARE_DYNAMIC_CLASS(TextEditView)
65private:
66public:
67 wxFrame *frame;
68 MyTextWindow *textsw;
69
70 TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
71 ~TextEditView(void) {}
72
73 bool OnCreate(wxDocument *doc, long flags);
74 void OnDraw(wxDC *dc);
75 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
76 bool OnClose(bool deleteWindow = TRUE);
457814b5
JS
77};
78
79#endif