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.5 2000/09/07 01:28: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 (void) const;
52 virtual bool OnCloseDocument ();
53 virtual void Modify (bool mod);
55 ImageFileDocument (void) {}
56 ~ImageFileDocument (void) {}
58 const ImageFile& getImageFile(void) const
59 { return m_imageFile; }
61 ImageFile& getImageFile(void)
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 (void) const;
76 virtual bool OnCloseDocument ();
77 virtual void Modify (bool mod);
79 ProjectionFileDocument (void) {}
80 ~ProjectionFileDocument (void) {}
82 const Projections& getProjections (void) const
83 { return m_projectionFile; }
85 Projections& getProjections (void)
86 { return m_projectionFile; }
90 class PhantomDocument: public wxDocument
92 DECLARE_DYNAMIC_CLASS(PhantomDocument)
97 wxString m_namePhantom;
100 PhantomDocument (void)
101 : m_idPhantom(Phantom::PHM_INVALID)
104 ~PhantomDocument (void)
107 const int getPhantomID (void) const
108 { return m_idPhantom; }
110 const wxString& getPhantomName (void) const
111 { return m_namePhantom; }
113 const Phantom& getPhantom (void) const
114 { return m_phantom; }
116 Phantom& getPhantom (void)
117 { return m_phantom; }
119 virtual bool OnOpenDocument (const wxString& filename);
120 virtual bool OnCloseDocument ();
121 virtual bool IsModified (void) const;
122 virtual void Modify (bool mod);