00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef GANTTRENDERER_H_
00011 #define GANTTRENDERER_H_
00012
00013 #include <wx/axis/dateaxis.h>
00014 #include <wx/axis/categoryaxis.h>
00015 #include <wx/gantt/ganttdataset.h>
00016
00020 class WXDLLIMPEXP_FREECHART GanttRenderer : public Renderer
00021 {
00022 DECLARE_CLASS(GanttRenderer)
00023 public:
00029 GanttRenderer(int barWidth = 5, int serieGap = 2);
00030 virtual ~GanttRenderer();
00031
00032
00033
00034
00035 virtual void DrawLegendSymbol(wxDC &dc, wxRect rcSymbol, size_t serie);
00036
00045 void Draw(wxDC &dc, wxRect rc, DateAxis *horizAxis, CategoryAxis *vertAxis, GanttDataset *dataset);
00046
00052 void SetSerieDraw(size_t serie, AreaDraw *areaDraw);
00053
00054 AreaDraw *GetSerieDraw(size_t serie);
00055
00056 void SetBarWidth(int barWidth)
00057 {
00058 if (m_barWidth != barWidth) {
00059 m_barWidth = barWidth;
00060 FireNeedRedraw();
00061 }
00062 }
00063
00064 private:
00065
00066 int m_barWidth;
00067 int m_serieGap;
00068
00069 AreaDrawCollection m_serieDraws;
00070 };
00071
00072 #endif