]> git.saurik.com Git - wxWidgets.git/commitdiff
Document wxDocument::SetDocumentSaved().
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Nov 2009 14:12:14 +0000 (14:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Nov 2009 14:12:14 +0000 (14:12 +0000)
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

index 021af24e14e5c835b9b1bdd2caca06a1b775d00b..b39691807674740742b19e2a08692797c465b21c 100644 (file)
@@ -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);