1 #ifndef MSP_GLTK_STYLE_H_
2 #define MSP_GLTK_STYLE_H_
4 #include <msp/gl/color.h>
5 #include <msp/gl/font.h>
6 #include <msp/gl/sampler.h>
7 #include <msp/datafile/objectloader.h>
8 #include "mspgltk_api.h"
17 Styles define what wigets look like. They are made up of Parts and some
20 class MSPGLTK_API Style
23 class Loader: public DataFile::CollectionObjectLoader<Style, Resources>
26 Loader(Style &, Resources &);
29 void font(const std::string &);
30 void font_color_normal(float, float, float);
31 void font_color(State, float, float, float);
32 void part(const std::string &);
36 typedef std::list<Part> PartSeq;
39 const GL::Font *font = nullptr;
40 unsigned font_size = 0;
41 GL::Color font_color[N_STATES_];
42 const GL::Sampler *sampler = nullptr;
46 const GL::Font &get_font() const;
47 unsigned get_font_size() const { return font_size; }
48 const GL::Color &get_font_color(State) const;
49 const GL::Sampler &get_sampler() const;
50 const PartSeq &get_parts() const { return parts; }
51 const Part *find_part(const std::string &) const;
52 bool compare_states(State, State) const;