r470: Fixed shutdown error, take 3
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 30 Jan 2001 02:20:50 +0000 (02:20 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 30 Jan 2001 02:20:50 +0000 (02:20 +0000)
ChangeLog
libctsupport/syserror.cpp
msvc/ctsim/ctsim.dsp
msvc/ctsim/ctsim.plg
msvc/ctsim225.dsw [new file with mode: 0644]
msvc/ctsimtext/ctsimtext.dsp
msvc/libctsim/libctsim.dsp
src/docs.cpp
src/docs.h
src/views.cpp
src/views.h

index 6b18e097f08a85a046d37e15d7a9e8c6ddff928f..0e1af364206f5f77f0410e41ac8b8a39cc16e160 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        * ctsim: Added MDI interface for Windows version and made it default
 
        * ctsim: Added graphical About box
+
+       * ctsim: Escape key now removes cursor from image files
        
        * ctsim: Added accelerator (hotkeys) to frames
 
index a4f8edae99413543deddff0e2192d0cc2c1f101c..d50471ef4f1e504aac49fa806ca76d348fab8373 100644 (file)
@@ -2,7 +2,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: syserror.cpp,v 1.19 2001/01/28 19:10:18 kevin Exp $
+**  $Id: syserror.cpp,v 1.20 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
@@ -54,8 +54,12 @@ void sys_error (int severity, const char *msg, ...)
   sys_verror (strOutput, severity, msg, arg);
  
 #ifdef HAVE_WXWINDOWS
-  if (g_bRunningWXWindows)
-    wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));
+  if (g_bRunningWXWindows) {
+    if (theApp)
+      *theApp->getLog() << strOutput.c_str() << "\n";
+    else
+      wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));
+  }
   else
 #endif
     std::cout << strOutput;
index 80372632e15b5fcca9f836dd1ff07742b37e5875..2450c8b1446b88a5f1acfab16d37c31164041e90 100644 (file)
@@ -43,11 +43,11 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\include" /D "NDEBUG" /D "__WXWIN__" /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.0beta1\" /FR /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "...\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D "NDEBUG" /D "__WXWIN__" /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.0beta1\" /FR /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "\wx2.2.1\include" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "\wx2.2.5\include" /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
@@ -69,17 +69,17 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /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.0beta1\" /FR /YX /FD /GZ /c
+# ADD CPP /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.0beta1\" /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "\wx2.2.1\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "\wx2.2.5\include" /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 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 pngd.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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 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 /debug /machine:I386 /pdbtype:sept /libpath:"\wx2.2.5\lib"
 # SUBTRACT LINK32 /nodefaultlib
 
 !ENDIF 
index 0e8c2c5210fcce7f3516c3228886d720200a9026..aaf56f30e2081f04af69275215ee51025c8bf15a 100644 (file)
@@ -3,16 +3,59 @@
 <pre>
 <h1>Build Log</h1>
 <h3>
---------------------Configuration: ctsim - Win32 Debug--------------------
+--------------------Configuration: libctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP786.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C4.tmp" with contents
+[
+/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
+"C:\ctsim\libctsupport\syserror.cpp"
+]
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C4.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C5.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"
+/nologo /out:"Debug\libctsim.lib" 
+.\Debug\array2dfile.obj
+.\Debug\backprojectors.obj
+.\Debug\clip.obj
+.\Debug\consoleio.obj
+.\Debug\dlgezplot.obj
+.\Debug\ezplot.obj
+.\Debug\ezset.obj
+.\Debug\ezsupport.obj
+.\Debug\filter.obj
+.\Debug\fnetorderstream.obj
+.\Debug\fourier.obj
+.\Debug\getopt.obj
+.\Debug\getopt1.obj
+.\Debug\globalvars.obj
+.\Debug\hashtable.obj
+.\Debug\imagefile.obj
+.\Debug\mathfuncs.obj
+.\Debug\phantom.obj
+.\Debug\plotfile.obj
+.\Debug\pol.obj
+.\Debug\procsignal.obj
+.\Debug\projections.obj
+.\Debug\reconstruct.obj
+.\Debug\scanner.obj
+.\Debug\sgp.obj
+.\Debug\strfuncs.obj
+.\Debug\syserror.obj
+.\Debug\trace.obj
+.\Debug\transformmatrix.obj
+.\Debug\xform.obj
 ]
