r390: no message
[ctsim.git] / include / 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-2001 Kevin Rosenberg
11 **
12 **  $Id: dlgezplot.h,v 1.1 2001/01/13 04:47:50 kevin Exp $
13 **
14 **  This program is free software; you can redistribute it and/or modify
15 **  it under the terms of the GNU General Public License (version 2) as
16 **  published by the Free Software Foundation.
17 **
18 **  This program is distributed in the hope that it will be useful,
19 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 **  GNU General Public License for more details.
22 **
23 **  You should have received a copy of the GNU General Public License
24 **  along with this program; if not, write to the Free Software
25 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 ******************************************************************************/
27
28 #if defined(HAVE_WXWINDOWS) && ! defined(__DLGEZPLOT_H_)
29 #define __DLGEZPLOT_H_
30
31 #ifdef __GNUG__
32 #pragma interface "dlgezplot.h"
33 #endif
34
35 #include "wx/setup.h"
36 #include "wx/dialog.h"
37 #include "wx/dcmemory.h"
38
39 class wxButton;
40 class SGP;
41 class SGPDriver;
42 class EZPlot;
43
44
45 class EZPlotControl : public wxPanel
46 {
47 private:  
48   DECLARE_DYNAMIC_CLASS (EZPlotControl)
49   DECLARE_EVENT_TABLE ()
50   EZPlot* m_pEZPlot;
51    int m_iClientX;   // size of client window
52    int m_iClientY;
53
54    SGPDriver* m_pSGPDriver;
55    SGP* m_pSGP;
56    wxDC* m_pDC;
57
58 public:
59     EZPlotControl (wxWindow *parent, wxWindowID id = -1,
60                const wxPoint& pos = wxDefaultPosition,
61                const wxSize& size = wxDefaultSize,
62                long style = wxSTATIC_BORDER,
63                const wxValidator& validator = wxDefaultValidator,
64                const wxString& name = "EZPlotCtrl");
65
66    virtual ~EZPlotControl();
67
68   virtual wxSize GetBestSize() const;
69
70   EZPlot* getEZPlot() 
71   { return m_pEZPlot; }
72
73   void OnPaint(wxPaintEvent& event);
74 };
75
76
77 class EZPlotDialog : public wxDialog
78 {
79 private:
80    wxWindow *m_parentTop;     // parent top level window (may be NULL)
81    EZPlotControl* m_pEZPlotCtrl;
82
83 public:
84   EZPlotDialog (wxWindow *parent = NULL);
85
86    ~EZPlotDialog();
87
88    EZPlot* getEZPlot ()
89    { if (m_pEZPlotCtrl) return m_pEZPlotCtrl->getEZPlot(); else return NULL; }
90 };
91
92 #endif
93