From b060ae7de4b107298b1ab063e751994360e8681f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Jun 2007 12:53:56 +0000 Subject: [PATCH] added wxDocument::GetUserReadableName() for forward compatibility with 3.0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/docview.h | 14 ++++++++++++++ version-script.in | 1 + 2 files changed, 15 insertions(+) diff --git a/include/wx/docview.h b/include/wx/docview.h index f69745552d..3a4d899eeb 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -141,8 +141,22 @@ public: virtual void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; } // Get title, or filename if no title, else [unnamed] + // + // NB: this method will be deprecated in wxWidgets 3.0, you still need to + // override it if you need to modify the existing behaviour in this + // version but use GetUserReadableName() below if you just need to call + // it virtual bool GetPrintableName(wxString& buf) const; +#if wxABI_VERSION >= 20805 + wxString GetUserReadableName() const + { + wxString s; + GetPrintableName(s); + return s; + } +#endif // wxABI 2.8.5+ + // Returns a window that can be used as a parent for document-related // dialogs. Override if necessary. virtual wxWindow *GetDocumentWindow() const; diff --git a/version-script.in b/version-script.in index 4f83eec356..a2959fbcdf 100644 --- a/version-script.in +++ b/version-script.in @@ -27,6 +27,7 @@ # public symbols added in 2.8.5 (please keep in alphabetical order): @WX_VERSION_TAG@.5 { global: + *wxDocument*GetUserReadableName*; *wxMetafileDC*DoGetTextExtent*; };