1 #ifndef MSP_GLTK_RESOURCES_H_
2 #define MSP_GLTK_RESOURCES_H_
4 #include <msp/gl/font.h>
5 #include <msp/gl/texture.h>
6 #include <msp/parser/loader.h>
17 class Loader: public Msp::Parser::Loader
24 void font(const std::string &);
25 void texture(const std::string &);
26 void graphic(const std::string &);
27 void style(const std::string &, const std::string &);
32 const GL::Font &get_font(const std::string &) const;
33 const GL::Font &get_default_font() const;
34 const GL::Texture2D &get_texture(const std::string &) const;
35 const Graphic &get_graphic(const std::string &) const;
36 const Style &get_style(const std::string &, const std::string &) const;
43 StyleId(const std::string &w, const std::string &n): widget(w), name(n) { }
44 bool operator<(const StyleId &) const;
47 typedef std::map<std::string, GL::Font *> FontMap;
48 typedef std::map<std::string, GL::Texture2D *> TextureMap;
49 typedef std::map<std::string, Graphic> GraphicMap;
50 typedef std::map<StyleId, Style> StyleMap;
53 GL::Font *default_font;
58 Resources(const Resources &);
59 Resources &operator=(const Resources &);