xref: /haiku/headers/libs/alm/Row.h (revision f75a7bf508f3156d63a14f8fd77c5e0ca4d08c42)
1 /*
2  * Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz
3  * Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz
4  * Distributed under the terms of the MIT License.
5  */
6 
7 #ifndef	ROW_H
8 #define	ROW_H
9 
10 #include "Constraint.h"
11 
12 #include <List.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 
25 public:
26 	YTab*				Top() const;
27 	YTab*				Bottom() const;
28 	Row*				Previous() const;
29 	void					SetPrevious(Row* value);
30 	Row*				Next() const;
31 	void					SetNext(Row* value);
32 	//~ string				ToString();
33 	void					InsertBefore(Row* row);
34 	void					InsertAfter(Row* row);
35 	Constraint*			HasSameHeightAs(Row* row);
36 	BList*				Constraints() const;
37 	void					SetConstraints(BList* constraints);
38 						~Row();
39 
40 protected:
41 						Row(BALMLayout* ls);
42 
43 protected:
44 	BALMLayout*			fLS;
45 	YTab*				fTop;
46 	YTab*				fBottom;
47 
48 private:
49 	Row*				fPrevious;
50 	Row*				fNext;
51 	Constraint*			fPreviousGlue;
52 	Constraint*			fNextGlue;
53 	BList*				fConstraints;
54 
55 public:
56 	friend class			BALMLayout;
57 
58 };
59 
60 }	// namespace BALM
61 
62 using BALM::Row;
63 
64 #endif	// ROW_H
65