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/objectloader.h>
23 Defines a single graphical element of a widget style.
28 class Loader: public DataFile::CollectionObjectLoader<Part>
31 Loader(Part &, Resources &);
34 void graphic(State, const std::string &);
35 void align(float, float);
36 void fill(float, float);
38 void size(unsigned, unsigned);
43 const Graphic *graphic[N_STATES_];
49 Part(const std::string &);
50 const std::string &get_name() const { return name; }
51 const Graphic *get_graphic(State) const;
52 const Geometry &get_geometry() const { return geom; }
53 const Sides &get_margin() const { return margin; }
54 const Alignment &get_alignment() const { return align; }
55 void render(const Geometry &, State) const;