wxFreeChart
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  }
61 
62 private:
63 
64  int m_barWidth;
65  int m_serieGap;
66 
67  AreaDrawCollection m_serieDraws;
68 };
69 
70 #endif /* GANTTRENDERER_H_ */
Base class for all renderers.
Definition: chartrenderer.h:21
An axis for displaying category names.
Definition: categoryaxis.h:18
Collection of areadraws for series.
Definition: areadraw.h:179
An axis for displaying date/time values.
Definition: dateaxis.h:21
Gantt data renderer.
Definition: ganttrenderer.h:20
Gantt chart dataset base class.
Definition: ganttdataset.h:40
Base class for drawing area background.
Definition: areadraw.h:22
virtual void DrawLegendSymbol(wxDC &dc, wxRect rcSymbol, size_t serie)
Draws legend symbol.