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.2 2000/07/15 08:36:13 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"
36 #include "imagefile.h"
37 #include "projections.h"
40 class ImageFileDocument: public wxDocument
42 DECLARE_DYNAMIC_CLASS(ImageFileDocument)
44 ImageFile m_imageFile;
47 virtual bool OnSaveDocument (const wxString& filename);
48 virtual bool OnOpenDocument (const wxString& filename);
49 virtual bool IsModified (void) const;
50 virtual void Modify (bool mod);
52 ImageFileDocument (void) {}
53 ~ImageFileDocument (void) {}
55 const ImageFile& getImageFile(void) const
56 { return m_imageFile; }
58 ImageFile& getImageFile(void)
59 { return m_imageFile; }
63 class ProjectionFileDocument: public wxDocument
65 DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
67 Projections m_projectionFile;
70 virtual bool OnSaveDocument (const wxString& filename);
71 virtual bool OnOpenDocument (const wxString& filename);
72 virtual bool IsModified (void) const;
73 virtual void Modify (bool mod);
75 ProjectionFileDocument (void) {}
76 ~ProjectionFileDocument (void) {}
78 const Projections& getProjections (void) const
79 { return m_projectionFile; }
81 Projections& getProjections (void)
82 { return m_projectionFile; }
86 class PhantomDocument: public wxDocument
88 DECLARE_DYNAMIC_CLASS(PhantomDocument)
92 Phantom::PhantomID m_idPhantom;
93 wxString m_namePhantom;
96 PhantomDocument (void)
97 : m_idPhantom(Phantom::PHM_INVALID)
100 ~PhantomDocument (void)
103 const Phantom::PhantomID getPhantomID (void) const
104 { return m_idPhantom; }
106 const wxString& getPhantomName (void) const
107 { return m_namePhantom; }
109 const Phantom& getPhantom (void) const
110 { return m_phantom; }
112 Phantom& getPhantom (void)
113 { return m_phantom; }
115 virtual bool OnOpenDocument (const wxString& filename);
116 virtual bool IsModified (void) const;
117 virtual void Modify (bool mod);