+ bool is_inside(int, int) const;
+ bool is_inside_relative(int, int) const;
+};
+
+
+/**
+Specifies margins on the sides of an element.
+*/
+struct Sides
+{
+ class Loader: public DataFile::ObjectLoader<Sides>
+ {
+ public:
+ Loader(Sides &);
+ private:
+ void horizontal(unsigned);
+ void vertical(unsigned);
+ };
+
+ unsigned top;
+ unsigned right;
+ unsigned bottom;
+ unsigned left;
+
+ Sides();
+ 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 Alignment
+{
+ float x, y;
+ float w, h;
+
+ Alignment(): x(0), y(0), w(1), h(1) { }
+ void apply(Geometry &, const Geometry &) const;
+ void apply(Geometry &, const Geometry &, const Sides &) const;