Version: 0.6.0
ganttrenderer.h
1 // Name: ganttrenderer.h
3 // Purpose: gantt renderer declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2009/03/23
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef GANTTRENDERER_H_
11 #define GANTTRENDERER_H_
12 
13 #include <wx/axis/dateaxis.h>
14 #include <wx/axis/categoryaxis.h>
15 #include <wx/gantt/ganttdataset.h>
16 
20 class WXDLLIMPEXP_FREECHART GanttRenderer : public Renderer
21 {
22  DECLARE_CLASS(GanttRenderer)
23 public:
29  GanttRenderer(int barWidth = 5, int serieGap = 2);
30  virtual ~GanttRenderer();
31 
32  //
33  // Renderer
34  //
35  virtual void DrawLegendSymbol(wxDC &dc, wxRect rcSymbol, size_t serie);
36 
45  void Draw(wxDC &dc, wxRect rc, DateAxis *horizAxis, CategoryAxis *vertAxis, GanttDataset *dataset);
46 
52  void SetSerieDraw(size_t serie, AreaDraw *areaDraw);
53 
54  AreaDraw *GetSerieDraw(size_t serie);
55 
56  void SetBarWidth(int barWidth)
57  {
58  if (m_barWidth != barWidth) {
59  m_barWidth = barWidth;
60  FireNeedRedraw();
61  }
62  }
63 
64 private:
65 
66  int m_barWidth;
67  int m_serieGap;
68 
69  AreaDrawCollection m_serieDraws;
70 };
71 
72 #endif /* GANTTRENDERER_H_ */
Definition: chartrenderer.h:21
Definition: areadraw.h:22
Definition: categoryaxis.h:18
Definition: dateaxis.h:21
Definition: areadraw.h:182
virtual void DrawLegendSymbol(wxDC &dc, wxRect rcSymbol, size_t serie)
Definition: renderer.cpp:50
Definition: ganttdataset.h:40
Definition: ganttrenderer.h:20