+class PlotFileDocument: public wxDocument
+{
+private:
+ DECLARE_DYNAMIC_CLASS(PlotFileDocument)
+ PlotFile m_plot;
+ wxString m_namePlot;
+ bool m_bBadFileOpen;
+
+public:
+ PlotFileDocument ()
+ : m_bBadFileOpen(false)
+ {}
+
+ virtual ~PlotFileDocument ()
+ {}
+
+ const wxString& getPlotName () const
+ { return m_namePlot; }
+
+ const PlotFile& getPlotFile () const
+ { return m_plot; }
+
+ PlotFile& getPlotFile ()
+ { return m_plot; }
+
+ virtual bool OnOpenDocument (const wxString& filename);
+ virtual bool OnSaveDocument (const wxString& filename);
+ virtual bool IsModified () const;
+ virtual void Modify (bool mod);
+ PlotFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
+ void setBadFileOpen() { m_bBadFileOpen = true; }
+};
+
+
+class TextFileDocument: public wxDocument
+{
+ private:
+ DECLARE_DYNAMIC_CLASS(TextFileDocument)
+ bool m_bBadFileOpen;
+
+ public:
+ TextFileDocument(void)
+ : m_bBadFileOpen(false)
+ {}
+
+ virtual ~TextFileDocument(void) {}
+
+ virtual bool OnSaveDocument(const wxString& filename);
+ virtual bool OnOpenDocument(const wxString& filename);
+ virtual bool IsModified(void) const;
+
+ wxTextCtrl* getTextCtrl();
+
+ TextFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
+ void setBadFileOpen() { m_bBadFileOpen = true; }
+};
+
+
+
+class Graph3dFileDocument: public wxDocument
+{
+ private:
+ DECLARE_DYNAMIC_CLASS(Graph3dFileDocument)
+ ImageFile* m_pImageFile;
+ bool m_bBadFileOpen;
+
+ public:
+ Graph3dFileDocument(void)
+ : m_bBadFileOpen(false)
+ {
+ m_pImageFile = new ImageFile;
+ }
+
+ virtual ~Graph3dFileDocument(void)
+ {
+ delete m_pImageFile;
+ }
+
+ virtual bool OnSaveDocument (const wxString& filename);
+ virtual bool OnOpenDocument (const wxString& filename);
+ virtual bool IsModified () const;
+
+ Graph3dFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
+ void setBadFileOpen() { m_bBadFileOpen = true; }
+ void setImageFile (ImageFile* pImageFile) { delete m_pImageFile; m_pImageFile = pImageFile; }
+ ImageFile& getImageFile() { return *m_pImageFile; }
+ const ImageFile& getImageFile() const { return *m_pImageFile; }
+
+};
+