1 #ifndef MSP_GLTK_PART_H_
2 #define MSP_GLTK_PART_H_
5 #include <msp/datafile/objectloader.h>
7 #include "mspgltk_api.h"
18 Defines a single graphical element of a widget style.
20 class MSPGLTK_API Part
23 class Loader: public DataFile::CollectionObjectLoader<Part>
26 Loader(Part &, Resources &);
29 void finish() override;
31 void graphic_normal(const std::string &);
32 void graphic(State, const std::string &);
33 void align(float, float);
34 void fill(float, float);
36 void size(unsigned, unsigned);
41 const Graphic *graphic[N_STATES_] = { };
47 Part(const std::string &);
49 const std::string &get_name() const { return name; }
50 const Graphic *get_graphic(State) const;
51 const Geometry &get_geometry() const { return geom; }
52 const Sides &get_margin() const { return margin; }
53 const Alignment &get_alignment() const { return align; }
54 void build(const Geometry &, State, PartCache &) const;