#ifndef _WX_DOCH__
#define _WX_DOCH__
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "docview.h"
#endif
virtual wxInputStream& LoadObject(wxInputStream& stream);
#endif
- // Called by wxWindows
+ // Called by wxWidgets
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
virtual bool OnNewDocument();
// Override to do cleanup/veto close
virtual bool OnClose(bool deleteWindow);
-#if WXWIN_COMPATIBILITY
- // Defeat compiler warning
- bool OnClose() { return wxEvtHandler::OnClose(); }
-#endif
-
// Extend event processing to search the document'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);
+ // Helper method for CreateDocument; also allows you to do your own document
+ // creation
+ virtual bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0);
+
wxString GetDefaultExtension() const { return m_defaultExt; };
wxString GetDescription() const { return m_description; }
wxString GetDirectory() const { return m_directory; };
bool IsVisible() const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); }
+ wxClassInfo* GetDocClassInfo() const { return m_docClassInfo; }
+ wxClassInfo* GetViewClassInfo() const { return m_viewClassInfo; }
+
virtual bool FileMatchesTemplate(const wxString& path);
protected:
// 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 void ActivateView(wxView *view, bool activate = TRUE);
virtual wxView *GetCurrentView() const;
wxList& GetDocuments() { return m_docs; }
virtual wxString GetHistoryFile(size_t i) const;
virtual size_t GetCount() const { return m_fileHistoryN; }
- wxList& GetMenus() const { return (wxList&) m_fileMenus; }
+ const wxList& GetMenus() const { return m_fileMenus; }
// deprecated, use GetCount() instead
wxDEPRECATED( size_t GetNoHistoryFiles() const );