xref: /haiku/headers/libs/alm/Column.h (revision 8d9b6ef4284d47e3bea44ba8c64e4e8c84be4e1a)
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 #include <List.h>
9 
10 #include "Constraint.h"
11 #include "LinearSpec.h"
12 
13 
14 namespace BALM {
15 
16 class BALMLayout;
17 class XTab;
18 
19 /**
20  * Represents a column defined by two x-tabs.
21  */
22 class Column {
23 public:
24 			XTab*				Left() const;
25 			XTab*				Right() const;
26 			Column*				Previous() const;
27 			void					SetPrevious(Column* value);
28 			Column*				Next() const;
29 			void					SetNext(Column* value);
30 			//~ string				ToString();
31 			void					InsertBefore(Column* column);
32 			void					InsertAfter(Column* column);
33 			Constraint*			HasSameWidthAs(Column* column);
34 			BList*				Constraints() const;
35 			void					SetConstraints(BList* constraints);
36 								~Column();
37 
38 protected:
39 								Column(LinearSpec* ls);
40 
41 protected:
42 			LinearSpec*			fLS;
43 			XTab*				fLeft;
44 			XTab*				fRight;
45 
46 private:
47 			Column*				fPrevious;
48 			Column*				fNext;
49 			Constraint*			fPreviousGlue;
50 			Constraint*			fNextGlue;
51 			BList*				fConstraints;
52 
53 public:
54 	friend class			BALMLayout;
55 
56 };
57 
58 }	// namespace BALM
59 
60 using BALM::Column;
61 
62 #endif	// COLUMN_H
63