Revert "Update package dependency from libwxgtk3.0-dev to libwxgtk3.0-gtk3-dev for...
[ctsim.git] / src / dlgezplot.h
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:          dlgezplot.h
5 **   Purpose:       Headers for EZPlot Dialog
6 **   Programmer:    Kevin Rosenberg
7 **   Date Started:  Jan 2001
8 **
9 **  This is part of the CTSim program
10 **  Copyright (c) 1983-2009 Kevin Rosenberg
11 **
12 **  This program is free software; you can redistribute it and/or modify
13 **  it under the terms of the GNU General Public License (version 2) as
14 **  published by the Free Software Foundation.
15 **
16 **  This program is distributed in the hope that it will be useful,
17 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 **  GNU General Public License for more details.
20 **
21 **  You should have received a copy of the GNU General Public License
22 **  along with this program; if not, write to the Free Software
23 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 ******************************************************************************/
25
26 #ifndef __DLGEZPLOT_H_
27 #define __DLGEZPLOT_H_
28
29 #include "wx/setup.h"
30 #include "wx/dialog.h"
31 #include "wx/dcmemory.h"
32
33 class wxButton;
34 class SGP;
35 class SGPDriver;
36 class EZPlot;
37
38
39 class EZPlotControl : public wxPanel
40 {
41 private:
42   DECLARE_DYNAMIC_CLASS (EZPlotControl)
43   DECLARE_EVENT_TABLE ()
44   EZPlot* m_pEZPlot;
45    int m_iClientX;   // size of client window
46    int m_iClientY;
47
48    SGPDriver* m_pSGPDriver;
49    SGP* m_pSGP;
50    wxDC* m_pDC;
51
52 public:
53     EZPlotControl (wxWindow *parent, wxWindowID id = -1,
54                const wxPoint& pos = wxDefaultPosition,
55                const wxSize& size = wxDefaultSize,
56                long style = wxSTATIC_BORDER,
57                const wxValidator& validator = wxDefaultValidator,
58                    const wxString& name = _T("EZPlotCtrl"));
59
60    virtual ~EZPlotControl();
61
62   virtual wxSize GetBestSize() const;
63
64   EZPlot* getEZPlot()
65   { return m_pEZPlot; }
66
67   void OnPaint(wxPaintEvent& event);
68 };
69
70
71 class wxEZPlotDialog : public wxDialog
72 {
73 private:
74    wxWindow *m_parentTop;     // parent top level window (may be NULL)
75    EZPlotControl* m_pEZPlotCtrl;
76
77 public:
78   wxEZPlotDialog (wxWindow *parent = NULL, bool bCancelButton = false);
79
80    ~wxEZPlotDialog();
81
82    EZPlot* getEZPlot ()
83    { if (m_pEZPlotCtrl) return m_pEZPlotCtrl->getEZPlot(); else return NULL; }
84 };
85
86 class EZPlotDialog
87 {
88 private:
89   wxEZPlotDialog* m_pDialog;
90
91 public:
92   EZPlotDialog (wxWindow *parent = NULL, bool bCancelButton = false);
93
94   EZPlot* getEZPlot ();
95   int ShowModal();
96 };
97 #endif
98