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.3 2000/07/19 04:33:27 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 (void) const;
52 virtual void Modify (bool mod);
54 ImageFileDocument (void) {}
55 ~ImageFileDocument (void) {}
57 const ImageFile& getImageFile(void) const
58 { return m_imageFile; }
60 ImageFile& getImageFile(void)
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 (void) const;
75 virtual void Modify (bool mod);
77 ProjectionFileDocument (void) {}
78 ~ProjectionFileDocument (void) {}
80 const Projections& getProjections (void) const
81 { return m_projectionFile; }
83 Projections& getProjections (void)
84 { return m_projectionFile; }
88 class PhantomDocument: public wxDocument
90 DECLARE_DYNAMIC_CLASS(PhantomDocument)
94 Phantom::PhantomID m_idPhantom;
95 wxString m_namePhantom;
98 PhantomDocument (void)
99 : m_idPhantom(Phantom::PHM_INVALID)
102 ~PhantomDocument (void)
105 const Phantom::PhantomID getPhantomID (void) const
106 { return m_idPhantom; }
108 const wxString& getPhantomName (void) const
109 { return m_namePhantom; }
111 const Phantom& getPhantom (void) const
112 { return m_phantom; }
114 Phantom& getPhantom (void)
115 { return m_phantom; }
117 virtual bool OnOpenDocument (const wxString& filename);
118 virtual bool IsModified (void) const;
119 virtual void Modify (bool mod);