]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/plot.h
da2436de3ee1159f088b033c017821469538cef8
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPlotWindow
4 // Author: Robert Roebling
7 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "plot.h"
19 #include "wx/scrolwin.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 class WXDLLEXPORT wxPlotCurve
: public wxObject
36 wxPlotCurve( int offsetY
, double startY
, double endY
);
38 virtual wxInt32
GetStartX() = 0;
39 virtual wxInt32
GetEndX() = 0;
41 virtual double GetY( wxInt32 x
) = 0;
43 void SetStartY( double startY
)
44 { m_startY
= startY
; }
47 void SetEndY( double endY
)
51 void SetOffsetY( int offsetY
)
52 { m_offsetY
= offsetY
; }
61 DECLARE_ABSTRACT_CLASS(wxPlotCurve
)
64 //-----------------------------------------------------------------------------
66 //-----------------------------------------------------------------------------
68 class WXDLLEXPORT wxPlotArea
: public wxWindow
72 wxPlotArea( wxPlotWindow
*parent
);
74 void OnPaint( wxPaintEvent
&event
);
75 void OnMouse( wxMouseEvent
&event
);
78 wxPlotWindow
*m_owner
;
80 DECLARE_CLASS(wxPlotArea
)
84 //-----------------------------------------------------------------------------
86 //-----------------------------------------------------------------------------
88 class WXDLLEXPORT wxPlotWindow
: public wxScrolledWindow
92 wxPlotWindow( wxWindow
*parent
, wxWindowID id
, const wxPoint
&pos
, const wxSize
&size
, int flags
);
95 void Add( wxPlotCurve
*curve
);
97 wxPlotCurve
*GetAt( size_t n
);
99 void SetCurrent( wxPlotCurve
* current
);
100 wxPlotCurve
*GetCurrent();
102 void OnPaint( wxPaintEvent
&event
);
109 wxPlotCurve
*m_current
;
111 DECLARE_CLASS(wxPlotWindow
)
112 DECLARE_EVENT_TABLE()