]> git.tdb.fi Git - libs/gltk.git/blob - source/style.h
Change mspparser -> mspdatafile
[libs/gltk.git] / source / style.h
1 #ifndef MSP_GLTK_STYLE_H_
2 #define MSP_GLTK_STYLE_H_
3
4 #include <msp/gl/font.h>
5 #include <msp/datafile/loader.h>
6 #include "color.h"
7 #include "part.h"
8
9 namespace Msp {
10 namespace GLtk {
11
12 class Resources;
13
14 class Style
15 {
16 public:
17         class Loader: public DataFile::Loader
18         {
19         public:
20                 Loader(Style &);
21         private:
22                 Style &style;
23
24                 void font(const std::string &);
25                 void font_color(float, float, float);
26                 void part(const std::string &);
27         };
28
29         Style(const Resources &, const std::string &, const std::string &);
30         const GL::Font *get_font() const  { return font; }
31         const Color    &get_font_color() const { return font_color; }
32         const PartSeq  &get_parts() const { return parts; }
33 private:
34         const Resources &res;
35         std::string widget;
36         std::string name;
37         const GL::Font *font;
38         Color font_color;
39         PartSeq  parts;
40 };
41
42 } // namespace GLtk
43 } // namespace Msp
44
45 #endif