3 This file is part of libmspgltk
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_PART_H_
9 #define MSP_GLTK_PART_H_
12 #include <msp/datafile/loader.h>
23 Defines a single graphical element of a widget style.
28 class Loader: public DataFile::Loader
35 Loader(Part &, Resources &);
38 void graphic(State, const std::string &);
39 void align(float, float);
40 void fill(float, float);
42 void size(unsigned, unsigned);
47 const Graphic *graphic[N_STATES_];
53 Part(const std::string &);
54 const std::string &get_name() const { return name; }
55 const Graphic *get_graphic(State) const;
56 const Geometry &get_geometry() const { return geom; }
57 const Sides &get_margin() const { return margin; }
58 const Alignment &get_alignment() const { return align; }
59 void render(const Geometry &, State) const;