bool wxDocument::OnCloseDocument()
{
+ // Tell all views that we're about to close
+ NotifyClosing();
DeleteContents();
Modify(FALSE);
return TRUE;
}
}
+void wxDocument::NotifyClosing()
+{
+ wxNode *node = m_documentViews.First();
+ while (node)
+ {
+ wxView *view = (wxView *)node->Data();
+ view->OnClosingDocument();
+ node = node->Next();
+ }
+}
+
void wxDocument::SetFilename(const wxString& filename, bool notifyViews)
{
m_documentFile = filename;