r148: *** empty log message ***
[ctsim.git] / src / docs.h
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:          docs.h
5 **   Purpose:       Header file for Document routines of CTSim program
6 **   Programmer:    Kevin Rosenberg
7 **   Date Started:  July 2000
8 **
9 **  This is part of the CTSim program
10 **  Copyright (C) 1983-2000 Kevin Rosenberg
11 **
12 **  $Id: docs.h,v 1.2 2000/07/15 08:36:13 kevin Exp $
13 **
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.
17 **
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.
22 **
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 ******************************************************************************/
27
28 #ifdef __GNUG__
29 // #pragma interface
30 #endif
31
32 #ifndef __DOCSH__
33 #define __DOCSH__
34
35 #include "wx/docview.h"
36 #include "imagefile.h"
37 #include "projections.h"
38
39
40 class ImageFileDocument: public wxDocument
41 {
42     DECLARE_DYNAMIC_CLASS(ImageFileDocument)
43 private:
44     ImageFile m_imageFile;
45
46 public:
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);
51     
52     ImageFileDocument (void) {}
53     ~ImageFileDocument (void) {}
54
55     const ImageFile& getImageFile(void) const
56         { return m_imageFile; }
57
58     ImageFile& getImageFile(void)
59         { return m_imageFile; }
60 };
61
62
63 class ProjectionFileDocument: public wxDocument
64 {
65     DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
66 private:
67     Projections m_projectionFile;
68
69 public:
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);
74     
75     ProjectionFileDocument (void) {}
76     ~ProjectionFileDocument (void) {}
77
78     const Projections& getProjections (void) const
79         { return m_projectionFile; }
80
81     Projections& getProjections (void)
82         { return m_projectionFile; }
83 };
84
85
86 class PhantomDocument: public wxDocument
87 {
88     DECLARE_DYNAMIC_CLASS(PhantomDocument)
89
90 private:
91     Phantom m_phantom;
92     Phantom::PhantomID m_idPhantom;
93     wxString m_namePhantom;
94
95 public:
96     PhantomDocument (void) 
97         : m_idPhantom(Phantom::PHM_INVALID)
98         {}
99
100     ~PhantomDocument (void) 
101         {}
102
103     const Phantom::PhantomID getPhantomID (void) const
104         { return m_idPhantom; }
105
106     const wxString& getPhantomName (void) const
107         { return m_namePhantom; }
108
109     const Phantom& getPhantom (void) const
110         { return m_phantom; }
111
112     Phantom& getPhantom (void)
113         { return m_phantom; }
114
115     virtual bool OnOpenDocument (const wxString& filename);
116     virtual bool IsModified (void) const;
117     virtual void Modify (bool mod);
118 };
119
120
121 #endif