xref: /haiku/headers/libs/alm/Row.h (revision 9503cf19be94b5a8297ecd73ab50e7acd92a98f6)
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 <List.h>
10 
11 #include "Constraint.h"
12 #include "LinearSpec.h"
13 
14 
15 namespace BALM {
16 
17 class BALMLayout;
18 class YTab;
19 
20 /**
21  * Represents a row defined by two y-tabs.
22  */
23 class Row {
24 public:
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 			//~ string				ToString();
32 			void					InsertBefore(Row* row);
33 			void					InsertAfter(Row* row);
34 			Constraint*			HasSameHeightAs(Row* row);
35 			BList*				Constraints() const;
36 			void					SetConstraints(BList* constraints);
37 								~Row();
38 
39 protected:
40 								Row(LinearSpec* ls);
41 
42 protected:
43 			LinearSpec*			fLS;
44 			YTab*				fTop;
45 			YTab*				fBottom;
46 
47 private:
48 			Row*				fPrevious;
49 			Row*				fNext;
50 			Constraint*			fPreviousGlue;
51 			Constraint*			fNextGlue;
52 			BList*				fConstraints;
53 
54 public:
55 	friend class			BALMLayout;
56 
57 };
58 
59 }	// namespace BALM
60 
61 using BALM::Row;
62 
63 #endif	// ROW_H
64