xref: /haiku/headers/libs/alm/Column.h (revision 25a7b01d15612846f332751841da3579db313082)
103069455SIngo Weinhold /*
28d9b6ef4SClemens Zeidler  * Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
303069455SIngo Weinhold  * Distributed under the terms of the MIT License.
403069455SIngo Weinhold  */
5a101e99aSIngo Weinhold #ifndef	COLUMN_H
6a101e99aSIngo Weinhold #define	COLUMN_H
7a101e99aSIngo Weinhold 
89503cf19SClemens Zeidler 
9a25ffa4fSAlex Wilson #include <ObjectList.h>
10a25ffa4fSAlex Wilson #include <Referenceable.h>
11a25ffa4fSAlex Wilson 
12a25ffa4fSAlex Wilson 
13a25ffa4fSAlex Wilson namespace LinearProgramming {
14a25ffa4fSAlex Wilson 	class Constraint;
15a25ffa4fSAlex Wilson 	class LinearSpec;
16a25ffa4fSAlex Wilson };
17b3b7b663SClemens Zeidler 
18a101e99aSIngo Weinhold 
19*0a5e1307SAlex Wilson namespace BPrivate {
20*0a5e1307SAlex Wilson 	class SharedSolver;
21*0a5e1307SAlex Wilson };
22*0a5e1307SAlex Wilson 
23*0a5e1307SAlex Wilson 
24a101e99aSIngo Weinhold namespace BALM {
25a101e99aSIngo Weinhold 
26ef93b55dSClemens Zeidler 
27ef93b55dSClemens Zeidler class Area;
28a101e99aSIngo Weinhold class BALMLayout;
29ef93b55dSClemens Zeidler class RowColumnManager;
30a25ffa4fSAlex Wilson class XTab;
31a25ffa4fSAlex Wilson class YTab;
32ef93b55dSClemens Zeidler 
33a101e99aSIngo Weinhold 
34a101e99aSIngo Weinhold /**
35a101e99aSIngo Weinhold  * Represents a column defined by two x-tabs.
36a101e99aSIngo Weinhold  */
37a101e99aSIngo Weinhold class Column {
38a101e99aSIngo Weinhold public:
395b6fca06SClemens Zeidler 								~Column();
405b6fca06SClemens Zeidler 
41a101e99aSIngo Weinhold 			XTab*				Left() const;
42a101e99aSIngo Weinhold 			XTab*				Right() const;
435b6fca06SClemens Zeidler 
44ef93b55dSClemens Zeidler private:
45*0a5e1307SAlex Wilson 	friend class BALMLayout;
46*0a5e1307SAlex Wilson 	friend class BALM::RowColumnManager;
47*0a5e1307SAlex Wilson 	friend class BPrivate::SharedSolver;
48*0a5e1307SAlex Wilson 
49a25ffa4fSAlex Wilson 								Column(LinearProgramming::LinearSpec* ls,
50a25ffa4fSAlex Wilson 									XTab* left, XTab* right);
515b6fca06SClemens Zeidler 
5257014d1fSczeidler 			BReference<XTab>	fLeft;
5357014d1fSczeidler 			BReference<XTab>	fRight;
54a101e99aSIngo Weinhold 
55a25ffa4fSAlex Wilson 			LinearProgramming::LinearSpec* fLS;
56a25ffa4fSAlex Wilson 			LinearProgramming::Constraint* fPrefSizeConstraint;
57a25ffa4fSAlex Wilson 				// managed by RowColumnManager
58a25ffa4fSAlex Wilson 
59ef93b55dSClemens Zeidler 			BObjectList<Area>	fAreas;
60a101e99aSIngo Weinhold };
61a101e99aSIngo Weinhold 
62a101e99aSIngo Weinhold }	// namespace BALM
63a101e99aSIngo Weinhold 
64a101e99aSIngo Weinhold using BALM::Column;
65a101e99aSIngo Weinhold 
66a101e99aSIngo Weinhold #endif	// COLUMN_H
67