]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/docvwmdi/docview.h
Fix previous change in case somebody is still using
[wxWidgets.git] / samples / docvwmdi / docview.h
... / ...
CommitLineData
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
23class wxDocManager;
24
25// Define a new application
26class 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
39DECLARE_APP(MyApp)
40
41// Define a new frame
42class MyCanvas;
43class 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
55DECLARE_EVENT_TABLE()
56};
57
58extern MyFrame *GetMainFrame(void);
59
60#define DOCVIEW_CUT 1
61#define DOCVIEW_ABOUT 2
62
63extern bool singleWindowMode;
64
65#endif