X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b54129836cbc680fbeb338bb6087c1a4f80bdf18..a54b285e7c829b885f78d4b8a96dd2e169a693d7:/include/wx/docview.h diff --git a/include/wx/docview.h b/include/wx/docview.h index 49be65f1bb..0eaf23b8ba 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -73,9 +73,16 @@ public: void SetDocumentName(const wxString& name) { m_documentTypeName = name; } wxString GetDocumentName() const { return m_documentTypeName; } + // access the flag indicating whether this document had been already saved, + // SetDocumentSaved() is only used internally, don't call it bool GetDocumentSaved() const { return m_savedYet; } void SetDocumentSaved(bool saved = true) { m_savedYet = saved; } + // return true if the document hasn't been modified since the last time it + // was saved (implying that it returns false if it was never saved, even if + // the document is not modified) + bool AlreadySaved() const { return !IsModified() && GetDocumentSaved(); } + virtual bool Close(); virtual bool Save(); virtual bool SaveAs(); @@ -483,7 +490,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long type = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxT("frame")); + const wxString& name = wxFrameNameStr); virtual ~wxDocChildFrame(){} void OnActivate(wxActivateEvent& event);