]> git.tdb.fi Git - libs/gltk.git/blob - source/alignment.h
Reorder class members
[libs/gltk.git] / source / alignment.h
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GLTK_ALIGNMENT_H_
9 #define MSP_GLTK_ALIGNMENT_H_
10
11 namespace Msp {
12 namespace GLtk {
13
14 class Geometry;
15
16 /**
17 Handles alignment of widget parts.  Both x and y components can have values -1
18 (left / bottom), 0 (center) or 1 (right / top).
19 */
20 struct Alignment
21 {
22         int x, y;
23
24         Alignment(): x(0), y(0) { }
25         Alignment(int x_, int y_): x(x_), y(y_) { }
26         void apply(const Geometry &, unsigned, unsigned) const;
27 };
28
29 } // namespace GLtk
30 } // namespace Msp
31
32 #endif