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_) { }
22 bool is_inside(int, int) const;
23 bool is_inside_relative(int, int) const;
28 Specifies margins on the sides of an element.
30 struct MSPGLTK_API Sides
32 class Loader: public DataFile::ObjectLoader<Sides>
37 void horizontal(unsigned);
38 void vertical(unsigned);
48 Sides(unsigned, unsigned);
49 Sides(unsigned, unsigned, unsigned);
50 Sides(unsigned, unsigned, unsigned, unsigned);
55 Performs alignment of nested geometries, such as widgets and their parts.
57 struct MSPGLTK_API Alignment
64 void apply(Geometry &, const Geometry &) const;
65 void apply(Geometry &, const Geometry &, const Sides &) const;