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"
24 Defines a single graphical element of a widget style.
29 class Loader: public DataFile::Loader
36 Loader(Part &, Resources &);
39 void graphic(State, const std::string &);
41 void fill(bool, bool);
46 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 unsigned get_width() const { return width; }
58 unsigned get_height() const { return height; }
59 const Alignment &get_alignment() const { return align; }
60 bool get_fill_x() const { return fill_x; }
61 bool get_fill_y() const { return fill_y; }
62 void render(const Geometry &, State) const;
64 typedef std::list<Part> PartSeq;