X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/298a3f2ee8a54964a8ba79931a9a5b1d8be200b4..d77836e48cf1a0f7575cd1ce66f59f5bc07e5b56:/contrib/include/wx/plot/plot.h diff --git a/contrib/include/wx/plot/plot.h b/contrib/include/wx/plot/plot.h index d4468d6242..b2d59d7e26 100644 --- a/contrib/include/wx/plot/plot.h +++ b/contrib/include/wx/plot/plot.h @@ -12,15 +12,12 @@ #ifndef _WX_PLOT_H_ #define _WX_PLOT_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "plot.h" -#endif - #include "wx/defs.h" -#include "wx/scrolwin.h" -#include "wx/event.h" #include "wx/dynarray.h" +#include "wx/event.h" +#include "wx/pen.h" +#include "wx/scrolwin.h" #ifdef WXMAKINGDLL_PLOT #define WXDLLIMPEXP_PLOT WXEXPORT @@ -44,6 +41,7 @@ class WXDLLIMPEXP_PLOT wxPlotArea; class WXDLLIMPEXP_PLOT wxPlotXAxisArea; class WXDLLIMPEXP_PLOT wxPlotYAxisArea; class WXDLLIMPEXP_PLOT wxPlotWindow; +class WXDLLIMPEXP_CORE wxStaticText; //----------------------------------------------------------------------------- // consts @@ -128,15 +126,15 @@ public: void SetStartY( double startY ) { m_startY = startY; } - double GetStartY() + double GetStartY() const { return m_startY; } void SetEndY( double endY ) { m_endY = endY; } - double GetEndY() + double GetEndY() const { return m_endY; } void SetOffsetY( int offsetY ) { m_offsetY = offsetY; } - int GetOffsetY() + int GetOffsetY() const { return m_offsetY; } void SetPenNormal( const wxPen &pen ) @@ -144,6 +142,11 @@ public: void SetPenSelected( const wxPen &pen ) { m_penSelected = pen; } + const wxPen& GetPenNormal() const + { return m_penNormal; } + const wxPen& GetPenSelected() const + { return m_penSelected; } + private: int m_offsetY; double m_startY; @@ -282,7 +285,11 @@ class WXDLLIMPEXP_PLOT wxPlotWindow: public wxScrolledWindow { public: wxPlotWindow() {} - wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flags = wxPLOT_DEFAULT ); + wxPlotWindow(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int flags = wxPLOT_DEFAULT); ~wxPlotWindow(); // curve accessors @@ -358,6 +365,8 @@ public: void ResetScrollbar(); + void AddChartTitle( const wxString&, wxFont = *wxNORMAL_FONT, wxColour = *wxBLACK ); + private: friend class wxPlotArea; friend class wxPlotXAxisArea; @@ -377,6 +386,14 @@ private: bool m_scrollOnThumbRelease; bool m_enlargeAroundWindowCentre; + wxString m_title; + wxFont m_titleFont; + wxColour m_titleColour; + wxStaticText* m_titleStaticText; + wxBoxSizer* m_plotAndTitleSizer; + + void DrawChartTitle(); + DECLARE_CLASS(wxPlotWindow) DECLARE_EVENT_TABLE() };