-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
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C5.tmp"
+<h3>Output Window</h3>
+Compiling...
+syserror.cpp
+Creating library...
+<h3>
+--------------------Configuration: ctsim - Win32 Debug--------------------
+</h3>
+<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C6.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,10 +75,8 @@ 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\RSP787.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7C6.tmp"
 <h3>Output Window</h3>
-Compiling...
-views.cpp
 Linking...
 
 
diff --git a/msvc/ctsim225.dsw b/msvc/ctsim225.dsw
new file mode 100644 (file)
index 0000000..5755408
--- /dev/null
@@ -0,0 +1,182 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "FFTW2st"="..\..\fftw-2.1.3\Win32\FFTW2st\FFTW2st.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "RFFTW2st"="..\..\fftw-2.1.3\Win32\RFFTW2st\RFFTW2st.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "ctsim"=.\ctsim\ctsim.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libctsim
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name FFTW2st
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name RFFTW2st
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name jpeg
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name png
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name tiff
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name wxvc
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name xpm
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name zlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ctsimtext"=.\ctsimtext\ctsimtext.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libctsim
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name RFFTW2st
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "jpeg"=..\..\wx2.2.5\src\jpeg\JpegVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libctsim"=.\libctsim\libctsim.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "png"=..\..\wx2.2.5\src\png\PngVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "tiff"=..\..\wx2.2.5\src\tiff\TiffVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "wxvc"=..\..\wx2.2.5\src\wxvc.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "xpm"=..\..\wx2.2.5\src\xpm\XpmVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "zlib"=..\..\wx2.2.5\src\zlib\ZlibVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
index 30464d982254f8f6acf53a2b2a6c542f870425c0..3b6c3240c3cc74e24ae12e9f579f5c7e516c9658 100644 (file)
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "NDEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "../../include" /I "../../getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /D VERSION=\"3.0.0beta1\" /D "NDEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /YX /FD /c
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
 # ADD RSC /l 0x409 /d "NDEBUG"
 BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.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 /nologo /subsystem:console /machine:I386
-# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.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 tiff.lib jpeg.lib png.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib xpmd.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.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 tiff.lib jpeg.lib png.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib xpmd.lib /nologo /subsystem:console /machine:I386 /libpath:"\wx2.2.5\lib"
 
 !ELSEIF  "$(CFG)" == "ctsimtext - Win32 Debug"
 
@@ -66,7 +66,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "_DEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "../../include" /I "../../getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /FR /YX /FD /GZ /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
@@ -74,7 +74,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pngd.lib  zlibd.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib xpmd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pngd.lib zlibd.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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"\wx2.2.5\lib"
 # SUBTRACT LINK32 /verbose /incremental:no /nodefaultlib
 
 !ENDIF 
index b17a3e0647b7a6d0a66cc73b25b1d53a7d4060f8..b2d359eab77693af864c482b0c99ba1f0364f2dd 100644 (file)
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Target_Dir ""
 MTL=midl.exe
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\include" /D "NDEBUG" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /D "NDEBUG" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /YX /FD /c
 # SUBTRACT CPP /X
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
 # ADD RSC /l 0x409 /d "NDEBUG"
