r390: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 13 Jan 2001 04:52:01 +0000 (04:52 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 13 Jan 2001 04:52:01 +0000 (04:52 +0000)
include/Makefile.am
include/dlgezplot.h [new file with mode: 0644]
libctgraphics/Makefile.am
libctgraphics/dlgezplot.cpp [new file with mode: 0644]
libctsim/Makefile.am
libctsim/procsignal.cpp
msvc/ctsim/ctsim.plg
src/Makefile.am
src/dlgezplot.cpp [deleted file]
src/dlgezplot.h [deleted file]
tools/ctsimtext.cpp

index 9bf06fe5d46e50573c0b33b3a8fb9e29064cc689..c67084855c70991109d494a38a0486d3868876b6 100644 (file)
@@ -1,4 +1,5 @@
-noinst_HEADERS=ct.h ezplot.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h fnetorderstream.h phantom.h timer.h sstream_subst scanner.h projections.h ctsupport.h filter.h array2dfile.h trace.h transformmatrix.h procsignal.h reconstruct.h plotfile.h hashtable.h fourier.h ctglobals.h
+noinst_HEADERS=ct.h ezplot.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h fnetorderstream.h phantom.h timer.h sstream_subst scanner.h projections.h ctsupport.h filter.h array2dfile.h trace.h transformmatrix.h procsignal.h reconstruct.h plotfile.h hashtable.h fourier.h ctglobals.h dlgezplot.h
+
 
 
 
diff --git a/include/dlgezplot.h b/include/dlgezplot.h
new file mode 100644 (file)
index 0000000..33aa7c3
--- /dev/null
@@ -0,0 +1,93 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          dlgezplot.h
+**   Purpose:       Headers for EZPlot Dialog
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  Jan 2001
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2001 Kevin Rosenberg
+**
+**  $Id: dlgezplot.h,v 1.1 2001/01/13 04:47: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
+**  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
+******************************************************************************/
+
+#if defined(HAVE_WXWINDOWS) && ! defined(__DLGEZPLOT_H_)
+#define __DLGEZPLOT_H_
+
+#ifdef __GNUG__
+#pragma interface "dlgezplot.h"
+#endif
+
+#include "wx/setup.h"
+#include "wx/dialog.h"
+#include "wx/dcmemory.h"
+
+class wxButton;
+class SGP;
+class SGPDriver;
+class EZPlot;
+
+
+class EZPlotControl : public wxPanel
+{
+private:  
+  DECLARE_DYNAMIC_CLASS (EZPlotControl)
+  DECLARE_EVENT_TABLE ()
+  EZPlot* m_pEZPlot;
+   int m_iClientX;   // size of client window
+   int m_iClientY;
+
+   SGPDriver* m_pSGPDriver;
+   SGP* m_pSGP;
+   wxDC* m_pDC;
+
+public:
+    EZPlotControl (wxWindow *parent, wxWindowID id = -1,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
+               long style = wxSTATIC_BORDER,
+               const wxValidator& validator = wxDefaultValidator,
+               const wxString& name = "EZPlotCtrl");
+
+   virtual ~EZPlotControl();
+
+  virtual wxSize GetBestSize() const;
+
+  EZPlot* getEZPlot() 
+  { return m_pEZPlot; }
+
+  void OnPaint(wxPaintEvent& event);
+};
+
+
+class EZPlotDialog : public wxDialog
+{
+private:
+   wxWindow *m_parentTop;     // parent top level window (may be NULL)
+   EZPlotControl* m_pEZPlotCtrl;
+
+public:
+  EZPlotDialog (wxWindow *parent = NULL);
+
+   ~EZPlotDialog();
+
+   EZPlot* getEZPlot ()
+   { if (m_pEZPlotCtrl) return m_pEZPlotCtrl->getEZPlot(); else return NULL; }
+};
+
+#endif
+
index 89468713cc0eb5dce1060e878babf364b0c8e6e3..de1e66b41b3e7ae853da5dca8d2c45f9e0c71c21 100644 (file)
@@ -1,5 +1,5 @@
 noinst_LIBRARIES = libctgraphics.a
-libctgraphics_a_SOURCES=ezplot.cpp ezset.cpp pol.cpp sgp.cpp transformmatrix.cpp
+libctgraphics_a_SOURCES=ezplot.cpp ezset.cpp pol.cpp sgp.cpp transformmatrix.cpp dlgezplot.cpp
 INCLUDES=@my_includes@
 EXTRA_DIST=Makefile.nt
 
diff --git a/libctgraphics/dlgezplot.cpp b/libctgraphics/dlgezplot.cpp
new file mode 100644 (file)
index 0000000..d59f11f
--- /dev/null
@@ -0,0 +1,150 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          dlgezplot.cpp
+**   Purpose:       EZPlot Dialog
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  Jan 2001
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2001 Kevin Rosenberg
+**
+**  $Id: dlgezplot.cpp,v 1.1 2001/01/13 04:47: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
+**  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
+******************************************************************************/
+
+#ifdef HAVE_WXWINDOWS
+
+#ifdef __GNUG__
+#pragma implementation "dlgezplot.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/utils.h"
+#include "wx/frame.h"
+#include "wx/button.h"
+#include "wx/stattext.h"
+#include "wx/layout.h"
+#include "wx/event.h"
+#include "wx/intl.h"
+#include "wx/settings.h"
+#include "wx/dcclient.h"
+#include "wx/timer.h"
+#endif
+
+#include "ct.h"
+#include "../src/ctsim.h"
+#include "dlgezplot.h"
+
+
+static const int LAYOUT_X_MARGIN = 4;
+static const int LAYOUT_Y_MARGIN = 4;
+
+BEGIN_EVENT_TABLE(EZPlotControl, wxPanel)
+EVT_PAINT(EZPlotControl::OnPaint)
+END_EVENT_TABLE()
+
+IMPLEMENT_CLASS(EZPlotControl, wxPanel)
+
+
+EZPlotControl::EZPlotControl (wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, 
+                       const wxValidator& validator, const wxString& name)
+     : m_pEZPlot(0), m_pSGPDriver(0), m_pSGP(0), m_pDC(0)
+{
+  Create(parent, id, pos, size, style, name);
+
+  SetSize (GetBestSize());
+
+  m_pEZPlot = new EZPlot;
+}
+
+wxSize
+EZPlotControl::GetBestSize () const
+{
+  return wxSize (500,500);
+}
+
+EZPlotControl::~EZPlotControl()
+{    
+  delete m_pEZPlot;
+  delete m_pSGP;
+  delete m_pSGPDriver;
+  delete m_pDC;
+}
+
+void
+EZPlotControl::OnPaint (wxPaintEvent& event)
+{
+  wxPaintDC dc(this);
+  GetClientSize (&m_iClientX, &m_iClientY);
+  m_pSGPDriver = new SGPDriver (&dc, m_iClientX, m_iClientY);
+  m_pSGP = new SGP (*m_pSGPDriver);
+  m_pSGP->setTextPointSize(10);
+  if (m_pEZPlot && m_pSGP) {
+    m_pSGP->eraseWindow();
+    m_pEZPlot->plot (m_pSGP);
+  }
+}
+
+
+EZPlotDialog::EZPlotDialog (wxWindow *parent)
+: wxDialog((parent ? parent : theApp->getMainFrame()), -1, wxString("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
+  m_parentTop(0)
+{
+  if (! parent)
+    parent = theApp->getMainFrame();
+
+  m_parentTop = parent;
+  while ( m_parentTop && m_parentTop->GetParent() )
+    m_parentTop = m_parentTop->GetParent();
+    
+  wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+  pTopSizer->Add (m_pEZPlotCtrl = new EZPlotControl (this), 0, wxALIGN_CENTER | wxALL, 5);
+  
+  wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
+  pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+  pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+  
+  pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+  
+  SetAutoLayout (true);
+  SetSizer (pTopSizer);
+  pTopSizer->Fit (this);
+  pTopSizer->SetSizeHints (this);
+}
+
+
+
+/////////////////////////////////////////////////////
+// destruction
+
+EZPlotDialog::~EZPlotDialog()
+{
+  if ( m_parentTop )
+    m_parentTop->Enable(TRUE);
+}
+
+
+#endif // HAVE_WXWINDOWS
index 1ff192f2708e20bb1b397f2844de7bdff36aae13..89718512aaae72b044628b213b6088e3371a1244 100644 (file)
@@ -1,5 +1,5 @@
 noinst_LIBRARIES = libctsim.a 
-libctsim_a_SOURCES = filter.cpp scanner.cpp projections.cpp phantom.cpp imagefile.cpp backprojectors.cpp array2dfile.cpp trace.cpp procsignal.cpp reconstruct.cpp fourier.cpp globalvars.cpp
+libctsim_a_SOURCES = filter.cpp scanner.cpp projections.cpp phantom.cpp imagefile.cpp backprojectors.cpp array2dfile.cpp trace.cpp procsignal.cpp reconstruct.cpp fourier.cpp globalvars.cpp 
 
 INCLUDES=@my_includes@
 EXTRA_DIST=Makefile.nt
index 3077793ebba8615b775b69c2e6baf08b81fe7fd7..456e01aefd48686dfb224b931542c42996ad93c3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: procsignal.cpp,v 1.22 2001/01/13 03:51:35 kevin Exp $
+**  $Id: procsignal.cpp,v 1.23 2001/01/13 04:52:01 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
@@ -28,7 +28,7 @@
 #include "ct.h"
 
 #ifdef HAVE_WXWINDOWS
-#include "../src/dlgezplot.h"
+#include "dlgezplot.h"
 #endif
 
 // FilterMethod ID/Names
index aba249f916dc35ce680d062e8581b8a142aaf0b5..028cfc1e1f487de41ee06872a85990edb26cd949 100644 (file)
@@ -6,27 +6,13 @@
 --------------------Configuration: libctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP200.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP213.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /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__" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"C:\ctsim\libctsim\backprojectors.cpp"
-"C:\ctsim\libctsim\filter.cpp"
-"C:\ctsim\libctsim\fourier.cpp"
-"C:\ctsim\libctsupport\hashtable.cpp"
-"C:\ctsim\libctsim\imagefile.cpp"
-"C:\ctsim\libctsim\phantom.cpp"
-"C:\ctsim\libctsupport\plotfile.cpp"
-"C:\ctsim\libctgraphics\pol.cpp"
-"C:\ctsim\libctsim\procsignal.cpp"
-"C:\ctsim\libctsim\projections.cpp"
-"C:\ctsim\libctsim\reconstruct.cpp"
-"C:\ctsim\libctsim\scanner.cpp"
-"C:\ctsim\libctsupport\syserror.cpp"
-"C:\ctsim\libctsim\trace.cpp"
 "C:\ctsim\libctsim\globalvars.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP200.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP201.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP213.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP214.tmp" with contents
 [
 /nologo /out:"Debug\libctsim.lib" 
 .\Debug\array2dfile.obj
@@ -59,42 +45,22 @@ Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP201.tmp" with conten
 .\Debug\xform.obj
 .\Debug\globalvars.obj
 ]
-Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP201.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP214.tmp"
 <h3>Output Window</h3>
 Compiling...
-procsignal.cpp
-backprojectors.cpp
-filter.cpp
-fourier.cpp
-hashtable.cpp
-imagefile.cpp
-phantom.cpp
-plotfile.cpp
-pol.cpp
-projections.cpp
-reconstruct.cpp
-scanner.cpp
-syserror.cpp
-trace.cpp
 globalvars.cpp
 Creating library...
 <h3>
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP202.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP215.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.0beta1\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\src\ctsim.cpp"
-"C:\ctsim\src\dialogs.cpp"
-"C:\ctsim\src\dlgprojections.cpp"
-"C:\ctsim\src\dlgreconstruct.cpp"
-"C:\ctsim\src\docs.cpp"
-"C:\ctsim\src\views.cpp"
-"C:\ctsim\src\dlgezplot.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP202.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP203.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP215.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP216.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 /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" 
 .\Debug\ctsim.obj
@@ -110,25 +76,16 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 "\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib"
 \wx2\lib\wxd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP203.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP216.tmp"
 <h3>Output Window</h3>
 Compiling...
 ctsim.cpp
-c:\wx2\include\wx\buffer.h(33) : error C2065: 'strdup' : undeclared identifier
-c:\wx2\include\wx\buffer.h(33) : error C2446: ':' : no conversion from 'char *' to 'int'
-        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
-dialogs.cpp
-dlgprojections.cpp
-dlgreconstruct.cpp
-docs.cpp
-views.cpp
-dlgezplot.cpp
-Error executing cl.exe.
+Linking...
 
 
 
 <h3>Results</h3>
-ctsim.exe - 2 error(s), 0 warning(s)
+ctsim.exe - 0 error(s), 0 warning(s)
 </pre>
 </body>
 </html>
index f6cc4851b57cee792154e62abe80429f04181b89..c9bd27f075876ea7ae75a70e90930c0e07f33e0e 100644 (file)
@@ -1,6 +1,6 @@
 bin_PROGRAMS=ctsim
 
-ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h dlgreconstruct.cpp dlgreconstruct.h dlgezplot.cpp
+ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h dlgreconstruct.cpp dlgreconstruct.h 
 ctsim_DEPENDENCIES=../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h
 ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@
 
diff --git a/src/dlgezplot.cpp b/src/dlgezplot.cpp
deleted file mode 100644 (file)
index bdb8cb7..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*****************************************************************************
-** FILE IDENTIFICATION
-**
-**   Name:          dlgezplot.cpp
-**   Purpose:       EZPlot Dialog
-**   Programmer:    Kevin Rosenberg
-**   Date Started:  Jan 2001
-**
-**  This is part of the CTSim program
-**  Copyright (C) 1983-2001 Kevin Rosenberg
-**
-**  $Id: dlgezplot.cpp,v 1.2 2001/01/12 21:53:27 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
-******************************************************************************/
-
-#ifdef __GNUG__
-#pragma implementation "dlgezplot.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/utils.h"
-#include "wx/frame.h"
-#include "wx/button.h"
-#include "wx/stattext.h"
-#include "wx/layout.h"
-#include "wx/event.h"
-#include "wx/intl.h"
-#include "wx/settings.h"
-#include "wx/dcclient.h"
-#include "wx/timer.h"
-#endif
-
-#include "ct.h"
-#include "ctsim.h"
-#include "dlgezplot.h"
-
-
-static const int LAYOUT_X_MARGIN = 4;
-static const int LAYOUT_Y_MARGIN = 4;
-
-BEGIN_EVENT_TABLE(EZPlotControl, wxPanel)
-EVT_PAINT(EZPlotControl::OnPaint)
-END_EVENT_TABLE()
-
-IMPLEMENT_CLASS(EZPlotControl, wxPanel)
-
-
-EZPlotControl::EZPlotControl (wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, 
-                       const wxValidator& validator, const wxString& name)
-     : m_pEZPlot(0), m_pSGPDriver(0), m_pSGP(0), m_pDC(0)
-{
-  Create(parent, id, pos, size, style, name);
-
-  SetSize (GetBestSize());
-
-  m_pEZPlot = new EZPlot;
-}
-
-wxSize
-EZPlotControl::GetBestSize () const
-{
-  return wxSize (500,500);
-}
-
-EZPlotControl::~EZPlotControl()
-{    
-  delete m_pEZPlot;
-  delete m_pSGP;
-  delete m_pSGPDriver;
-  delete m_pDC;
-}
-
-void
-EZPlotControl::OnPaint (wxPaintEvent& event)
-{
-  wxPaintDC dc(this);
-  GetClientSize (&m_iClientX, &m_iClientY);
-  m_pSGPDriver = new SGPDriver (&dc, m_iClientX, m_iClientY);
-  m_pSGP = new SGP (*m_pSGPDriver);
-  m_pSGP->setTextPointSize(10);
-  if (m_pEZPlot && m_pSGP) {
-    m_pSGP->eraseWindow();
-    m_pEZPlot->plot (m_pSGP);
-  }
-}
-
-
-EZPlotDialog::EZPlotDialog (wxWindow *parent)
-: wxDialog((parent ? parent : theApp->getMainFrame()), -1, wxString("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
-  m_parentTop(0)
-{
-  if (! parent)
-    parent = theApp->getMainFrame();
-
-  m_parentTop = parent;
-  while ( m_parentTop && m_parentTop->GetParent() )
-    m_parentTop = m_parentTop->GetParent();
-    
-  wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
-  pTopSizer->Add (m_pEZPlotCtrl = new EZPlotControl (this), 0, wxALIGN_CENTER | wxALL, 5);
-  
-  wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
-  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-  pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
-  pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-  
-  pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-  
-  SetAutoLayout (true);
-  SetSizer (pTopSizer);
-  pTopSizer->Fit (this);
-  pTopSizer->SetSizeHints (this);
-}
-
-
-
-/////////////////////////////////////////////////////
-// destruction
-
-EZPlotDialog::~EZPlotDialog()
-{
-  if ( m_parentTop )
-    m_parentTop->Enable(TRUE);
-}
-
diff --git a/src/dlgezplot.h b/src/dlgezplot.h
deleted file mode 100644 (file)
index 0ab8806..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
-** FILE IDENTIFICATION
-**
-**   Name:          dlgezplot.h
-**   Purpose:       Headers for EZPlot Dialog
-**   Programmer:    Kevin Rosenberg
-**   Date Started:  Jan 2001
-**
-**  This is part of the CTSim program
-**  Copyright (C) 1983-2001 Kevin Rosenberg
-**
-**  $Id: dlgezplot.h,v 1.2 2001/01/12 21:53:27 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 __DLGEZPLOT_H_
-#define __DLGEZPLOT_H_
-
-#ifdef __GNUG__
-#pragma interface "dlgezplot.h"
-#endif
-
-#include "wx/setup.h"
-#include "wx/dialog.h"
-#include "wx/dcmemory.h"
-
-class wxButton;
-class SGP;
-class SGPDriver;
-class EZPlot;
-
-
-class EZPlotControl : public wxPanel
-{
-private:  
-  DECLARE_DYNAMIC_CLASS (EZPlotControl)
-  DECLARE_EVENT_TABLE ()
-  EZPlot* m_pEZPlot;
-   int m_iClientX;   // size of client window
-   int m_iClientY;
-
-   SGPDriver* m_pSGPDriver;
-   SGP* m_pSGP;
-   wxDC* m_pDC;
-
-public:
-    EZPlotControl (wxWindow *parent, wxWindowID id = -1,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = wxSTATIC_BORDER,
-               const wxValidator& validator = wxDefaultValidator,
-               const wxString& name = "EZPlotCtrl");
-
-   virtual ~EZPlotControl();
-
-  virtual wxSize GetBestSize() const;
-
-  EZPlot* getEZPlot() 
-  { return m_pEZPlot; }
-
-  void OnPaint(wxPaintEvent& event);
-};
-
-
-class EZPlotDialog : public wxDialog
-{
-private:
-   wxWindow *m_parentTop;     // parent top level window (may be NULL)
-   EZPlotControl* m_pEZPlotCtrl;
-
-public:
-  EZPlotDialog (wxWindow *parent = NULL);
-
-   ~EZPlotDialog();
-
-   EZPlot* getEZPlot ()
-   { if (m_pEZPlotCtrl) return m_pEZPlotCtrl->getEZPlot(); else return NULL; }
-};
-#endif
-
index 44a374615ad020e828659afa4313483e092d123f..994fea0aa422f69f1689bafa3d3c8480019bd327 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsimtext.cpp,v 1.10 2001/01/13 04:14:03 kevin Exp $
+**  $Id: ctsimtext.cpp,v 1.11 2001/01/13 04:44:47 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
@@ -45,7 +45,7 @@ extern "C" {
 // If linked to ctsimtext, but executed as another name, eg pjrec, then program will use that
 // linked name as name of function.
 
-static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.10 2001/01/13 04:14:03 kevin Exp $";
+static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.11 2001/01/13 04:44:47 kevin Exp $";
 static const char* const s_szProgramName = "ctsimtext";
 static const char* const s_szProgramName2 = "ctsimtext.exe";
 
@@ -107,6 +107,10 @@ ctsimtext_main (int argc, char * argv[])
   if (argc > 1 && (strcmp(argv[0], fileBasename (s_szProgramName)) == 0 || strcmp(argv[0], fileBasename (s_szProgramName2)) == 0)) {
     argv = &argv[1];
     argc--;
+    if (argc > 1 && (strcmp(argv[0], fileBasename (s_szProgramName)) == 0 || strcmp(argv[0], fileBasename (s_szProgramName2)) == 0)) {
+      argv = &argv[2];
+      argc--;
+    }
     iReturn = processCommand (argc, argv);
   } else if (argc > 1){
     iReturn = processCommand (argc, argv);
@@ -275,19 +279,15 @@ main (int argc, char* argv[])
 
 
 // Hack to fix linking problems when not linking with wxWindows and CTSim GUI routines
-
-#ifdef HAVE_WXWINDOWS
-#include "../src/dlgezplot.h"
-
 #ifdef MSVC
 unsigned long
 wxDialog::OnCtlColor(unsigned long a,unsigned long b,unsigned int c,unsigned int d,unsigned int e,long f)
 {return 0;}
-
-#else // not MSVC
-
 #endif
 
+#if 0
+#include "../src/dlgezplot.h"
+
 EZPlotDialog::EZPlotDialog (wxWindow* parent)
   : wxDialog(), m_pEZPlotCtrl(NULL)
 {}