wxFreeChart
ohlccandlestickrenderer.h
1 // Name: ohlccandlestickrenderer.h
3 // Purpose: OHLC candlestick renderer declarations
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 OHLCCANDDLESTICKRENDERER_H_
11 #define OHLCCANDDLESTICKRENDERER_H_
12 
13 #include <wx/ohlc/ohlcrenderer.h>
14 
18 class WXDLLIMPEXP_FREECHART OHLCCandlestickRenderer : public OHLCRenderer
19 {
20 public:
22  virtual ~OHLCCandlestickRenderer();
23 
24  virtual void DrawItem(wxDC &dc, wxCoord x, wxCoord open, wxCoord high, wxCoord low, wxCoord close);
25 
30  void SetOutlinePen(wxPen outlinePen)
31  {
32  m_outlinePen = outlinePen;
33  }
34 
39  const wxPen &GetOutlinePen()
40  {
41  return m_outlinePen;
42  }
43 
48  void SetLowerBrush(wxBrush lowerBrush)
49  {
50  m_lowerBrush = lowerBrush;
51  }
52 
57  const wxBrush &GetLowerBrush()
58  {
59  return m_lowerBrush;
60  }
61 
66  void SetHigherBrush(wxBrush higherBrush)
67  {
68  m_higherBrush = higherBrush;
69  }
70 
75  const wxBrush &GetHigherBrush()
76  {
77  return m_higherBrush;
78  }
79 
80 private:
81  wxCoord m_candleRadius;
82 
83  wxPen m_outlinePen;
84  wxBrush m_lowerBrush;
85  wxBrush m_higherBrush;
86 };
87 
88 #endif /*OHLCCANDDLESTICKRENDERER_H_*/
const wxBrush & GetLowerBrush()
Returns brush to draw lower (bear) candles.
const wxBrush & GetHigherBrush()
Return brush to draw higher (bull) candles.
virtual void DrawItem(wxDC &dc, wxCoord x, wxCoord open, wxCoord high, wxCoord low, wxCoord close)=0
Draws item.
void SetHigherBrush(wxBrush higherBrush)
Sets brush to draw higher (bull) candles.
void SetOutlinePen(wxPen outlinePen)
Sets pen to draw candle outline.
const wxPen & GetOutlinePen()
Returns pen to draw candle outline.
OHLC renderer for displaying japanese candles.
void SetLowerBrush(wxBrush lowerBrush)
Sets brush to draw lower (bear) candles.
Base class for rendering OHLC data.
Definition: ohlcrenderer.h:30