@@ -67,7 +67,7 @@ LIB32=link.exe -lib
 # PROP Target_Dir ""
 MTL=midl.exe
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /FR /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /FR /YX /FD /GZ /c
 # SUBTRACT CPP /X
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
index daef2f4dfc897f89e26047e6457a846083b4a0f3..88e6ba59222e8f2f8c5dda1b7e6649bf73ace788 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: docs.cpp,v 1.16 2001/01/28 19:10:18 kevin Exp $
+**  $Id: docs.cpp,v 1.17 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
@@ -68,17 +68,21 @@ bool ImageFileDocument::OnSaveDocument(const wxString& filename)
 
 bool ImageFileDocument::OnOpenDocument(const wxString& filename)
 {
+  if (! OnSaveModified())
+    return false;
+
   if (! m_imageFile.fileRead (filename.c_str())) {
     *theApp->getLog() << "Unable to read image file " << filename << "\n";
+    m_bBadFileOpen = true;
     return false;
   }
   *theApp->getLog() << "Read image file " << filename << "\n";
-  SetFilename(filename, true);
-  
+  SetFilename(filename, true);  
   Modify(false);
   UpdateAllViews();
   GetFirstView()->OnUpdate (GetFirstView(), NULL);
-  
+  m_bBadFileOpen = false;
+
   return true;
 }
 
@@ -115,8 +119,12 @@ bool ProjectionFileDocument::OnSaveDocument(const wxString& filename)
 
 bool ProjectionFileDocument::OnOpenDocument(const wxString& filename)
 {
+  if (! OnSaveModified())
+    return false;
+
   if (! m_projectionFile.read (filename.c_str())) {
     *theApp->getLog() << "Unable to read projection file " << filename << "\n";
+    m_bBadFileOpen = true;
     return false;
   }
   *theApp->getLog() << "Read projection file " << filename << "\n";
@@ -124,6 +132,7 @@ bool ProjectionFileDocument::OnOpenDocument(const wxString& filename)
   Modify(false);
   UpdateAllViews();
   GetFirstView()->OnUpdate (GetFirstView(), NULL);
+  m_bBadFileOpen = false;
   
   return true;
 }
@@ -151,6 +160,9 @@ IMPLEMENT_DYNAMIC_CLASS(PhantomFileDocument, wxDocument)
 
 bool PhantomFileDocument::OnOpenDocument(const wxString& filename)
 {
+  if (! OnSaveModified())
+    return false;
+
   wxString myFilename = filename;
   if (wxFile::Exists (myFilename)) {
     m_phantom.createFromFile (myFilename);
@@ -163,12 +175,14 @@ bool PhantomFileDocument::OnOpenDocument(const wxString& filename)
   SetFilename (myFilename, true);
   if (m_phantom.fail()) {
     *theApp->getLog() << "Failure creating phantom " << myFilename << "\n";
+    m_bBadFileOpen = true;
     return false;
   }
   m_idPhantom = m_phantom.id();
   Modify(false);
   UpdateAllViews();
   GetFirstView()->OnUpdate (GetFirstView(), NULL);
+  m_bBadFileOpen = false;
   
   return true;
 }
@@ -219,8 +233,12 @@ bool PlotFileDocument::OnSaveDocument(const wxString& filename)
 
 bool PlotFileDocument::OnOpenDocument(const wxString& filename)
 {
+  if (! OnSaveModified())
+    return false;
+
   if (! m_plot.fileRead (filename.c_str())) {
     *theApp->getLog() << "Unable to read plot file " << filename << "\n";
+    m_bBadFileOpen = true;
     return false;
   }
   *theApp->getLog() << "Read plot file " << filename << "\n";
@@ -229,6 +247,7 @@ bool PlotFileDocument::OnOpenDocument(const wxString& filename)
   Modify (false);
   UpdateAllViews();
   GetFirstView()->OnUpdate (NULL, NULL);
+  m_bBadFileOpen = false;
   
   return true;
 }
@@ -273,12 +292,15 @@ bool TextFileDocument::OnOpenDocument(const wxString& filename)
 {
   TextFileView *view = getView();
   
-  if (! view->getTextCtrl()->LoadFile(filename))
+  if (! view->getTextCtrl()->LoadFile(filename)) {
+    m_bBadFileOpen = true;
     return false;
+  }
   
   SetFilename (filename, true);
   Modify (false);
   UpdateAllViews();
+  m_bBadFileOpen = false;
   return true;
 }
 
@@ -300,3 +322,10 @@ TextFileDocument::getView() const
 { 
   return dynamic_cast<TextFileView*>(GetFirstView()); 
 }
+
+wxTextCtrl* 
+TextFileDocument::getTextCtrl()
+{ 
+  return dynamic_cast<TextFileView*>(GetFirstView())->getTextCtrl(); 
+}
+
index 6db956883128ae8b115b89de9a7c9d9408e2d2ff..9d09e879ea61c163edb039e2db4f09977c2fa3ff 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: docs.h,v 1.15 2001/01/28 19:10:18 kevin Exp $
+**  $Id: docs.h,v 1.16 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
@@ -51,6 +51,7 @@ class ImageFileDocument: public wxDocument
 private:
     DECLARE_DYNAMIC_CLASS(ImageFileDocument)
     ImageFile m_imageFile;
+    bool m_bBadFileOpen;
 
 public:
     virtual bool OnSaveDocument (const wxString& filename);
@@ -58,13 +59,17 @@ public:
     virtual bool IsModified () const;
     virtual void Modify (bool mod);
     
-    ImageFileDocument () {}
+    ImageFileDocument () 
+      : m_bBadFileOpen(false)
+    {}
+
     virtual ~ImageFileDocument () {}
 
     const ImageFile& getImageFile() const { return m_imageFile; }
 
     ImageFile& getImageFile() { return m_imageFile; }
     ImageFileView* getView() const;
+    bool getBadFileOpen() const { return m_bBadFileOpen; }
 };
 
 
