wxFreeChart
ohlcrenderer.h
1 // Name: ohlcrenderer.h
3 // Purpose: OHLC renderers base class declaration.
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 OHLCRENDERER_H_
11 #define OHLCRENDERER_H_
12 
13 #include <wx/chartrenderer.h>
14 
19 class WXDLLIMPEXP_FREECHART OHLCColourer
20 {
21 public:
22  // IY: Virtual destructor needed otherwise behaviour is undefined.
23  virtual ~OHLCColourer() {}
24  virtual wxColor GetColour(int step) = 0;
25 };
26 
30 class WXDLLIMPEXP_FREECHART OHLCRenderer : public Renderer
31 {
32 public:
33  OHLCRenderer();
34  virtual ~OHLCRenderer();
35 
45  virtual void DrawItem(wxDC &dc, wxCoord x, wxCoord open, wxCoord high, wxCoord low, wxCoord close) = 0;
46 
47  void SetColourer(OHLCColourer *colourer);
48  OHLCColourer *GetColourer();
49 
50 protected:
51  OHLCColourer *m_colourer;
52 };
53 
54 #endif /*OHLCRENDERER_H_*/
Base class for all renderers.
Definition: chartrenderer.h:21
Class that controls bars/candlesticks colour.
Definition: ohlcrenderer.h:19
Base class for rendering OHLC data.
Definition: ohlcrenderer.h:30