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