@@ -73,6 +78,7 @@ class ProjectionFileDocument: public wxDocument
 private:
     DECLARE_DYNAMIC_CLASS(ProjectionFileDocument)
     Projections m_projectionFile;
+    bool m_bBadFileOpen;
 
 public:
     virtual bool OnSaveDocument (const wxString& filename);
@@ -80,13 +86,17 @@ public:
     virtual bool IsModified () const;
     virtual void Modify (bool mod);
     
-    ProjectionFileDocument () {}
+    ProjectionFileDocument () 
+          : m_bBadFileOpen(false)
+    {}
+
     virtual ~ProjectionFileDocument () {}
 
     const Projections& getProjections () const { return m_projectionFile; }
     Projections& getProjections ()     { return m_projectionFile; }
 
     ProjectionFileView* getView() const;
+    bool getBadFileOpen() const { return m_bBadFileOpen; }
 };
 
 
@@ -97,10 +107,11 @@ private:
     Phantom m_phantom;
     int m_idPhantom;
     wxString m_namePhantom;
+    bool m_bBadFileOpen;
 
 public:
     PhantomFileDocument () 
-       : m_idPhantom(Phantom::PHM_INVALID)
+       : m_idPhantom(Phantom::PHM_INVALID), m_bBadFileOpen(false)
     {}
 
     virtual ~PhantomFileDocument () 
@@ -119,6 +130,7 @@ public:
     virtual bool IsModified () const;
     virtual void Modify (bool mod);
     PhantomFileView* getView() const;
+    bool getBadFileOpen() const { return m_bBadFileOpen; }
 };
 
 
@@ -128,10 +140,12 @@ private:
     DECLARE_DYNAMIC_CLASS(PlotFileDocument)
     PlotFile m_plot;
     wxString m_namePlot;
+    bool m_bBadFileOpen;
 
 public:
     PlotFileDocument () 
-       {}
+      : m_bBadFileOpen(false)
+    {}
 
     virtual ~PlotFileDocument () 
        {}
@@ -150,27 +164,31 @@ public:
     virtual bool IsModified () const;
     virtual void Modify (bool mod);
     PlotFileView* getView() const;
+    bool getBadFileOpen() const { return m_bBadFileOpen; }
 };
 
