2008-02-25 04:54:05 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz
|
|
|
|
* Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
|
2008-02-06 13:51:44 +03:00
|
|
|
#ifndef ROW_H
|
|
|
|
#define ROW_H
|
|
|
|
|
|
|
|
#include <List.h>
|
|
|
|
|
2010-09-21 02:47:13 +04:00
|
|
|
#include "Constraint.h"
|
|
|
|
#include "LinearSpec.h"
|
|
|
|
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
namespace BALM {
|
|
|
|
|
|
|
|
class BALMLayout;
|
|
|
|
class YTab;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a row defined by two y-tabs.
|
|
|
|
*/
|
|
|
|
class Row {
|
|
|
|
public:
|
2010-09-21 02:47:13 +04:00
|
|
|
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();
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
protected:
|
2010-09-21 02:47:13 +04:00
|
|
|
Row(LinearSpec* ls);
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
protected:
|
2010-09-21 02:47:13 +04:00
|
|
|
LinearSpec* fLS;
|
|
|
|
YTab* fTop;
|
|
|
|
YTab* fBottom;
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
private:
|
2010-09-21 02:47:13 +04:00
|
|
|
Row* fPrevious;
|
|
|
|
Row* fNext;
|
|
|
|
Constraint* fPreviousGlue;
|
|
|
|
Constraint* fNextGlue;
|
|
|
|
BList* fConstraints;
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
friend class BALMLayout;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace BALM
|
|
|
|
|
|
|
|
using BALM::Row;
|
|
|
|
|
|
|
|
#endif // ROW_H
|