X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdocs.h;h=c1da82a23de7b0bd5acf39d48f7698c0a3e37183;hp=b56ebe5442cbb5cd66d5f6d6ef3b9e47aaacf7b4;hb=9b2bb510160bdb56f04847f5b55ab61dd8a47976;hpb=ab4a3ba2c1ba9672136b5022897f81fc55d03493 diff --git a/src/docs.h b/src/docs.h index b56ebe5..c1da82a 100644 --- a/src/docs.h +++ b/src/docs.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: docs.h,v 1.3 2000/07/19 04:33:27 kevin Exp $ +** $Id: docs.h,v 1.10 2001/01/02 05:34:57 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -37,7 +37,7 @@ #include "imagefile.h" #include "phantom.h" #include "projections.h" - +#include "plotfile.h" class ImageFileDocument: public wxDocument { @@ -48,16 +48,17 @@ private: public: virtual bool OnSaveDocument (const wxString& filename); virtual bool OnOpenDocument (const wxString& filename); - virtual bool IsModified (void) const; + virtual bool IsModified () const; + virtual bool OnCloseDocument (); virtual void Modify (bool mod); - ImageFileDocument (void) {} - ~ImageFileDocument (void) {} + ImageFileDocument () {} + ~ImageFileDocument () {} - const ImageFile& getImageFile(void) const + const ImageFile& getImageFile() const { return m_imageFile; } - ImageFile& getImageFile(void) + ImageFile& getImageFile() { return m_imageFile; } }; @@ -71,16 +72,17 @@ private: public: virtual bool OnSaveDocument (const wxString& filename); virtual bool OnOpenDocument (const wxString& filename); - virtual bool IsModified (void) const; + virtual bool IsModified () const; + virtual bool OnCloseDocument (); virtual void Modify (bool mod); - ProjectionFileDocument (void) {} - ~ProjectionFileDocument (void) {} + ProjectionFileDocument () {} + ~ProjectionFileDocument () {} - const Projections& getProjections (void) const + const Projections& getProjections () const { return m_projectionFile; } - Projections& getProjections (void) + Projections& getProjections () { return m_projectionFile; } }; @@ -91,31 +93,65 @@ class PhantomDocument: public wxDocument private: Phantom m_phantom; - Phantom::PhantomID m_idPhantom; + int m_idPhantom; wxString m_namePhantom; public: - PhantomDocument (void) + PhantomDocument () : m_idPhantom(Phantom::PHM_INVALID) {} - ~PhantomDocument (void) + ~PhantomDocument () {} - const Phantom::PhantomID getPhantomID (void) const + const int getPhantomID () const { return m_idPhantom; } - const wxString& getPhantomName (void) const + const wxString& getPhantomName () const { return m_namePhantom; } - const Phantom& getPhantom (void) const + const Phantom& getPhantom () const { return m_phantom; } - Phantom& getPhantom (void) + Phantom& getPhantom () { return m_phantom; } virtual bool OnOpenDocument (const wxString& filename); - virtual bool IsModified (void) const; + virtual bool OnSaveDocument (const wxString& filename); + virtual bool OnCloseDocument (); + virtual bool IsModified () const; + virtual void Modify (bool mod); +}; + + +class PlotFileDocument: public wxDocument +{ + DECLARE_DYNAMIC_CLASS(PlotFileDocument) + +private: + PlotFile m_plot; + wxString m_namePlot; + +public: + PlotFileDocument () + {} + + ~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 OnCloseDocument (); + virtual bool IsModified () const; virtual void Modify (bool mod); };