X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdocs.h;h=b56ebe5442cbb5cd66d5f6d6ef3b9e47aaacf7b4;hb=ab4a3ba2c1ba9672136b5022897f81fc55d03493;hp=1cd4c40d4281286e450777e5e25e2655c705436b;hpb=1fd4f7cc977b9f1499716de10d15656bd50f4816;p=ctsim.git diff --git a/src/docs.h b/src/docs.h index 1cd4c40..b56ebe5 100644 --- a/src/docs.h +++ b/src/docs.h @@ -1,7 +1,7 @@ /***************************************************************************** ** FILE IDENTIFICATION ** -** Name: doc.h +** Name: docs.h ** Purpose: Header file for Document routines of CTSim program ** Programmer: Kevin Rosenberg ** Date Started: July 2000 @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: docs.h,v 1.1 2000/07/13 07:01:59 kevin Exp $ +** $Id: docs.h,v 1.3 2000/07/19 04:33:27 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 @@ -33,7 +33,9 @@ #define __DOCSH__ #include "wx/docview.h" + #include "imagefile.h" +#include "phantom.h" #include "projections.h" @@ -44,13 +46,13 @@ private: ImageFile m_imageFile; public: - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); + virtual bool OnSaveDocument (const wxString& filename); + virtual bool OnOpenDocument (const wxString& filename); + virtual bool IsModified (void) const; + virtual void Modify (bool mod); - ImageFileDocument(void) {} - ~ImageFileDocument(void) {} + ImageFileDocument (void) {} + ~ImageFileDocument (void) {} const ImageFile& getImageFile(void) const { return m_imageFile; } @@ -67,33 +69,54 @@ private: Projections m_projectionFile; public: - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); + virtual bool OnSaveDocument (const wxString& filename); + virtual bool OnOpenDocument (const wxString& filename); + virtual bool IsModified (void) const; + virtual void Modify (bool mod); - ProjectionFileDocument(void) {} - ~ProjectionFileDocument(void) {} + ProjectionFileDocument (void) {} + ~ProjectionFileDocument (void) {} - const Projections& getProjections(void) const + const Projections& getProjections (void) const { return m_projectionFile; } - Projections& getProjections(void) + Projections& getProjections (void) { return m_projectionFile; } }; -class TextEditDocument: public wxDocument + +class PhantomDocument: public wxDocument { - DECLARE_DYNAMIC_CLASS(TextEditDocument) + DECLARE_DYNAMIC_CLASS(PhantomDocument) + private: + Phantom m_phantom; + Phantom::PhantomID m_idPhantom; + wxString m_namePhantom; + public: - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); - - TextEditDocument(void) {} - ~TextEditDocument(void) {} + PhantomDocument (void) + : m_idPhantom(Phantom::PHM_INVALID) + {} + + ~PhantomDocument (void) + {} + + const Phantom::PhantomID getPhantomID (void) const + { return m_idPhantom; } + + const wxString& getPhantomName (void) const + { return m_namePhantom; } + + const Phantom& getPhantom (void) const + { return m_phantom; } + + Phantom& getPhantom (void) + { return m_phantom; } + + virtual bool OnOpenDocument (const wxString& filename); + virtual bool IsModified (void) const; + virtual void Modify (bool mod); };