projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r470: Fixed shutdown error, take 3
[ctsim.git]
/
src
/
docs.h
diff --git
a/src/docs.h
b/src/docs.h
index 06cddcc6632dce2512b305c750242d40b1f31d85..9d09e879ea61c163edb039e2db4f09977c2fa3ff 100644
(file)
--- a/
src/docs.h
+++ b/
src/docs.h
@@
-7,9
+7,9
@@
** Date Started: July 2000
**
** This is part of the CTSim program
** Date Started: July 2000
**
** This is part of the CTSim program
-** Copyright (
C) 1983-2000
Kevin Rosenberg
+** Copyright (
c) 1983-2001
Kevin Rosenberg
**
**
-** $Id: docs.h,v 1.1
3 2001/01/20 17:43:41
kevin Exp $
+** $Id: docs.h,v 1.1
6 2001/01/30 02:20:50
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-34,17
+34,24
@@
#include "wx/docview.h"
#include "wx/docview.h"
+// #include "views.h"
#include "imagefile.h"
#include "phantom.h"
#include "projections.h"
#include "plotfile.h"
#include "imagefile.h"
#include "phantom.h"
#include "projections.h"
#include "plotfile.h"
+class ProjectionFileView;
+class PhantomFileView;
+class ImageFileView;
+class PlotFileView;
+class TextFileView;
class ImageFileDocument: public wxDocument
{
class ImageFileDocument: public wxDocument
{
- DECLARE_DYNAMIC_CLASS(ImageFileDocument)
private:
private:
+ DECLARE_DYNAMIC_CLASS(ImageFileDocument)
ImageFile m_imageFile;
ImageFile m_imageFile;
+ bool m_bBadFileOpen;
public:
virtual bool OnSaveDocument (const wxString& filename);
public:
virtual bool OnSaveDocument (const wxString& filename);
@@
-52,22
+59,26
@@
public:
virtual bool IsModified () const;
virtual void Modify (bool mod);
virtual bool IsModified () const;
virtual void Modify (bool mod);
- ImageFileDocument () {}
- ~ImageFileDocument () {}
+ ImageFileDocument ()
+ : m_bBadFileOpen(false)
+ {}
- const ImageFile& getImageFile() const
- { return m_imageFile; }
+ virtual ~ImageFileDocument () {}
- ImageFile& getImageFile()
- { return m_imageFile; }
+ const ImageFile& getImageFile() const { return m_imageFile; }
+
+ ImageFile& getImageFile() { return m_imageFile; }
+ ImageFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
};
class ProjectionFileDocument: public wxDocument
{
};
class ProjectionFileDocument: public wxDocument
{
- DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
private:
private:
+ DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
Projections m_projectionFile;
Projections m_projectionFile;
+ bool m_bBadFileOpen;
public:
virtual bool OnSaveDocument (const wxString& filename);
public:
virtual bool OnSaveDocument (const wxString& filename);
@@
-75,66
+86,68
@@
public:
virtual bool IsModified () const;
virtual void Modify (bool mod);
virtual bool IsModified () const;
virtual void Modify (bool mod);
- ProjectionFileDocument () {}
- ~ProjectionFileDocument () {}
+ ProjectionFileDocument ()
+ : m_bBadFileOpen(false)
+ {}
+
+ virtual ~ProjectionFileDocument () {}
- const Projections& getProjections () const
- { return m_projectionFile; }
+ const Projections& getProjections () const
{ return m_projectionFile; }
+
Projections& getProjections ()
{ return m_projectionFile; }
- Projection
s& getProjections ()
-
{ return m_projectionFile
; }
+ Projection
FileView* getView() const;
+
bool getBadFileOpen() const { return m_bBadFileOpen
; }
};
};
-class PhantomDocument: public wxDocument
+class Phantom
File
Document: public wxDocument
{
{
- DECLARE_DYNAMIC_CLASS(PhantomDocument)
-
private:
private:
+ DECLARE_DYNAMIC_CLASS(PhantomFileDocument)
Phantom m_phantom;
int m_idPhantom;
wxString m_namePhantom;
Phantom m_phantom;
int m_idPhantom;
wxString m_namePhantom;
+ bool m_bBadFileOpen;
public:
public:
- PhantomDocument ()
- : m_idPhantom(Phantom::PHM_INVALID)
-
{}
+ Phantom
File
Document ()
+ : m_idPhantom(Phantom::PHM_INVALID)
, m_bBadFileOpen(false)
+ {}
-
~Phantom
Document ()
-
{}
+
virtual ~PhantomFile
Document ()
+ {}
- const int getPhantomID () const
- { return m_idPhantom; }
+ const int getPhantomID () const { return m_idPhantom; }
- const wxString& getPhantomName () const
- { return m_namePhantom; }
+ const wxString& getPhantomName () const { return m_namePhantom; }
- const Phantom& getPhantom () const
- { return m_phantom; }
+ const Phantom& getPhantom () const { return m_phantom; }
- Phantom& getPhantom ()
- { return m_phantom; }
+ Phantom& getPhantom () { return m_phantom; }
virtual bool OnOpenDocument (const wxString& filename);
virtual bool OnSaveDocument (const wxString& filename);
virtual bool IsModified () const;
virtual void Modify (bool mod);
virtual bool OnOpenDocument (const wxString& filename);
virtual bool OnSaveDocument (const wxString& filename);
virtual bool IsModified () const;
virtual void Modify (bool mod);
+ PhantomFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
};
class PlotFileDocument: public wxDocument
{
};
class PlotFileDocument: public wxDocument
{
- DECLARE_DYNAMIC_CLASS(PlotFileDocument)
-
private:
private:
+ DECLARE_DYNAMIC_CLASS(PlotFileDocument)
PlotFile m_plot;
wxString m_namePlot;
PlotFile m_plot;
wxString m_namePlot;
+ bool m_bBadFileOpen;
public:
PlotFileDocument ()
public:
PlotFileDocument ()
- {}
+ : m_bBadFileOpen(false)
+ {}
- ~PlotFileDocument ()
+
virtual
~PlotFileDocument ()
{}
const wxString& getPlotName () const
{}
const wxString& getPlotName () const
@@
-150,25
+163,32
@@
public:
virtual bool OnSaveDocument (const wxString& filename);
virtual bool IsModified () const;
virtual void Modify (bool mod);
virtual bool OnSaveDocument (const wxString& filename);
virtual bool IsModified () const;
virtual void Modify (bool mod);
+ PlotFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
};
};
-#include "views.h"
-class Text
Edit
Document: public wxDocument
+class Text
File
Document: public wxDocument
{
private:
{
private:
- DECLARE_DYNAMIC_CLASS(TextEditDocument)
+ DECLARE_DYNAMIC_CLASS(TextFileDocument)
+ bool m_bBadFileOpen;
public:
public:
- TextEditDocument(void) {}
- ~TextEditDocument(void) {}
+ TextFileDocument(void)
+ : m_bBadFileOpen(false)
+ {}
+
+ virtual ~TextFileDocument(void) {}
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
virtual bool IsModified(void) const;
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
virtual bool IsModified(void) const;
- wxTextCtrl* getTextCtrl()
- { return dynamic_cast<TextEditView*>(GetFirstView())->getTextCtrl(); }
+ wxTextCtrl* getTextCtrl();
+
+ TextFileView* getView() const;
+ bool getBadFileOpen() const { return m_bBadFileOpen; }
};
};