X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1adc52fd9114b917fa55232ac94d57d851793643..97929f6bd992c185834656b5e3fff5a50ba7360a:/interface/wx/docview.h diff --git a/interface/wx/docview.h b/interface/wx/docview.h index 87e22de5c9..18032c27d2 100644 --- a/interface/wx/docview.h +++ b/interface/wx/docview.h @@ -91,6 +91,15 @@ public: */ virtual wxView* CreateView(wxDocument* doc, long flags = 0); + /** + This function implements the default (very primitive) format detection + which checks if the extension is that of the template. + + @param path + The path to be checked against the template. + */ + virtual bool FileMatchesTemplate(const wxString& path); + /** Returns the default file extension for the document data, as passed to the document template constructor. @@ -109,6 +118,13 @@ public: */ wxString GetDirectory() const; + /** + Returns the run-time class information that allows document + instances to be constructed dynamically, as passed to the document + template constructor. + */ + wxClassInfo* GetDocClassInfo() const; + /** Returns a pointer to the document manager instance for which this template was created. @@ -132,6 +148,13 @@ public: */ long GetFlags() const; + /** + Returns the run-time class information that allows view instances + to be constructed dynamically, as passed to the document template + constructor. + */ + wxClassInfo* GetViewClassInfo() const; + /** Returns the view type name, as passed to the document template constructor. @@ -717,8 +740,7 @@ public: /** Called when the filename has changed. The default implementation - constructs a suitable title and sets the title of the view frame (if - any). + constructs a suitable title and sets the title of the view frame (if any). */ virtual void OnChangeFilename(); @@ -1112,7 +1134,7 @@ public: @see GetFirstView() */ - wxList& GetViews() const; + wxList& GetViews(); const wxList& GetViews() const; //@} @@ -1273,10 +1295,18 @@ public: /** Sets the filename for this document. Usually called by the framework. + Calls OnChangeFilename() which in turn calls wxView::OnChangeFilename() for + all views if @a notifyViews is @true, + */ + void SetFilename(const wxString& filename, bool notifyViews = false); + + /** If @a notifyViews is @true, wxView::OnChangeFilename() is called for all views. + + @since 2.9.0 */ - void SetFilename(const wxString& filename, bool notifyViews = false); + virtual void OnChangeFilename(bool notifyViews); /** Sets the title for this document. The document title is used for an @@ -1480,7 +1510,7 @@ public: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_file */ +/** @addtogroup group_funcmacro_file */ //@{ /**