1 #ifndef MSP_GLTK_GEOMETRY_H_
2 #define MSP_GLTK_GEOMETRY_H_
4 #include <msp/datafile/objectloader.h>
10 Specifies the position and size of a widget or graphic.
17 Geometry(): x(0), y(0), w(1), h(1) { }
18 Geometry(int x_, int y_, unsigned w_, unsigned h_): x(x_), y(y_), w(w_), h(h_) { }
19 bool is_inside(int, int) const;
20 bool is_inside_relative(int, int) const;
25 Specifies margins on the sides of an element.
29 class Loader: public DataFile::ObjectLoader<Sides>
34 void horizontal(unsigned);
35 void vertical(unsigned);
45 Sides(unsigned, unsigned);
46 Sides(unsigned, unsigned, unsigned);
47 Sides(unsigned, unsigned, unsigned, unsigned);
52 Performs alignment of nested geometries, such as widgets and their parts.
59 Alignment(): x(0), y(0), w(1), h(1) { }
60 void apply(Geometry &, const Geometry &) const;
61 void apply(Geometry &, const Geometry &, const Sides &) const;