13 #include <wx/axis/axis.h> 23 virtual wxColor GetColour(
int step) = 0;
62 if (m_titleLocation != location)
63 m_titleLocation = location;
72 return m_titleLocation;
99 if (m_titleColour != colour) {
100 m_titleColour = colour;
110 return m_titleColour;
119 m_labelPen = labelPen;
128 m_labelTextColour = labelTextColour;
137 return m_labelTextColour;
146 m_labelTextFont = labelTextFont;
155 return m_labelTextFont;
164 if (m_verticalLabelText != verticalLabelText)
165 m_verticalLabelText = verticalLabelText;
174 return m_verticalLabelText;
182 void SetMajorLabelSteps(
size_t step)
184 if (m_majorLabelStep != step)
185 m_majorLabelStep = step;
194 m_minorIntervalCount = count;
203 return m_minorIntervalCount;
206 void SetLabelSkip(
int blankLabels);
212 wxREPLACE(m_labelColourer, labelColourer);
217 return m_labelColourer;
224 void SetAxisVisible(
bool bVisible);
229 virtual void Draw(wxDC &dc, wxRect rc);
245 virtual double GetValue(
size_t step) = 0;
252 virtual void GetLabel(
size_t step, wxString &label) = 0;
259 virtual bool IsEnd(
size_t step) = 0;
261 virtual wxSize GetLongestLabelExtent(wxDC &dc) = 0;
263 virtual bool HasLabels();
266 void DrawLabels(wxDC &dc, wxRect rc);
268 void DrawLabel(wxDC &dc, wxRect rc,
const wxString &label,
double value,
bool isMajorLabel);
270 void DrawBorderLine(wxDC &dc, wxRect rc);
272 void DrawGridLine(wxDC& dc,
const wxRect& rc,
double value);
274 wxCoord m_labelLineSize;
278 wxFont m_labelTextFont;
279 wxColour m_labelTextColour;
281 bool m_verticalLabelText;
282 size_t m_majorLabelStep;
283 size_t m_minorIntervalCount;
288 wxColour m_titleColour;
void SetLabelTextColour(wxColour labelTextColour)
Sets colour for labels.
void SetTitleColour(wxColour &colour)
Sets axis title colour.
void SetTitle(const wxString &title)
Sets axis title.
void SetTitleFont(wxFont &font)
Sets axis title font.
const wxFont & GetLabelTextFont()
Returns label font.
void SetVerticalLabelText(bool verticalLabelText)
Sets whether to draw labels text vertical.
wxColour GetTitleColour()
Returns axis title colour.
bool GetVerticalLabelText()
Returns whether to draw labels text vertical.
void SetLabelTextFont(wxFont labelTextFont)
Sets font for labels text.
wxDEPRECATED_MSG("Use SetMinorIntervalCount instead.") void SetMajorLabelSteps(size_t step)
Sets major label steps.
const wxString & GetTitle()
Returns axis title.
void SetLabelPen(wxPen labelPen)
Sets pen for label lines.
wxColour GetLabelTextColour()
Returns label colour.
virtual wxCoord GetExtent(wxDC &dc)=0
Used to determine minimal size needed to draw axis contents, minimal width for vertical axes...
virtual void Draw(wxDC &dc, wxRect rc)=0
Performs axis drawing.
const wxFont & GetTitleFont()
Returns axis title font.
Base class for axes for displaying data labels.
Class that used to implement labels with different colours.
void SetTitleLocation(int location)
Sets axis title location.
void SetMinorIntervalCount(size_t count)
Set the number of ticks between each label (major interval).
size_t GetMinorIntervalCout()
Get the number of ticks between each label (major interval).
int GetTitleLocation()
Returns axis title location.
virtual void DrawGridLines(wxDC &dc, wxRect rcData)=0
Draws grid lines for axis.