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);
48 const Graphic *graphic[N_STATES_];
54 Part(const std::string &);
55 const std::string &get_name() const { return name; }
56 const Graphic *get_graphic(State) const;
57 const Geometry &get_geometry() const { return geom; }
58 const Sides &get_margin() const { return margin; }
59 const Alignment &get_alignment() const { return align; }
60 void render(const Geometry &, State) const;
62 typedef std::list<Part> PartSeq;