r469: Fixed shutdown error, take 2
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 30 Jan 2001 01:21:37 +0000 (01:21 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 30 Jan 2001 01:21:37 +0000 (01:21 +0000)
msvc/ctsim/ctsim.plg
src/ctsim.cpp
src/views.cpp
src/views.h

index 28f7e041aa5b01d5f73450bfa0ef5a38c3332ba4..0e8c2c5210fcce7f3516c3228886d720200a9026 100644 (file)
@@ -6,13 +6,13 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24C.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP786.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\src\views.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24C.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24D.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP786.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP787.tmp" with contents
 [
 comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib wxd.lib xpmd.lib tiffd.lib zlibd.lib pngd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" 
 .\Debug\ctsim.obj
@@ -32,7 +32,7 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \wx2.2.5\lib\xpmd.lib
 \wx2.2.5\lib\zlibd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24D.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP787.tmp"
 <h3>Output Window</h3>
 Compiling...
 views.cpp
index a55ba8e3d0e38cc953e05f906a3cb5ba81a23a1e..5d6ef6f68b173859046a600082bcc633a3ee64d8 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.58 2001/01/29 23:11:32 kevin Exp $
+**  $Id: ctsim.cpp,v 1.59 2001/01/30 01:21:37 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
@@ -70,7 +70,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.58 2001/01/29 23:11:32 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.59 2001/01/30 01:21:37 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -776,7 +776,6 @@ CTSimApp::newProjectionDoc()
                                pFrame->Show (false);
                        }
                }
-//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -795,7 +794,6 @@ CTSimApp::newImageDoc()
                                pFrame->Show (false);
                        }
                }
-//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -816,7 +814,6 @@ CTSimApp::newPlotDoc()
                                pFrame->Show (false);
                        }
                }
-//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -841,7 +838,6 @@ CTSimApp::newTextDoc()
                                pFrame->Show (false);
                        }
                }
-//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -859,7 +855,6 @@ CTSimApp::newPhantomDoc()
                        if (pFrame)
                                pFrame->SetSize (0,0);
                }
-//             newDoc->OnNewDocument();
        }
        
        return newDoc;
index a2a30f40abd2590dd9fe78b0c5cee84b025a25c2..713733b88383e3c5013972cc075e2b30acdc8f72 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.88 2001/01/29 23:11:32 kevin Exp $
+**  $Id: views.cpp,v 1.89 2001/01/30 01:21:37 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
@@ -65,6 +65,7 @@
 
 BEGIN_EVENT_TABLE(ImageFileCanvas, wxScrolledWindow)
 EVT_MOUSE_EVENTS(ImageFileCanvas::OnMouseEvent)
+EVT_CHAR(ImageFileCanvas::OnChar)
 END_EVENT_TABLE()
 
 
@@ -175,6 +176,18 @@ ImageFileCanvas::OnMouseEvent(wxMouseEvent& event)
   }
 }
 
+void
+ImageFileCanvas::OnChar (wxKeyEvent& event)
+{
+  if (event.GetKeyCode() == WXK_ESCAPE) {
+    m_xCursor = -1;
+    m_yCursor = -1;
+    if (m_pView)
+      m_pView->OnUpdate (NULL);
+  } else
+    wxScrolledWindow::OnChar (event);
+}
+
 wxSize
 ImageFileCanvas::GetBestSize() const
 {
@@ -1000,11 +1013,9 @@ ImageFileView::OnClose (bool deleteWindow)
     return false;
   
   if (m_pCanvas) {
-    //m_pCanvas->Show(false);
     m_pCanvas->setView(NULL);
     m_pCanvas = NULL;
   }
-  //m_pFrame->Show(false);
   wxString s(theApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
@@ -1013,7 +1024,6 @@ ImageFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
-    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
@@ -2065,11 +2075,9 @@ PhantomFileView::OnClose (bool deleteWindow)
     return false;
   
   if (m_pCanvas) {
-    m_pCanvas->Show(false);
     m_pCanvas->setView(NULL);
     m_pCanvas = NULL;
   }
-    m_pFrame->Show(false);
   wxString s(wxTheApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
@@ -2078,7 +2086,6 @@ PhantomFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
-    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
@@ -2545,11 +2552,9 @@ ProjectionFileView::OnClose (bool deleteWindow)
     return false;
   
   if (m_pCanvas) {
-       m_pCanvas->Show(false);
-    m_pCanvas->setView(NULL);
+       m_pCanvas->setView(NULL);
     m_pCanvas = NULL;
   }
-  m_pFrame->Show(false);
   wxString s(wxTheApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
@@ -2558,7 +2563,6 @@ ProjectionFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
-//   delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
@@ -2876,21 +2880,17 @@ PlotFileView::OnClose (bool deleteWindow)
     return false;
   
   if (m_pCanvas) {
-    //m_pCanvas->Show(false);
     m_pCanvas->setView (NULL);
     m_pCanvas = NULL;
   }
-    //m_pFrame->Show(false);
   wxString s(wxTheApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
   
   Activate(false);
   
-  m_pFrame->SetView(NULL);
   SetFrame(NULL);
   if (deleteWindow) {
-    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
@@ -2953,14 +2953,10 @@ TextFileView::OnClose (bool deleteWindow)
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
-  //m_pCanvas->Show(false);
-  //m_pFrame->Show(false);
   Activate(false);
   
   SetFrame(NULL);
-  m_pFrame->SetView(NULL);
   if (deleteWindow) {
-    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
     
index c36ad23f3eb58d71a90d762fef2a7d178a66f258..1abe90d59f900cad484bf7bd48230fa35908ec7a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.h,v 1.38 2001/01/28 22:45:54 kevin Exp $
+**  $Id: views.h,v 1.39 2001/01/30 01:21:37 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
@@ -158,6 +158,7 @@ public:
   virtual ~ImageFileCanvas();
 
   virtual void OnDraw(wxDC& dc);
+  void OnChar(wxKeyEvent& event);
   void OnMouseEvent(wxMouseEvent& event);
   void DrawRubberBandCursor (wxDC& dc, int x, int y);
   bool GetCurrentCursor (int& x, int& y);