Adds a title to the chart, patch 1242262 Matthew D.P.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,6 +44,7 @@ class WXDLLIMPEXP_PLOT wxPlotArea;
|
||||
class WXDLLIMPEXP_PLOT wxPlotXAxisArea;
|
||||
class WXDLLIMPEXP_PLOT wxPlotYAxisArea;
|
||||
class WXDLLIMPEXP_PLOT wxPlotWindow;
|
||||
class WXDLLIMPEXP_CORE wxStaticText;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// consts
|
||||
@@ -128,15 +129,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 +145,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;
|
||||
@@ -358,6 +364,8 @@ public:
|
||||
|
||||
void ResetScrollbar();
|
||||
|
||||
void AddChartTitle( const wxString&, wxFont = *wxNORMAL_FONT, wxColour = *wxBLACK );
|
||||
|
||||
private:
|
||||
friend class wxPlotArea;
|
||||
friend class wxPlotXAxisArea;
|
||||
@@ -377,6 +385,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()
|
||||
};
|
||||
|
Reference in New Issue
Block a user