]> git.saurik.com Git - wxWidgets.git/blame - samples/docview/docview.h
Include wx/filedlg.h when not WX_PRECOMP.
[wxWidgets.git] / samples / docview / docview.h
CommitLineData
457814b5
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
457814b5
JS
10/////////////////////////////////////////////////////////////////////////////
11
457814b5
JS
12#ifndef __DOCVIEWSAMPLEH__
13#define __DOCVIEWSAMPLEH__
14
15#include "wx/docview.h"
16
17class wxDocManager;
18
19// Define a new application
20class MyApp: public wxApp
21{
f6bcfd97 22public:
457814b5
JS
23 MyApp(void);
24 bool OnInit(void);
25 int OnExit(void);
f6bcfd97 26
457814b5 27 wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
f6bcfd97
BP
28
29protected:
457814b5
JS
30 wxDocManager* m_docManager;
31};
32
33DECLARE_APP(MyApp)
34
35// Define a new frame
36class MyCanvas;
37class MyFrame: public wxDocParentFrame
38{
f6bcfd97
BP
39 DECLARE_CLASS(MyFrame)
40public:
41 wxMenu *editMenu;
42
43 // This pointer only needed if in single window mode
44 MyCanvas *canvas;
45
46 MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size,
47 const long type);
48
49 void OnAbout(wxCommandEvent& event);
50 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
51
52 DECLARE_EVENT_TABLE()
457814b5
JS
53};
54
55extern MyFrame *GetMainFrame(void);
56
57#define DOCVIEW_CUT 1
91b07357 58#define DOCVIEW_ABOUT wxID_ABOUT
457814b5
JS
59
60extern bool singleWindowMode;
61
62#endif