.
1 /*
2 Copyright (C) 2012 Johan Mattsson
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the
7 License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13 */
14
15 namespace BirdFont {
16
17 public class WidgetAllocation : GLib.Object {
18 public int width = 0;
19 public int height = 0;
20 public int x = 0;
21 public int y = 0;
22
23 public WidgetAllocation () {
24 }
25
26 public WidgetAllocation.for_area (int x, int y, int width, int height) {
27 this.x = x;
28 this.y = y;
29 this.width = width;
30 this.height = height;
31 }
32
33 public WidgetAllocation copy () {
34 WidgetAllocation w = new WidgetAllocation ();
35 w.x = x;
36 w.y = y;
37 w.width = width;
38 w.height = height;
39 return w;
40 }
41 }
42
43 }
44