TextLegendProperties.hh
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* TextLegendProperties.hh
*
* Created on: 24 sep. 2014
* Author: AKKA
*/
#ifndef TEXTLEGENDPROPERTIES_HH_
#define TEXTLEGENDPROPERTIES_HH_
#include <string>
#include <vector>
#include "Color.hh"
#include "Color.hh"
#include "Font.hh"
namespace plot
{
typedef enum {POS_RIGHT, POS_LEFT, POS_TOP, POS_BOTTOM} TextLegendPosition;
class TextLegendProperties
{
public:
TextLegendProperties(void);
virtual ~TextLegendProperties(void);
void reset(void);
void setText(const std::string& text);
const std::string& getText() const;
void setFont(Font font);
Font& getFont(void);
void setPosition(TextLegendPosition position);
TextLegendPosition getPosition(void);
void setColor(const Color& color);
Color& getColor();
void setOffset(double offset);
double getOffset(void);
int getTextLinesNb (void);
std::vector<std::string> getTextLines (void);
bool isDrawn(void);
void setDrawn(bool drawn);
Font _font;
static const std::string DELIMITER;
private:
std::string _text;
TextLegendPosition _position;
Color _color;
double _offset;
bool _drawn;
};
}
#endif /* TEXTLEGENDPROPERTIES_HH_ */