X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdlgprojections.h;h=89e75238a38581093a84c8328098a72bc994e494;hb=68e8313b5c4ede4b5bc659224f4adc8db47f98c6;hp=440d2ff2ceaf744759017ca387757b46060dd43c;hpb=6bfb747f8163381d94a02c03a0351e9ca6815d22;p=ctsim.git diff --git a/src/dlgprojections.h b/src/dlgprojections.h index 440d2ff..89e7523 100644 --- a/src/dlgprojections.h +++ b/src/dlgprojections.h @@ -7,9 +7,9 @@ ** Date Started: August 2000 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg +** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dlgprojections.h,v 1.1 2000/08/27 20:32:55 kevin Exp $ +** $Id: dlgprojections.h,v 1.7 2001/01/28 19:10:18 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 @@ -34,6 +34,7 @@ #include "wx/setup.h" #include "wx/dialog.h" +#include "wx/dcmemory.h" class wxButton; class wxStaticText; @@ -41,7 +42,6 @@ class Projections; class Phantom; class SGP; class Scanner; -class SGP; class SGPDriver; class ProjectionsDialog : public wxDialog @@ -69,30 +69,50 @@ public: void OnCancel(wxCommandEvent& event); // callback to disable "hard" window closing void OnClose(wxCloseEvent& event); + void OnPaint(wxPaintEvent& event); + + void OnPause(wxCommandEvent& event); + void OnStep(wxCommandEvent& event); + + bool isPaused() const {return m_state == Paused;} + + bool isCancelled() const {return m_state == Cancelled;} private: // parent top level window (may be NULL) wxWindow *m_parentTop; + int m_iLastView; + int m_iClientX; // size of client window + int m_iClientY; + + Scanner& m_rScanner; + Projections& m_rProjections; + const Phantom& m_rPhantom; + SGPDriver* m_pSGPDriver; + SGP* m_pSGP; + const int m_iTrace; + wxDC* m_pDC; + + wxButton *m_btnAbort; // the abort button (or NULL if none) + wxButton *m_btnPause; + wxButton *m_btnStep; + + wxMemoryDC m_memoryDC; // for restoring image on OnPaint + wxBitmap m_bitmap; // continue processing or not (return value for Update()) enum { - Uncancelable = -1, // dialog can't be canceled - Canceled, // can be cancelled and, in fact, was + Uncancellable = -1, // dialog can't be canceled + Paused, + Cancelled, // 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; + enum { ID_BTN_PAUSE = 19996, ID_BTN_STEP = 19997 }; - Scanner& m_rScanner; - Projections& m_rProjections; - const Phantom& m_rPhantom; - SGPDriver* m_pSGPDriver; - SGP* m_pSGP; - const int m_iTrace; - wxDC* m_pDC; + void showView (int iViewNumber); DECLARE_EVENT_TABLE() };