Version: 0.6.0
categoryaxis.h
1 // Name: categoryaxis.h
3 // Purpose: category axis declarations
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef CATEGORYAXIS_H_
11 #define CATEGORYAXIS_H_
12 
13 #include <wx/axis/labelaxis.h>
14 
18 class WXDLLIMPEXP_FREECHART CategoryAxis : public LabelAxis
19 {
20  DECLARE_CLASS(CategoryAxis)
21 public:
22  CategoryAxis(AXIS_LOCATION location);
23  virtual ~CategoryAxis();
24 
25  virtual void UpdateBounds();
26 
27  virtual void GetDataBounds(double &minValue, double &maxValue) const;
28 
29 protected:
30  virtual bool AcceptDataset(Dataset *dataset);
31 
32  //
33  // LabelAxis
34  //
35  virtual double GetValue(size_t step);
36 
37  virtual void GetLabel(size_t step, wxString &label);
38 
39  virtual bool IsEnd(size_t step);
40 
41  virtual wxSize GetLongestLabelExtent(wxDC &dc);
42 
43 private:
44  size_t m_categoryCount;
45  wxString m_longestCategory;
46 };
47 
48 #endif /*CATEGORYAXIS_H_*/
virtual void UpdateBounds()=0
virtual bool IsEnd(size_t step)=0
Definition: labelaxis.h:27
virtual bool AcceptDataset(Dataset *dataset)=0
virtual double GetValue(size_t step)=0
virtual void GetDataBounds(double &minValue, double &maxValue) const =0
Definition: categoryaxis.h:18
virtual void GetLabel(size_t step, wxString &label)=0
Definition: dataset.h:50