mirror of
https://review.haiku-os.org/haiku
synced 2025-02-19 03:59:11 +01:00
BLayout implementation (BALMLayout) using the Auckland Layout Model (ALM). The original ALM was implemented by Christof Lutteroth, the Haiku/C++ version by James Kim. The code needs some review, but the test programs seem to work fine. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23889 a95241bf-73f2-0310-859d-f6bbb57e9c96
59 lines
921 B
C++
59 lines
921 B
C++
#ifndef ROW_H
|
|
#define ROW_H
|
|
|
|
#include "Constraint.h"
|
|
|
|
#include <List.h>
|
|
|
|
|
|
namespace BALM {
|
|
|
|
class BALMLayout;
|
|
class YTab;
|
|
|
|
/**
|
|
* Represents a row defined by two y-tabs.
|
|
*/
|
|
class Row {
|
|
|
|
public:
|
|
YTab* Top() const;
|
|
YTab* Bottom() const;
|
|
Row* Previous() const;
|
|
void SetPrevious(Row* value);
|
|
Row* Next() const;
|
|
void SetNext(Row* value);
|
|
//~ string ToString();
|
|
void InsertBefore(Row* row);
|
|
void InsertAfter(Row* row);
|
|
Constraint* HasSameHeightAs(Row* row);
|
|
BList* Constraints() const;
|
|
void SetConstraints(BList* constraints);
|
|
~Row();
|
|
|
|
protected:
|
|
Row(BALMLayout* ls);
|
|
|
|
protected:
|
|
BALMLayout* fLS;
|
|
YTab* fTop;
|
|
YTab* fBottom;
|
|
|
|
private:
|
|
Row* fPrevious;
|
|
Row* fNext;
|
|
Constraint* fPreviousGlue;
|
|
Constraint* fNextGlue;
|
|
BList* fConstraints;
|
|
|
|
public:
|
|
friend class BALMLayout;
|
|
|
|
};
|
|
|
|
} // namespace BALM
|
|
|
|
using BALM::Row;
|
|
|
|
#endif // ROW_H
|