Applied initial patches for wx2.8 compatibility
[ctsim.git] / src / dlgezplot.h
index efba49a38ab1a2b7a4b5e17433a5a4cda709e74d..d47df3933257f301cdd90bdba3020174eb32263b 100644 (file)
@@ -7,9 +7,9 @@
 **   Date Started:  Jan 2001
 **
 **  This is part of the CTSim program
-**  Copyright (C) 1983-2001 Kevin Rosenberg
+**  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dlgezplot.h,v 1.1 2001/01/12 16:41:56 kevin Exp $
+**  $Id$
 **
 **  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
 #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 wxStaticText;
-class Projections;
 class SGP;
 class SGPDriver;
 class EZPlot;
 
-class EZPlotDialog : public wxDialog
+
+class EZPlotControl : public wxPanel
 {
 private:
-  DECLARE_DYNAMIC_CLASS(EZPlotDialog)
-  DECLARE_EVENT_TABLE()
-
-   EZPlot* m_pEZPlot;
-   wxWindow *m_parentTop;     // parent top level window (may be NULL)
+  DECLARE_DYNAMIC_CLASS (EZPlotControl)
+  DECLARE_EVENT_TABLE ()
+  EZPlot* m_pEZPlot;
    int m_iClientX;   // size of client window
    int m_iClientY;
 
@@ -59,18 +52,49 @@ private:
    wxDC* m_pDC;
 
 public:
-  EZPlotDialog (wxWindow *parent = NULL);
+    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 = _T("EZPlotCtrl"));
 
-   ~EZPlotDialog();
+   virtual ~EZPlotControl();
 
-   /* Perform projection on view number
-       return true if ABORT button has not been pressed
-   */
-   EZPlot* getEZPlot ()
-   { return m_pEZPlot; }
+  virtual wxSize GetBestSize() const;
+
+  EZPlot* getEZPlot()
+  { return m_pEZPlot; }
 
-  void OnClose(wxCloseEvent& event);
   void OnPaint(wxPaintEvent& event);
 };
+
+
+class wxEZPlotDialog : public wxDialog
+{
+private:
+   wxWindow *m_parentTop;     // parent top level window (may be NULL)
+   EZPlotControl* m_pEZPlotCtrl;
+
+public:
+  wxEZPlotDialog (wxWindow *parent = NULL, bool bCancelButton = false);
+
+   ~wxEZPlotDialog();
+
+   EZPlot* getEZPlot ()
+   { if (m_pEZPlotCtrl) return m_pEZPlotCtrl->getEZPlot(); else return NULL; }
+};
+
+class EZPlotDialog
+{
+private:
+  wxEZPlotDialog* m_pDialog;
+
+public:
+  EZPlotDialog (wxWindow *parent = NULL, bool bCancelButton = false);
+
+  EZPlot* getEZPlot ();
+  int ShowModal();
+};
 #endif