1cd4c40d4281286e450777e5e25e2655c705436b
[ctsim.git] / src / docs.h
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:          doc.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.1 2000/07/13 07:01:59 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 class TextEditDocument: public wxDocument
86 {
87     DECLARE_DYNAMIC_CLASS(TextEditDocument)
88 private:
89 public:
90     virtual bool OnSaveDocument(const wxString& filename);
91     virtual bool OnOpenDocument(const wxString& filename);
92     virtual bool IsModified(void) const;
93     virtual void Modify(bool mod);
94     
95     TextEditDocument(void) {}
96     ~TextEditDocument(void) {}
97 };
98
99
100 #endif