r191: *** 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.5 2000/09/07 01:28:33 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
37 #include "imagefile.h"
38 #include "phantom.h"
39 #include "projections.h"
40
41
42 class ImageFileDocument: public wxDocument
43 {
44     DECLARE_DYNAMIC_CLASS(ImageFileDocument)
45 private:
46     ImageFile m_imageFile;
47
48 public:
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);
54     
55     ImageFileDocument (void) {}
56     ~ImageFileDocument (void) {}
57
58     const ImageFile& getImageFile(void) const
59         { return m_imageFile; }
60
61     ImageFile& getImageFile(void)
62         { return m_imageFile; }
63 };
64
65
66 class ProjectionFileDocument: public wxDocument
67 {
68     DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
69 private:
70     Projections m_projectionFile;
71
72 public:
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);
78     
79     ProjectionFileDocument (void) {}
80     ~ProjectionFileDocument (void) {}
81
82     const Projections& getProjections (void) const
83         { return m_projectionFile; }
84
85     Projections& getProjections (void)
86         { return m_projectionFile; }
87 };
88
89
90 class PhantomDocument: public wxDocument
91 {
92     DECLARE_DYNAMIC_CLASS(PhantomDocument)
93
94 private:
95     Phantom m_phantom;
96     int m_idPhantom;
97     wxString m_namePhantom;
98
99 public:
100     PhantomDocument (void) 
101         : m_idPhantom(Phantom::PHM_INVALID)
102         {}
103
104     ~PhantomDocument (void) 
105         {}
106
107     const int getPhantomID (void) const
108         { return m_idPhantom; }
109
110     const wxString& getPhantomName (void) const
111         { return m_namePhantom; }
112
113     const Phantom& getPhantom (void) const
114         { return m_phantom; }
115
116     Phantom& getPhantom (void)
117         { return m_phantom; }
118
119     virtual bool OnOpenDocument (const wxString& filename);
120     virtual bool OnCloseDocument ();
121     virtual bool IsModified (void) const;
122     virtual void Modify (bool mod);
123 };
124
125
126 #endif