// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
+ // called when file format detection didn't work, can be overridden to do
+ // something in this case
+ // This is of course completely stupid, because if the file dialog is
+ // cancelled you get an assert. Brilliant. -- JACS
+// virtual void OnOpenFileFailure() { wxFAIL_MSG(_T("file format mismatch")); }
+ virtual void OnOpenFileFailure() { }
+
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
// converts from/to a stream to/from a temporary file.
bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, ostream& stream);
bool WXDLLEXPORT wxTransferStreamToFile(istream& stream, const wxString& filename);
+#else
+// For compatibility with existing file formats:
+// converts from/to a stream to/from a temporary file.
+bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxOutputStream& stream);
+bool WXDLLEXPORT wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
#endif
#endif // _WX_DOCH__