X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f555861b7e50f335c7b929bb76be38e9ebd69c5..3b1e466ce90add92087215ac0f96ca2db13d7ef3:/include/wx/docview.h diff --git a/include/wx/docview.h b/include/wx/docview.h index 6bc84b0f0a..b2a1d68797 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DOCH__ @@ -21,7 +21,7 @@ #include "wx/cmndata.h" #include "wx/string.h" -#if USE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE #include "wx/print.h" #endif @@ -34,10 +34,20 @@ class WXDLLEXPORT wxPrintInfo; class WXDLLEXPORT wxCommand; class WXDLLEXPORT wxCommandProcessor; class WXDLLEXPORT wxFileHistory; +#if wxUSE_CONFIG class WXDLLEXPORT wxConfigBase; +#endif -class WXDLLIMPORT ostream; -class WXDLLIMPORT istream; +#if wxUSE_IOSTREAMH +// N.B. BC++ doesn't have istream.h, ostream.h +# include +#else +# include +# include +# ifdef __VISUALC__ + using namespace std; +# endif +#endif // Document manager flags #define wxDOC_SDI 1 @@ -177,8 +187,11 @@ class WXDLLEXPORT wxView: public wxEvtHandler // Override to do cleanup/veto close virtual bool OnClose(bool deleteWindow); + +#if WXWIN_COMPATIBILITY // Defeat compiler warning - inline bool OnClose(void) { return wxEvtHandler::OnClose(); } + bool OnClose(void) { return wxEvtHandler::OnClose(); } +#endif // Extend event processing to search the document's event table virtual bool ProcessEvent(wxEvent& event); @@ -187,9 +200,10 @@ class WXDLLEXPORT wxView: public wxEvtHandler // The function then notifies the document manager. virtual void Activate(bool activate); - inline wxDocManager *GetDocumentManager(void) const { return m_viewDocument->GetDocumentManager(); } + wxDocManager *GetDocumentManager(void) const + { return m_viewDocument->GetDocumentManager(); } -#if USE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE virtual wxPrintout *OnCreatePrintout(void); #endif @@ -334,8 +348,10 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler virtual wxString GetHistoryFile(int i) const; virtual void FileHistoryUseMenu(wxMenu *menu); virtual void FileHistoryRemoveMenu(wxMenu *menu); +#if wxUSE_CONFIG virtual void FileHistoryLoad(wxConfigBase& config); virtual void FileHistorySave(wxConfigBase& config); +#endif virtual void FileHistoryAddFilesToMenu(); virtual void FileHistoryAddFilesToMenu(wxMenu* menu); protected: @@ -364,12 +380,11 @@ class WXDLLEXPORT wxDocChildFrame: public wxFrame long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); ~wxDocChildFrame(void); - bool OnClose(void); // Extend event processing to search the view's event table virtual bool ProcessEvent(wxEvent& event); -// void OldOnMenuCommand(int id); void OnActivate(wxActivateEvent& event); + void OnCloseWindow(wxCloseEvent& event); inline wxDocument *GetDocument(void) const { return m_childDocument; } inline wxView *GetView(void) const { return m_childView; } @@ -393,17 +408,16 @@ class WXDLLEXPORT wxDocParentFrame: public wxFrame public: 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"); + long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - bool OnClose(void); // Extend event processing to search the document manager's event table virtual bool ProcessEvent(wxEvent& event); -// void OldOnMenuCommand(int id); wxDocManager *GetDocumentManager(void) const { return m_docManager; } void OnExit(wxCommandEvent& event); void OnMRUFile(wxCommandEvent& event); + void OnCloseWindow(wxCloseEvent& event); protected: wxDocManager *m_docManager; @@ -415,7 +429,7 @@ DECLARE_EVENT_TABLE() * Provide simple default printing facilities */ -#if USE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE class WXDLLEXPORT wxDocPrintout: public wxPrintout { DECLARE_DYNAMIC_CLASS(wxDocPrintout) @@ -506,8 +520,10 @@ class WXDLLEXPORT wxFileHistory: public wxObject // Remove menu from the list (MDI child may be closing) virtual void RemoveMenu(wxMenu *menu); +#if wxUSE_CONFIG virtual void Load(wxConfigBase& config); virtual void Save(wxConfigBase& config); +#endif virtual void AddFilesToMenu(); virtual void AddFilesToMenu(wxMenu* menu); // Single menu