X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f6c54eb076d760cbb6fb15e899f15fbbd575850..293b15f78d8873a65837c3d165dd739ec23dad8c:/samples/docvwmdi/docview.h diff --git a/samples/docvwmdi/docview.h b/samples/docvwmdi/docview.h index 3d0ad4274d..767e9eee87 100644 --- a/samples/docvwmdi/docview.h +++ b/samples/docvwmdi/docview.h @@ -5,17 +5,15 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// #pragma interface "docview.h" -#endif - -#ifndef __DOCVIEWSAMPLEH__ -#define __DOCVIEWSAMPLEH__ +#ifndef __DOCVIEW_H__ +#define __DOCVIEW_H__ +#include "wx/mdi.h" +#include "wx/docview.h" #include "wx/docmdi.h" class wxDocManager; @@ -23,14 +21,14 @@ class wxDocManager; // Define a new application class MyApp: public wxApp { - public: +public: MyApp(void); - bool OnInit(void); - int OnExit(void); + virtual bool OnInit(); + virtual int OnExit(); - wxMDIChildFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas); + wxMDIChildFrame* CreateChildFrame(wxDocument*, wxView*, bool isCanvas); - protected: +protected: wxDocManager* m_docManager; }; @@ -38,25 +36,27 @@ DECLARE_APP(MyApp) // Define a new frame class MyCanvas; +class DrawingView; class MyFrame: public wxDocMDIParentFrame { - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, - long type); +public: + wxMenu* m_editMenu; + + MyFrame(wxDocManager*, wxFrame*, const wxString& title, const wxPoint&, const wxSize&, long type); + + MyCanvas* CreateCanvas(DrawingView*, wxMDIChildFrame*); - void OnAbout(wxCommandEvent& event); - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); +protected: + void OnAbout(wxCommandEvent&); -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(MyFrame) }; -extern MyFrame *GetMainFrame(void); +extern MyFrame* GetMainFrame(); #define DOCVIEW_CUT 1 -#define DOCVIEW_ABOUT 2 +#define DOCVIEW_ABOUT wxID_ABOUT extern bool singleWindowMode;