X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa89a22b8e47000c98bff05c6f545f331f1c353..293b15f78d8873a65837c3d165dd739ec23dad8c:/samples/docvwmdi/docview.h?ds=inline diff --git a/samples/docvwmdi/docview.h b/samples/docvwmdi/docview.h index ce603abd72..767e9eee87 100644 --- a/samples/docvwmdi/docview.h +++ b/samples/docvwmdi/docview.h @@ -9,12 +9,8 @@ // 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" @@ -25,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; }; @@ -40,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, wxMDIChildFrame *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;