+void
+ImageFileDocument::Modify(bool mod)
+{
+ wxDocument::Modify(mod);
+}
+
+ImageFileView*
+ImageFileDocument::getView() const
+{
+ return dynamic_cast<ImageFileView*>(GetFirstView());
+}
+
+bool
+ImageFileDocument::Revert ()
+{
+ if (IsModified()) {
+ wxString msg ("Revert to saved ");
+ msg += GetFilename();
+ msg += "?";
+ wxMessageDialog dialog (getView()->getFrame(), msg, "Are you sure?", wxYES_NO | wxNO_DEFAULT);
+ if (dialog.ShowModal() == wxID_YES) {
+ if (theApp->getVerboseLogging())
+ *theApp->getLog() << "Reverting to saved " << GetFilename() << "\n";
+ Modify (false);
+ OnOpenDocument (GetFilename());
+ }
+ }
+ UpdateAllViews();
+
+ return true;
+}
+
+void
+ImageFileDocument::Activate()
+{
+#if CTSIM_MDI
+ getView()->getFrame()->Activate();
+#endif
+};
+
+// BackgroundProcessingDocument - Base Class
+
+IMPLEMENT_DYNAMIC_CLASS(BackgroundProcessingDocument, wxDocument)
+BEGIN_EVENT_TABLE(BackgroundProcessingDocument, wxDocument)
+END_EVENT_TABLE()
+
+#ifdef HAVE_WXTHREADS
+void
+BackgroundProcessingDocument::addBackgroundSupervisor (BackgroundSupervisor* pSupervisor)
+{
+ wxCriticalSectionLocker locker (m_criticalSection);
+ if (pSupervisor)
+ m_vecpBackgroundSupervisors.push_back (pSupervisor);
+}
+
+void
+BackgroundProcessingDocument::removeBackgroundSupervisor (BackgroundSupervisor* pSupervisor)