10 #ifndef COMPDATEAXIS_H_
11 #define COMPDATEAXIS_H_
13 #include <wx/axis/axis.h>
14 #include <wx/areadraw.h>
16 #include <wx/dynarray.h>
18 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDateSpan, wxDateSpanArray, WXDLLIMPEXP_FREECHART);
19 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxTimeSpan, wxTimeSpanArray, WXDLLIMPEXP_FREECHART);
33 virtual void Draw(wxDC &dc, wxRect rc);
41 virtual void GetDataBounds(
double &minValue,
double &maxValue)
const;
43 virtual wxCoord
ToGraphics(wxDC &dc,
int minCoord,
int gRange,
double value);
45 virtual double ToData(wxDC &dc,
int minCoord,
int gRange, wxCoord g);
61 wxREPLACE(m_spanDraw, spanDraw);
69 void DrawSpan(wxDC &dc, wxRect rcAxis,
int spanNum, wxString spanLabel,
double start,
double end);
71 wxString GetSpanLabel(wxDateTime date, wxDateSpan span);
73 wxCoord GetSpanExtent(wxDC &dc);
75 bool GetWindowDateBounds(wxDateTime &date0, wxDateTime &date1);
77 double DateToDataCoord(wxDateTime &date);
79 bool GetFirstDate(wxDateTime &date);
80 bool GetLastDate(wxDateTime &date);
82 bool GetFirstLastDate(wxDateTime &firstDate, wxDateTime &lastDate);
84 bool GetMinSpan(wxDateSpan &span);
91 wxColour m_labelColour;
93 wxCoord m_minLabelGap;
94 wxCoord m_labelMargin;
97 wxDateSpanArray m_dateSpans;
virtual void GetDataBounds(double &minValue, double &maxValue) const
Definition: compdateaxis.cpp:171
Definition: areadraw.h:22
virtual double ToData(wxDC &dc, int minCoord, int gRange, wxCoord g)
Definition: compdateaxis.cpp:390
virtual wxCoord GetExtent(wxDC &dc)
Definition: compdateaxis.cpp:166
virtual void DrawGridLines(wxDC &dc, wxRect rc)
Definition: compdateaxis.cpp:200
void SetSpanDraw(AreaDraw *spanDraw)
Definition: compdateaxis.h:59
void AddInterval(const wxDateSpan &interval)
Definition: compdateaxis.cpp:558
Definition: compdateaxis.h:26
virtual void UpdateBounds()
Definition: compdateaxis.cpp:177
virtual void Draw(wxDC &dc, wxRect rc)
Definition: compdateaxis.cpp:238
virtual wxCoord ToGraphics(wxDC &dc, int minCoord, int gRange, double value)
Definition: compdateaxis.cpp:369
virtual bool AcceptDataset(Dataset *dataset)
Definition: compdateaxis.cpp:158