+
+ bool is_inside(int, int) const;
+ bool is_inside_relative(int, int) const;
+};
+
+
+/**
+Specifies margins on the sides of an element.
+*/
+struct MSPGLTK_API Sides
+{
+ class Loader: public DataFile::ObjectLoader<Sides>
+ {
+ public:
+ Loader(Sides &);
+ private:
+ void horizontal(unsigned);
+ void vertical(unsigned);
+ };
+
+ unsigned top = 0;
+ unsigned right = 0;
+ unsigned bottom = 0;
+ unsigned left = 0;
+
+ Sides() = default;
+ Sides(unsigned);
+ Sides(unsigned, unsigned);
+ Sides(unsigned, unsigned, unsigned);
+ Sides(unsigned, unsigned, unsigned, unsigned);
+};
+
+
+/**
+Performs alignment of nested geometries, such as widgets and their parts.
+*/
+struct MSPGLTK_API Alignment
+{
+ float x = 0.0f;
+ float y = 0.0f;
+ float w = 1.0f;
+ float h = 1.0f;
+
+ void apply(Geometry &, const Geometry &) const;
+ void apply(Geometry &, const Geometry &, const Sides &) const;