X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdlgprojections.h;fp=src%2Fdlgprojections.h;h=440d2ff2ceaf744759017ca387757b46060dd43c;hb=6bfb747f8163381d94a02c03a0351e9ca6815d22;hp=0000000000000000000000000000000000000000;hpb=1e88cf0f7fa4f690ea9f110e8ed3f2b5338d0a10;p=ctsim.git diff --git a/src/dlgprojections.h b/src/dlgprojections.h new file mode 100644 index 0000000..440d2ff --- /dev/null +++ b/src/dlgprojections.h @@ -0,0 +1,100 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: dlgprojections.h +** Purpose: Headers for Projection Collection Animation Dialog +** Programmer: Kevin Rosenberg +** Date Started: August 2000 +** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg +** +** $Id: dlgprojections.h,v 1.1 2000/08/27 20:32:55 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 +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + +#ifndef __DLGPROJECTIONS_H_ +#define __DLGPROJECTIONS_H_ + +#ifdef __GNUG__ +#pragma interface "dlgprojections.h" +#endif + +#include "wx/setup.h" +#include "wx/dialog.h" + +class wxButton; +class wxStaticText; +class Projections; +class Phantom; +class SGP; +class Scanner; +class SGP; +class SGPDriver; + +class ProjectionsDialog : public wxDialog +{ + DECLARE_DYNAMIC_CLASS(ProjectionsDialog) + +public: + ProjectionsDialog (Scanner& rScanner, Projections& rProj, const Phantom& rPhantom, const int iTrace, wxWindow *parent); + + ~ProjectionsDialog(); + + /* Perform projection on view number + return true if ABORT button has not been pressed + */ + bool projectView(int iViewNumber); + + /* Can be called to continue after the cancel button has been pressed, but + the program decided to continue the operation (e.g., user didn't + confirm it) + */ + void Resume() { m_state = Continue; } + + // implementation from now on + // callback for optional abort button + void OnCancel(wxCommandEvent& event); + // callback to disable "hard" window closing + void OnClose(wxCloseEvent& event); + +private: + // parent top level window (may be NULL) + wxWindow *m_parentTop; + + // continue processing or not (return value for Update()) + enum + { + Uncancelable = -1, // dialog can't be canceled + Canceled, // can be cancelled and, in fact, was + Continue, // can be cancelled but wasn't + Finished // finished, waiting to be removed from screen + } m_state; + + // the abort button (or NULL if none) + wxButton *m_btnAbort; + + Scanner& m_rScanner; + Projections& m_rProjections; + const Phantom& m_rPhantom; + SGPDriver* m_pSGPDriver; + SGP* m_pSGP; + const int m_iTrace; + wxDC* m_pDC; + + DECLARE_EVENT_TABLE() +}; +#endif +