xref: /haiku/headers/libs/alm/Row.h (revision 5b6fca06392320a9c32d542b519d8f4fe876aef2)
1 /*
2  * Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	ROW_H
6 #define	ROW_H
7 
8 
9 #include "Constraint.h"
10 #include "LinearSpec.h"
11 
12 
13 namespace BALM {
14 
15 class BALMLayout;
16 class YTab;
17 
18 /**
19  * Represents a row defined by two y-tabs.
20  */
21 class Row {
22 public:
23 								~Row();
24 
25 			YTab*				Top() const;
26 			YTab*				Bottom() const;
27 			Row*				Previous() const;
28 			void				SetPrevious(Row* value);
29 			Row*				Next() const;
30 			void				SetNext(Row* value);
31 			void				InsertBefore(Row* row);
32 			void				InsertAfter(Row* row);
33 			Constraint*			HasSameHeightAs(Row* row);
34 			ConstraintList*		Constraints() const;
35 
36 protected:
37 								Row(LinearSpec* ls);
38 
39 protected:
40 			LinearSpec*			fLS;
41 			YTab*				fTop;
42 			YTab*				fBottom;
43 
44 private:
45 			Row*				fPrevious;
46 			Row*				fNext;
47 			Constraint*			fPreviousGlue;
48 			Constraint*			fNextGlue;
49 			ConstraintList		fConstraints;
50 
51 public:
52 	friend class			BALMLayout;
53 
54 };
55 
56 }	// namespace BALM
57 
58 using BALM::Row;
59 
60 #endif	// ROW_H
61