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_
13 #include <msp/datafile/loader.h>
14 //#include "alignment.h"
25 Defines a single graphical element of a widget style.
30 class Loader: public DataFile::Loader
37 Loader(Part &, Resources &);
40 void graphic(State, const std::string &);
41 void align(float, float);
42 void fill(float, float);
44 void size(unsigned, unsigned);
49 const Graphic *graphic[N_STATES_];
55 Part(const std::string &);
56 const std::string &get_name() const { return name; }
57 const Graphic *get_graphic(State) const;
58 const Geometry &get_geometry() const { return geom; }
59 const Sides &get_margin() const { return margin; }
60 const Alignment &get_alignment() const { return align; }
61 void render(const Geometry &, State) const;
63 typedef std::list<Part> PartSeq;