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.9 2000/12/27 03:16:02 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 bool OnCloseDocument ();
53 virtual void Modify (bool mod);
55 ImageFileDocument () {}
56 ~ImageFileDocument () {}
58 const ImageFile& getImageFile() const
59 { return m_imageFile; }
61 ImageFile& getImageFile()
62 { return m_imageFile; }
66 class ProjectionFileDocument: public wxDocument
68 DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
70 Projections m_projectionFile;
73 virtual bool OnSaveDocument (const wxString& filename);
74 virtual bool OnOpenDocument (const wxString& filename);
75 virtual bool IsModified () const;
76 virtual bool OnCloseDocument ();
77 virtual void Modify (bool mod);
79 ProjectionFileDocument () {}
80 ~ProjectionFileDocument () {}
82 const Projections& getProjections () const
83 { return m_projectionFile; }
85 Projections& getProjections ()
86 { return m_projectionFile; }
90 class PhantomDocument: public wxDocument
92 DECLARE_DYNAMIC_CLASS(PhantomDocument)
97 wxString m_namePhantom;
101 : m_idPhantom(Phantom::PHM_INVALID)
107 const int getPhantomID () const
108 { return m_idPhantom; }
110 const wxString& getPhantomName () const
111 { return m_namePhantom; }
113 const Phantom& getPhantom () const
114 { return m_phantom; }
116 Phantom& getPhantom ()
117 { return m_phantom; }
119 virtual bool OnOpenDocument (const wxString& filename);
120 virtual bool OnCloseDocument ();
121 virtual bool IsModified () const;
122 virtual void Modify (bool mod);
126 class PlotFileDocument: public wxDocument
128 DECLARE_DYNAMIC_CLASS(PlotFileDocument)
141 const wxString& getPlotName () const
142 { return m_namePlot; }
144 const PlotFile& getPlotFile () const
147 PlotFile& getPlotFile ()
\r
150 virtual bool OnOpenDocument (const wxString& filename);
\r
151 virtual bool OnSaveDocument (const wxString& filename);
\r
152 virtual bool OnCloseDocument ();
153 virtual bool IsModified () const;
154 virtual void Modify (bool mod);