]> git.saurik.com Git - wxWidgets.git/blame - samples/docvwmdi/view.h
const added to GetBitmap it was my fault.
[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$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
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{
23 public:
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);
29
30DECLARE_EVENT_TABLE()
31};
32
33class MyTextWindow: public wxTextCtrl
34{
35 public:
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{
43 DECLARE_DYNAMIC_CLASS(DrawingView)
44 private:
45 public:
46 wxFrame *frame;
47 MyCanvas *canvas;
48
c67daf87 49 DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; };
2108f33a
JS
50 ~DrawingView(void) {};
51
52 bool OnCreate(wxDocument *doc, long flags);
53 void OnDraw(wxDC *dc);
c67daf87 54 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
2108f33a
JS
55 bool OnClose(bool deleteWindow = TRUE);
56
57 void OnCut(wxCommandEvent& event);
58
59DECLARE_EVENT_TABLE()
60};
61
62class TextEditView: public wxView
63{
64 DECLARE_DYNAMIC_CLASS(TextEditView)
65 private:
66 public:
67 wxFrame *frame;
68 MyTextWindow *textsw;
69
c67daf87 70 TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
2108f33a
JS
71 ~TextEditView(void) {}
72
73 bool OnCreate(wxDocument *doc, long flags);
74 void OnDraw(wxDC *dc);
c67daf87 75 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
2108f33a
JS
76 bool OnClose(bool deleteWindow = TRUE);
77};
78
79#endif