xref: /haiku/headers/libs/alm/Column.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 /*
2  * Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	COLUMN_H
6 #define	COLUMN_H
7 
8 
9 #include <ObjectList.h>
10 #include <Referenceable.h>
11 
12 
13 namespace LinearProgramming {
14 	class Constraint;
15 	class LinearSpec;
16 };
17 
18 
19 namespace BPrivate {
20 	class SharedSolver;
21 };
22 
23 
24 namespace BALM {
25 
26 
27 class Area;
28 class BALMLayout;
29 class RowColumnManager;
30 class XTab;
31 class YTab;
32 
33 
34 /**
35  * Represents a column defined by two x-tabs.
36  */
37 class Column {
38 public:
39 								~Column();
40 
41 			XTab*				Left() const;
42 			XTab*				Right() const;
43 
44 private:
45 	friend class BALMLayout;
46 	friend class BALM::RowColumnManager;
47 	friend class BPrivate::SharedSolver;
48 
49 								Column(LinearProgramming::LinearSpec* ls,
50 									XTab* left, XTab* right);
51 
52 			BReference<XTab>	fLeft;
53 			BReference<XTab>	fRight;
54 
55 			LinearProgramming::LinearSpec* fLS;
56 			LinearProgramming::Constraint* fPrefSizeConstraint;
57 				// managed by RowColumnManager
58 
59 			BObjectList<Area>	fAreas;
60 };
61 
62 }	// namespace BALM
63 
64 using BALM::Column;
65 
66 #endif	// COLUMN_H
67