]> git.tdb.fi Git - poefilter.git/blobdiff - source/theme.h
Revamp appearance definitions
[poefilter.git] / source / theme.h
index 7e296ae44c799027d949ebca64f98959b493cb64..2799c6b040bd15a253519a72ba068282e3b1e2bd 100644 (file)
@@ -4,17 +4,8 @@
 #include <map>
 #include <string>
 #include <msp/datafile/objectloader.h>
-
-struct Color
-{
-       unsigned r;
-       unsigned g;
-       unsigned b;
-
-       Color();
-       Color(unsigned, unsigned, unsigned);
-};
-
+#include "appearance.h"
+#include "color.h"
 
 class Theme
 {
@@ -25,14 +16,17 @@ public:
                Loader(Theme &);
 
        private:
+               void appearance(const std::string &);
                void color(const std::string &, unsigned, unsigned, unsigned);
        };
 
 private:
        typedef std::map<std::string, Color> ColorMap;
+       typedef std::map<std::string, Appearance> AppearanceMap;
 
        ColorMap colors;
        unsigned base_font_size;
+       AppearanceMap appearances;
 
 public:
        Theme();
@@ -42,6 +36,9 @@ public:
 
        void set_base_font_size(unsigned);
        unsigned get_base_font_size() const { return base_font_size; }
+
+       void set_appearance(const std::string &, const Appearance &);
+       const Appearance &get_appearance(const std::string &) const;
 };
 
 #endif