r439: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 26 Jan 2001 09:54:31 +0000 (09:54 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 26 Jan 2001 09:54:31 +0000 (09:54 +0000)
msvc/ctsim/ctsim.plg
src/ctsim.cpp
src/views.cpp

index 650a691ea3bf0d1e6864bd3eec4ae81062982ec4..bff53a17023bd031611a880be28efcefc68a470e 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\RSP118.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP160.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /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.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\src\ctsim.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP118.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP119.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP160.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP161.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 ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.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:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib" 
 .\Debug\ctsim.obj
@@ -28,7 +28,7 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \wx2\lib\wxd.lib
 \wx2\lib\xpmd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP119.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP161.tmp"
 <h3>Output Window</h3>
 Compiling...
 ctsim.cpp
index a5a889aad72aeef87a22a338a8844e3babbe26ac..dd41076c0519642b6a5702d03fdabfc48cd1c252 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.42 2001/01/26 05:37:24 kevin Exp $
+**  $Id: ctsim.cpp,v 1.43 2001/01/26 09:54:31 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.42 2001/01/26 05:37:24 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.43 2001/01/26 09:54:31 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -148,7 +148,9 @@ CTSimApp::OnInit()
 #endif
   
   // Create the main frame window
-  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, "CTSim", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
+  int xDisplay, yDisplay;
+  ::wxDisplaySize (&xDisplay, &yDisplay);
+  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, "CTSim", wxPoint(0, 0), wxSize(xDisplay * .75, yDisplay * .755), wxDEFAULT_FRAME_STYLE);
   
   setIconForFrame (m_pFrame);
   m_pFrame->Centre(wxBOTH);
@@ -178,9 +180,9 @@ CTSimApp::OnInit()
     pLogDoc->SetFilename("Log.txt");
     pLogDoc->getView()->getFrame()->SetTitle("Log");
     int xSize, ySize;
-    m_pFrame->GetSize(&xSize, &ySize);
-    int yLogSize = ySize / 4;
-    pLogDoc->getView()->getFrame()->SetSize (0, 0, xSize, yLogSize);
+    m_pFrame->GetClientSize(&xSize, &ySize);
+    int yLogSize = ySize / 3;
+    pLogDoc->getView()->getFrame()->SetSize (0, ySize - yLogSize, xSize, yLogSize);
   } else
 #else
     m_pLog = new wxTextCtrl (m_pFrame, -1, "Log Window\n", wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY);
@@ -404,7 +406,7 @@ MainFrame::OnCreatePhantom(wxCommandEvent& event)
     *theApp->getLog() << "Selected phantom " << selection.c_str() << "\n";
     wxString filename = selection + ".phm";
     m_iDefaultPhantomID = Phantom::convertNameToPhantomID (selection.c_str());
-    theApp->getDocManager()->CreateDocument(filename, wxDOC_SILENT);
+    theApp->getDocManager()->CreateDocument (filename, wxDOC_SILENT);
   }
   
 }
@@ -771,11 +773,8 @@ CTSimApp::newProjectionDoc()
       if (pFrame)
         pFrame->SetSize(0,0);
     }
-    newDoc->SetDocumentName(strFilename);
-    newDoc->SetFilename(strFilename);
-    newDoc->SetDocumentTemplate(m_pDocTemplProjection);
-    newDoc->SetTitle(strFilename);
     newDoc->OnNewDocument();
+//    newDoc->SetFilename(strFilename, true);
   }
 
   return newDoc;
@@ -795,11 +794,8 @@ CTSimApp::newImageDoc()
       if (pFrame)
         pFrame->SetSize(0,0);
     }
-    newDoc->SetDocumentName(strFilename);
-    newDoc->SetFilename(strFilename);
-    newDoc->SetDocumentTemplate(m_pDocTemplImage);
-    newDoc->SetTitle(strFilename);
     newDoc->OnNewDocument();
+//    newDoc->SetFilename(strFilename, true);
   }
 
   return newDoc;
