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