xref: /haiku/src/libs/alm/Column.cpp (revision 323b65468e5836bb27a5e373b14027d902349437)
1 /*
2  * Copyright 2007-2011, Haiku, Inc. All rights reserved.
3  * Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz
4  * Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz
5  * Copyright 2010, Clemens Zeidler <haiku@clemens-zeidler.de>
6  * Distributed under the terms of the MIT License.
7  */
8 
9 
10 #include "Column.h"
11 
12 #include "ALMLayout.h"
13 #include "Tab.h"
14 
15 
16 using namespace LinearProgramming;
17 
18 
19 /**
20  * The left boundary of the column.
21  */
22 XTab*
23 Column::Left() const
24 {
25 	return fLeft;
26 }
27 
28 
29 /**
30  * The right boundary of the column.
31  */
32 XTab*
33 Column::Right() const
34 {
35 	return fRight;
36 }
37 
38 
39 /**
40  * Destructor.
41  * Removes the column from the specification.
42  */
43 Column::~Column()
44 {
45 	delete fPrefSizeConstraint;
46 }
47 
48 
49 /**
50  * Constructor.
51  */
52 Column::Column(LinearSpec* ls, XTab* left, XTab* right)
53 	:
54 	fLS(ls),
55 	fLeft(left),
56 	fRight(right),
57 	fPrefSizeConstraint(NULL)
58 {
59 
60 }
61