Version: 0.6.0
symbol.h
1 // Name: symbol.h
3 // Purpose: symbols 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 SYMBOL_H_
11 #define SYMBOL_H_
12 
13 #include <wx/wxfreechartdefs.h>
14 
18 class WXDLLIMPEXP_FREECHART Symbol
19 {
20 public:
21  Symbol();
22  virtual ~Symbol();
23 
31  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color) = 0;
32 
37  virtual wxSize GetExtent() = 0;
38 };
39 
44 class WXDLLIMPEXP_FREECHART MaskedSymbol : public Symbol
45 {
46 public:
47  MaskedSymbol(const char **maskData, wxCoord size = 9);
48 
49  virtual ~MaskedSymbol();
50 
51  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color);
52 
53  virtual wxSize GetExtent();
54 
55 private:
56  wxBitmap m_maskBmp;
57  wxBitmap m_symbolBitmap;
58 
59  bool m_initialized;
60 
61  wxCoord m_size;
62 };
63 
67 class WXDLLIMPEXP_FREECHART ShapeSymbol : public Symbol
68 {
69 public:
70  ShapeSymbol(wxCoord size);
71  virtual ~ShapeSymbol();
72 
73  virtual wxSize GetExtent();
74 
75 protected:
76  wxColour m_color;
77  wxCoord m_size;
78 };
79 
80 //
81 // shape symbols
82 // TODO: add more
83 
87 class WXDLLIMPEXP_FREECHART CircleSymbol : public ShapeSymbol
88 {
89 public:
90  CircleSymbol(wxCoord size = 9);
91  virtual ~CircleSymbol();
92 
93  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color);
94 };
95 
99 class WXDLLIMPEXP_FREECHART SquareSymbol : public ShapeSymbol
100 {
101 public:
102  SquareSymbol(wxCoord size = 9);
103  virtual ~SquareSymbol();
104 
105  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color);
106 };
107 
111 class WXDLLIMPEXP_FREECHART CrossSymbol : public ShapeSymbol
112 {
113 public:
114  CrossSymbol(wxCoord size = 9);
115  virtual ~CrossSymbol();
116 
117  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color);
118 };
119 
123 class WXDLLIMPEXP_FREECHART TriangleSymbol : public ShapeSymbol
124 {
125 public:
126  TriangleSymbol(wxCoord size = 9);
127  virtual ~TriangleSymbol();
128 
129  virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color);
130 };
131 
132 #endif /*SYMBOL_H_*/
virtual wxSize GetExtent()=0
Definition: symbol.h:123
Definition: symbol.h:87
Definition: symbol.h:99
Definition: symbol.h:44
Definition: symbol.h:67
virtual void Draw(wxDC &dc, wxCoord x, wxCoord y, wxColour color)=0
Definition: symbol.h:111
Definition: symbol.h:18