]> git.tdb.fi Git - poefilter.git/blob - source/appearance.h
a522796c663270469e4692a2bed9ecfa405797b0
[poefilter.git] / source / appearance.h
1 #ifndef APPEARANCE_H_
2 #define APPEARANCE_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "color.h"
6
7 class Theme;
8
9 class Appearance
10 {
11 public:
12         class Loader: public Msp::DataFile::ObjectLoader<Appearance>
13         {
14         private:
15                 const Theme &theme;
16
17         public:
18                 Loader(Appearance &, const Theme &);
19
20                 void background_color(unsigned, unsigned, unsigned);
21                 void background_color_named(const std::string &);
22                 void border_color(unsigned, unsigned, unsigned);
23                 void border_color_named(const std::string &);
24                 void font_size(float);
25                 void text_color(unsigned, unsigned, unsigned);
26                 void text_color_named(const std::string &);
27         };
28
29 private:
30         unsigned font_size;
31         Color border_color;
32         Color background_color;
33         Color text_color;
34         unsigned sound_type;
35         unsigned sound_volume;
36
37 public:
38         Appearance();
39
40         unsigned get_font_size() const { return font_size; }
41         const Color &get_border_color() const { return border_color; }
42         const Color &get_background_color() const { return background_color; }
43         const Color &get_text_color() const { return text_color; }
44         unsigned get_sound_type() const { return sound_type; }
45         unsigned get_sound_volume() const { return sound_volume; }
46 };
47
48 #endif