]> git.saurik.com Git - wxWidgets.git/blob - samples/docvwmdi/docview.h
added test for wxFileConfig::DeleteEntry
[wxWidgets.git] / samples / docvwmdi / docview.h
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$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 // #pragma interface "docview.h"
14 #endif
15
16 #ifndef __DOCVIEWSAMPLEH__
17 #define __DOCVIEWSAMPLEH__
18
19 #include "wx/mdi.h"
20 #include "wx/docview.h"
21 #include "wx/docmdi.h"
22
23 class wxDocManager;
24
25 // Define a new application
26 class MyApp: public wxApp
27 {
28 public:
29 MyApp(void);
30 bool OnInit(void);
31 int OnExit(void);
32
33 wxMDIChildFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
34
35 protected:
36 wxDocManager* m_docManager;
37 };
38
39 DECLARE_APP(MyApp)
40
41 // Define a new frame
42 class MyCanvas;
43 class MyFrame: public wxDocMDIParentFrame
44 {
45 DECLARE_CLASS(MyFrame)
46 public:
47 wxMenu *editMenu;
48
49 MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
50 long type);
51
52 void OnAbout(wxCommandEvent& event);
53 MyCanvas *CreateCanvas(wxView *view, wxMDIChildFrame *parent);
54
55 DECLARE_EVENT_TABLE()
56 };
57
58 extern MyFrame *GetMainFrame(void);
59
60 #define DOCVIEW_CUT 1
61 #define DOCVIEW_ABOUT 2
62
63 extern bool singleWindowMode;
64
65 #endif