From 80842e163237b63f91e9a933832a049d543beb23 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 3 Nov 2009 14:12:14 +0000 Subject: [PATCH] Document wxDocument::SetDocumentSaved(). While this function is usually called by wx itself it may be useful to call it explicitly in some particular situations, as documented in the function description, so make it officially public. Closes #11396. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/docview.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/interface/wx/docview.h b/interface/wx/docview.h index 021af24e14..b396918076 100644 --- a/interface/wx/docview.h +++ b/interface/wx/docview.h @@ -1366,11 +1366,26 @@ public: */ virtual void SetDocumentTemplate(wxDocTemplate* templ); + /** + Sets if this document has been already saved or not. + + Normally there is no need to call this function as the document-view + framework does it itself as the documents are loaded from and saved to + the files. However it may be useful in some particular cases, for + example it may be called with @false argument to prevent the user + from saving the just opened document into the same file if this + shouldn't be done for some reason (e.g. file format version changes and + a new extension should be used for saving). + + @see GetDocumentSaved(), AlreadySaved() + */ + void SetDocumentSaved(bool saved = true); + /** 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, + all views if @a notifyViews is @true. */ void SetFilename(const wxString& filename, bool notifyViews = false); -- 2.45.2