xref: /haiku/headers/libs/alm/Column.h (revision fc691d7de2182d23659b86d87c9c36b0feaa6b40)
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 "Constraint.h"
10 #include "LinearSpec.h"
11 #include "Tab.h"
12 
13 
14 namespace BALM {
15 
16 class BALMLayout;
17 
18 /**
19  * Represents a column defined by two x-tabs.
20  */
21 class Column {
22 public:
23 								~Column();
24 
25 			XTab*				Left() const;
26 			XTab*				Right() const;
27 			Column*				Previous() const;
28 			void				SetPrevious(Column* value);
29 			Column*				Next() const;
30 			void				SetNext(Column* value);
31 
32 			void				InsertBefore(Column* column);
33 			void				InsertAfter(Column* column);
34 			Constraint*			HasSameWidthAs(Column* column);
35 
36 			ConstraintList*		Constraints() const;
37 
38 protected:
39 								Column(BALMLayout* layout);
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 			ConstraintList		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