@@ -819,11 +815,8 @@ CTSimApp::newPlotDoc()
       if (pFrame)
         pFrame->SetSize(0,0);
     }
-    newDoc->SetDocumentName(strFilename);
-    newDoc->SetFilename(strFilename);
-    newDoc->SetDocumentTemplate(m_pDocTemplPlot);
-    newDoc->SetTitle(strFilename);
     newDoc->OnNewDocument();
+//    newDoc->SetFilename(strFilename, true);
   }
 
   return newDoc;
@@ -844,11 +837,8 @@ CTSimApp::newTextDoc()
       if (pFrame)
         pFrame->SetSize(0,0);
     }
-    newDoc->SetDocumentName(strFilename);
-    newDoc->SetFilename(strFilename);
-    newDoc->SetDocumentTemplate(m_pDocTemplText);
-    newDoc->SetTitle(strFilename);
     newDoc->OnNewDocument();
+//    newDoc->SetFilename(strFilename, true);
   }
 
   return newDoc;
@@ -869,11 +859,8 @@ CTSimApp::newPhantomDoc()
       if (pFrame)
         pFrame->SetSize(0,0);
     }
-    newDoc->SetDocumentName(strFilename);
-    newDoc->SetFilename(strFilename);
-    newDoc->SetDocumentTemplate(m_pDocTemplPhantom);
-    newDoc->SetTitle(strFilename);
     newDoc->OnNewDocument();
+//    newDoc->SetFilename(strFilename, true);
   }
 
   return newDoc;
index 62a15395e2cba28502e528d6399d5cf111d821da..9d0314ac8b66e143b5fe169bd7f064a636aaedab 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.71 2001/01/26 05:37:24 kevin Exp $
+**  $Id: views.cpp,v 1.72 2001/01/26 09:54:31 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
@@ -996,9 +996,11 @@ ImageFileView::OnClose (bool deleteWindow)
   if (!GetDocument()->Close())
     return false;
   
-//  m_canvas->Clear();
-//  m_canvas->setView(NULL);
-  m_canvas = NULL;
+  if (m_canvas) {
+  //  m_canvas->Clear();
+    m_canvas->setView(NULL);
+    m_canvas = NULL;
+  }
   wxString s(theApp->GetAppName());
 //  if (m_frame)
 //    m_frame->SetTitle(s);
@@ -2023,9 +2025,11 @@ PhantomFileView::OnClose (bool deleteWindow)
   if (!GetDocument()->Close())
     return false;
   
-//  m_canvas->Clear();
-//  m_canvas->setView(NULL);
-  m_canvas = NULL;
+  if (m_canvas) {
+    m_canvas->Clear();
+    m_canvas->setView(NULL);
+    m_canvas = NULL;
+  }
   wxString s(wxTheApp->GetAppName());
   if (m_frame)
     m_frame->SetTitle(s);
@@ -2484,9 +2488,11 @@ ProjectionFileView::OnClose (bool deleteWindow)
   if (!GetDocument()->Close())
     return false;
   
-  //m_canvas->Clear();
-  //m_canvas->setView(NULL);
-  m_canvas = NULL;
+  if (m_canvas) {
+    //m_canvas->Clear();
+    m_canvas->setView(NULL);
+    m_canvas = NULL;
+  }
 //  wxString s(wxTheApp->GetAppName());
 //  if (m_frame)
 //    m_frame->SetTitle(s);
@@ -2810,9 +2816,11 @@ PlotFileView::OnClose (bool deleteWindow)
   if (!GetDocument()->Close())
     return false;
   
-  //m_canvas->Clear();
-  //m_canvas->setView (NULL);
-  m_canvas = NULL;
+  if (m_canvas) {
+    //m_canvas->Clear();
+    m_canvas->setView (NULL);
+    m_canvas = NULL;
+  }
 //  wxString s(wxTheApp->GetAppName());
 //  if (m_frame)
 //    m_frame->SetTitle(s);