]>
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 | ||
6bdf5153 VZ |
12 | #ifndef __DOCVIEW_H__ |
13 | #define __DOCVIEW_H__ | |
2108f33a | 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 | { | |
6bdf5153 | 24 | public: |
2108f33a | 25 | MyApp(void); |
6bdf5153 VZ |
26 | virtual bool OnInit(); |
27 | virtual int OnExit(); | |
2108f33a | 28 | |
6bdf5153 | 29 | wxMDIChildFrame* CreateChildFrame(wxDocument*, wxView*, bool isCanvas); |
2108f33a | 30 | |
6bdf5153 | 31 | protected: |
2108f33a JS |
32 | wxDocManager* m_docManager; |
33 | }; | |
34 | ||
35 | DECLARE_APP(MyApp) | |
36 | ||
37 | // Define a new frame | |
38 | class MyCanvas; | |
6bdf5153 | 39 | class DrawingView; |
2108f33a JS |
40 | class MyFrame: public wxDocMDIParentFrame |
41 | { | |
6bdf5153 VZ |
42 | public: |
43 | wxMenu* m_editMenu; | |
2108f33a | 44 | |
6bdf5153 | 45 | MyFrame(wxDocManager*, wxFrame*, const wxString& title, const wxPoint&, const wxSize&, long type); |
2108f33a | 46 | |
6bdf5153 VZ |
47 | MyCanvas* CreateCanvas(DrawingView*, wxMDIChildFrame*); |
48 | ||
49 | protected: | |
50 | void OnAbout(wxCommandEvent&); | |
51 | ||
52 | DECLARE_EVENT_TABLE() | |
53 | DECLARE_CLASS(MyFrame) | |
2108f33a JS |
54 | }; |
55 | ||
6bdf5153 | 56 | extern MyFrame* GetMainFrame(); |
2108f33a JS |
57 | |
58 | #define DOCVIEW_CUT 1 | |
91b07357 | 59 | #define DOCVIEW_ABOUT wxID_ABOUT |
2108f33a JS |
60 | |
61 | extern bool singleWindowMode; | |
62 | ||
63 | #endif |