X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry.h;fp=source%2Fgeometry.h;h=6559414dd0497ae5cdd8a8e8a0136ed6af062876;hb=ed9873ba7ee862ad76937f579fe371c1a27d5715;hp=6dc982727070ed2f09dbd357f94963922ee8d8e1;hpb=2f1c7d6861c801e24a003ee5f6132032e04c9bbe;p=libs%2Fgltk.git diff --git a/source/geometry.h b/source/geometry.h index 6dc9827..6559414 100644 --- a/source/geometry.h +++ b/source/geometry.h @@ -26,6 +26,7 @@ struct Geometry bool is_inside(int, int) const; }; + /** Specifies margins on the sides of an element. */ @@ -48,6 +49,20 @@ struct Sides Sides(); }; + +/** +Performs alignment of nested geometries, such as widgets and their parts. +*/ +struct Alignment +{ + float x, y; + + Alignment(): x(0), y(0) { } + Alignment(float x_, float y_): x(x_), y(y_) { } + void apply(Geometry &, const Geometry &) const; + void apply(Geometry &, const Geometry &, const Sides &) const; +}; + } // namespace GLtk } // namespace Msp