]>
Commit | Line | Data |
---|---|---|
2108f33a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: docview.h | |
3 | // Purpose: Document/view demo | |
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 __DOCVIEWSAMPLEH__ |
13 | #define __DOCVIEWSAMPLEH__ | |
14 | ||
b9f933ab JS |
15 | #include "wx/mdi.h" |
16 | #include "wx/docview.h" | |
2108f33a JS |
17 | #include "wx/docmdi.h" |
18 | ||
19 | class wxDocManager; | |
20 | ||
21 | // Define a new application | |
22 | class MyApp: public wxApp | |
23 | { | |
24 | public: | |
25 | MyApp(void); | |
26 | bool OnInit(void); | |
27 | int OnExit(void); | |
28 | ||
9746a2ba | 29 | wxMDIChildFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas); |
2108f33a JS |
30 | |
31 | protected: | |
32 | wxDocManager* m_docManager; | |
33 | }; | |
34 | ||
35 | DECLARE_APP(MyApp) | |
36 | ||
37 | // Define a new frame | |
38 | class MyCanvas; | |
39 | class MyFrame: public wxDocMDIParentFrame | |
40 | { | |
41 | DECLARE_CLASS(MyFrame) | |
42 | public: | |
43 | wxMenu *editMenu; | |
44 | ||
45 | MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, | |
acbd13a3 | 46 | long type); |
2108f33a JS |
47 | |
48 | void OnAbout(wxCommandEvent& event); | |
b9f933ab | 49 | MyCanvas *CreateCanvas(wxView *view, wxMDIChildFrame *parent); |
2108f33a JS |
50 | |
51 | DECLARE_EVENT_TABLE() | |
52 | }; | |
53 | ||
54 | extern MyFrame *GetMainFrame(void); | |
55 | ||
56 | #define DOCVIEW_CUT 1 | |
91b07357 | 57 | #define DOCVIEW_ABOUT wxID_ABOUT |
2108f33a JS |
58 | |
59 | extern bool singleWindowMode; | |
60 | ||
61 | #endif |