1 /*****************************************************************************
5 ** Purpose: Header file for Document routines of CTSim program
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: July 2000
9 ** This is part of the CTSim program
10 ** Copyright (C) 1983-2000 Kevin Rosenberg
12 ** $Id: docs.h,v 1.12 2001/01/20 08:10:33 kevin Exp $
14 ** This program is free software; you can redistribute it and/or modify
15 ** it under the terms of the GNU General Public License (version 2) as
16 ** published by the Free Software Foundation.
18 ** This program is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
23 ** You should have received a copy of the GNU General Public License
24 ** along with this program; if not, write to the Free Software
25 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 ******************************************************************************/
35 #include "wx/docview.h"
37 #include "imagefile.h"
39 #include "projections.h"
42 class ImageFileDocument: public wxDocument
44 DECLARE_DYNAMIC_CLASS(ImageFileDocument)
46 ImageFile m_imageFile;
49 virtual bool OnSaveDocument (const wxString& filename);
50 virtual bool OnOpenDocument (const wxString& filename);
51 virtual bool IsModified () const;
52 virtual void Modify (bool mod);
54 ImageFileDocument () {}
55 ~ImageFileDocument () {}
57 const ImageFile& getImageFile() const
58 { return m_imageFile; }
60 ImageFile& getImageFile()
61 { return m_imageFile; }
65 class ProjectionFileDocument: public wxDocument
67 DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
69 Projections m_projectionFile;
72 virtual bool OnSaveDocument (const wxString& filename);
73 virtual bool OnOpenDocument (const wxString& filename);
74 virtual bool IsModified () const;
75 virtual void Modify (bool mod);
77 ProjectionFileDocument () {}
78 ~ProjectionFileDocument () {}
80 const Projections& getProjections () const
81 { return m_projectionFile; }
83 Projections& getProjections ()
84 { return m_projectionFile; }
88 class PhantomDocument: public wxDocument
90 DECLARE_DYNAMIC_CLASS(PhantomDocument)
95 wxString m_namePhantom;
99 : m_idPhantom(Phantom::PHM_INVALID)
105 const int getPhantomID () const
106 { return m_idPhantom; }
108 const wxString& getPhantomName () const
109 { return m_namePhantom; }
111 const Phantom& getPhantom () const
112 { return m_phantom; }
114 Phantom& getPhantom ()
115 { return m_phantom; }
117 virtual bool OnOpenDocument (const wxString& filename);
118 virtual bool OnSaveDocument (const wxString& filename);
119 virtual bool IsModified () const;
120 virtual void Modify (bool mod);
124 class PlotFileDocument: public wxDocument
126 DECLARE_DYNAMIC_CLASS(PlotFileDocument)
139 const wxString& getPlotName () const
140 { return m_namePlot; }
142 const PlotFile& getPlotFile () const
145 PlotFile& getPlotFile ()
148 virtual bool OnOpenDocument (const wxString& filename);
149 virtual bool OnSaveDocument (const wxString& filename);
150 virtual bool IsModified () const;
151 virtual void Modify (bool mod);