1 #ifndef MSP_GLTK_GEOMETRY_H_
2 #define MSP_GLTK_GEOMETRY_H_
4 #include <msp/datafile/objectloader.h>
5 #include "mspgltk_api.h"
11 Specifies the position and size of a widget or graphic.
13 struct MSPGLTK_API Geometry
21 Geometry(int x_, int y_, unsigned w_, unsigned h_): x(x_), y(y_), w(w_), h(h_) { }
23 bool is_inside(int, int) const;
24 bool is_inside_relative(int, int) const;
29 Specifies margins on the sides of an element.
31 struct MSPGLTK_API Sides
33 class Loader: public DataFile::ObjectLoader<Sides>
38 void horizontal(unsigned);
39 void vertical(unsigned);
49 Sides(unsigned, unsigned);
50 Sides(unsigned, unsigned, unsigned);
51 Sides(unsigned, unsigned, unsigned, unsigned);
56 Performs alignment of nested geometries, such as widgets and their parts.
58 struct MSPGLTK_API Alignment
65 void apply(Geometry &, const Geometry &) const;
66 void apply(Geometry &, const Geometry &, const Sides &) const;