X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..f4a8c29f7a3ffa7eb60d9b7f055565eb2df368d9:/include/wx/docview.h diff --git a/include/wx/docview.h b/include/wx/docview.h index 087153946c..008929ec76 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DOCH__ -#define __DOCH__ +#ifndef _WX_DOCH__ +#define _WX_DOCH__ #ifdef __GNUG__ #pragma interface "docview.h" @@ -56,7 +56,7 @@ class WXDLLEXPORT wxDocument : public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxDocument) public: - wxDocument(wxDocument *parent = NULL); + wxDocument(wxDocument *parent = (wxDocument *) NULL); ~wxDocument(void); void SetFilename(const wxString& filename, bool notifyViews = FALSE); @@ -114,7 +114,7 @@ class WXDLLEXPORT wxDocument : public wxEvtHandler inline wxList& GetViews(void) const { return (wxList&) m_documentViews; } wxView *GetFirstView(void) const; - virtual void UpdateAllViews(wxView *sender = NULL, wxObject *hint = NULL); + virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL); // Remove all views (because we're closing the document) virtual bool DeleteAllViews(void); @@ -146,7 +146,7 @@ class WXDLLEXPORT wxView: public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxView) public: - wxView(wxDocument *doc = NULL); + wxView(wxDocument *doc = (wxDocument *) NULL); ~wxView(void); inline wxDocument *GetDocument(void) const { return m_viewDocument; } @@ -161,7 +161,7 @@ class WXDLLEXPORT wxView: public wxEvtHandler virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView); virtual void OnDraw(wxDC *dc) = 0; virtual void OnPrint(wxDC *dc, wxObject *info); - virtual void OnUpdate(wxView *sender, wxObject *hint = NULL); + virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); virtual void OnChangeFilename(void); // Called by framework if created automatically by the @@ -212,7 +212,7 @@ class WXDLLEXPORT wxDocTemplate: public wxObject // template/document type wxDocTemplate(wxDocManager *manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, - wxClassInfo *docClassInfo = NULL, wxClassInfo *viewClassInfo = NULL, + wxClassInfo *docClassInfo = (wxClassInfo *) NULL, wxClassInfo *viewClassInfo = (wxClassInfo *)NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS); ~wxDocTemplate(void); @@ -283,9 +283,9 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler void OnUndo(wxCommandEvent& event); void OnRedo(wxCommandEvent& event); -#ifdef WXWIN_COMPATIBILITY - virtual wxDocument *CreateDocument(char *WXUNUSED(path), long WXUNUSED(flags = 0)) { return NULL; }; -#endif + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); + virtual wxDocument *CreateDocument(const wxString& path, long flags = 0); virtual wxView *CreateView(wxDocument *doc, long flags = 0); virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0); @@ -317,7 +317,7 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler // Views or windows should inform the document manager // when a view is going in or out of focus virtual void ActivateView(wxView *view, bool activate = TRUE, bool deleting = FALSE); - virtual inline wxView *GetCurrentView(void) const { return m_currentView; } + virtual wxView *GetCurrentView(void) const; virtual inline wxList& GetDocuments(void) const { return (wxList&) m_docs; } @@ -355,7 +355,7 @@ class WXDLLEXPORT wxDocChildFrame: public wxFrame DECLARE_CLASS(wxDocChildFrame) public: - wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, const wxString& title, + wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); ~wxDocChildFrame(void); @@ -387,7 +387,7 @@ class WXDLLEXPORT wxDocParentFrame: public wxFrame { DECLARE_CLASS(wxDocParentFrame) public: - wxDocParentFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, + wxDocParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long type = wxDEFAULT_FRAME, const wxString& name = "frame"); @@ -416,7 +416,7 @@ class WXDLLEXPORT wxDocPrintout: public wxPrintout { DECLARE_DYNAMIC_CLASS(wxDocPrintout) public: - wxDocPrintout(wxView *view = NULL, const wxString& title = "Printout"); + wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = "Printout"); bool OnPrintPage(int page); bool HasPage(int page); bool OnBeginDocument(int startPage, int endPage);