-#include "views.h"
 
 class TextFileDocument: public wxDocument
 {
  private:
   DECLARE_DYNAMIC_CLASS(TextFileDocument)
+  bool m_bBadFileOpen;
 
  public:
-  TextFileDocument(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;
 
-  wxTextCtrl* getTextCtrl()
-  { return dynamic_cast<TextFileView*>(GetFirstView())->getTextCtrl(); }
+  wxTextCtrl* getTextCtrl();
 
   TextFileView* getView() const;
+  bool getBadFileOpen() const { return m_bBadFileOpen; }
 };
 
 
index 713733b88383e3c5013972cc075e2b30acdc8f72..2e0f78ab58480ada03cb6be7484eeff75a3d4c7c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.89 2001/01/30 01:21:37 kevin Exp $
+**  $Id: views.cpp,v 1.90 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
@@ -1008,7 +1008,7 @@ ImageFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 ImageFileView::OnClose (bool deleteWindow)
 {
-  GetDocumentManager()->ActivateView (this, false, true);
+  //GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -1026,8 +1026,10 @@ ImageFileView::OnClose (bool deleteWindow)
   if (deleteWindow) {
     m_pFrame->Destroy();
     m_pFrame = NULL;
+    if (GetDocument() && GetDocument()->getBadFileOpen())
+      ::wxYield();  // wxWindows bug workaround
   }
-
+  
   return true;
 }
 
@@ -2070,7 +2072,7 @@ PhantomFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 PhantomFileView::OnClose (bool deleteWindow)
 {
-  GetDocumentManager()->ActivateView (this, false, true);
+  //GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2088,8 +2090,9 @@ PhantomFileView::OnClose (bool deleteWindow)
   if (deleteWindow) {
     m_pFrame->Destroy();
     m_pFrame = NULL;
+    if (GetDocument() && GetDocument()->getBadFileOpen())
+      ::wxYield();  // wxWindows bug workaround
   }
-//  ::wxYield();
   
   return true;
 }
@@ -2547,7 +2550,7 @@ ProjectionFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)
 bool 
 ProjectionFileView::OnClose (bool deleteWindow)
 {
-  GetDocumentManager()->ActivateView (this, false, true);
+  //GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2565,6 +2568,8 @@ ProjectionFileView::OnClose (bool deleteWindow)
   if (deleteWindow) {
     m_pFrame->Destroy();
     m_pFrame = NULL;
+    if (GetDocument() && GetDocument()->getBadFileOpen())
+      ::wxYield();  // wxWindows bug workaround
   }
 
   return true;
@@ -2875,7 +2880,7 @@ PlotFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 PlotFileView::OnClose (bool deleteWindow)
 {
-  GetDocumentManager()->ActivateView (this, false, true);
+  //GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2893,7 +2898,9 @@ PlotFileView::OnClose (bool deleteWindow)
   if (deleteWindow) {
     m_pFrame->Destroy();
     m_pFrame = NULL;
-  }
+    if (GetDocument() && GetDocument()->getBadFileOpen())
+      ::wxYield();  // wxWindows bug workaround
+ }
 
   return true;
 }
@@ -2949,7 +2956,7 @@ TextFileView::OnClose (bool deleteWindow)
   // if (m_pFrame && m_pFrame->GetTitle() == "Log")
   return false;
   
-  GetDocumentManager()->ActivateView (this, false, true);
+  //GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2959,7 +2966,8 @@ TextFileView::OnClose (bool deleteWindow)
   if (deleteWindow) {
     m_pFrame->Destroy();
     m_pFrame = NULL;
-    
+    if (GetDocument() && GetDocument()->getBadFileOpen())
+      ::wxYield();  // wxWindows bug workaround
   }
 
   return TRUE;
index 1abe90d59f900cad484bf7bd48230fa35908ec7a..ddc1d0a9b26b053ae00302d99fbcac570f95762c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.h,v 1.39 2001/01/30 01:21:37 kevin Exp $
+**  $Id: views.h,v 1.40 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
@@ -447,6 +447,9 @@ public:
     void OnUpdate (wxView *sender, wxObject *hint = (wxObject *) NULL);
     bool OnClose (bool deleteWindow = TRUE);
 
+    TextFileDocument* GetDocument() 
+    { return dynamic_cast<TextFileDocument*>(wxView::GetDocument()); }
+  
     TextFileCanvas* getTextCtrl() { return m_pCanvas; }
     wxMenu* getFileMenu() { return m_pFileMenu; }
 #if CTSIM_MDI