1*03069455SIngo Weinhold /* 2*03069455SIngo Weinhold * Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz 3*03069455SIngo Weinhold * Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz 4*03069455SIngo Weinhold * Distributed under the terms of the MIT License. 5*03069455SIngo Weinhold */ 6*03069455SIngo Weinhold 7a101e99aSIngo Weinhold #ifndef COLUMN_H 8a101e99aSIngo Weinhold #define COLUMN_H 9a101e99aSIngo Weinhold 10a101e99aSIngo Weinhold #include "Constraint.h" 11a101e99aSIngo Weinhold 12a101e99aSIngo Weinhold #include <List.h> 13a101e99aSIngo Weinhold 14a101e99aSIngo Weinhold 15a101e99aSIngo Weinhold namespace BALM { 16a101e99aSIngo Weinhold 17a101e99aSIngo Weinhold class BALMLayout; 18a101e99aSIngo Weinhold class XTab; 19a101e99aSIngo Weinhold 20a101e99aSIngo Weinhold /** 21a101e99aSIngo Weinhold * Represents a column defined by two x-tabs. 22a101e99aSIngo Weinhold */ 23a101e99aSIngo Weinhold class Column { 24a101e99aSIngo Weinhold 25a101e99aSIngo Weinhold public: 26a101e99aSIngo Weinhold XTab* Left() const; 27a101e99aSIngo Weinhold XTab* Right() const; 28a101e99aSIngo Weinhold Column* Previous() const; 29a101e99aSIngo Weinhold void SetPrevious(Column* value); 30a101e99aSIngo Weinhold Column* Next() const; 31a101e99aSIngo Weinhold void SetNext(Column* value); 32a101e99aSIngo Weinhold //~ string ToString(); 33a101e99aSIngo Weinhold void InsertBefore(Column* column); 34a101e99aSIngo Weinhold void InsertAfter(Column* column); 35a101e99aSIngo Weinhold Constraint* HasSameWidthAs(Column* column); 36a101e99aSIngo Weinhold BList* Constraints() const; 37a101e99aSIngo Weinhold void SetConstraints(BList* constraints); 38a101e99aSIngo Weinhold ~Column(); 39a101e99aSIngo Weinhold 40a101e99aSIngo Weinhold protected: 41a101e99aSIngo Weinhold Column(BALMLayout* ls); 42a101e99aSIngo Weinhold 43a101e99aSIngo Weinhold protected: 44a101e99aSIngo Weinhold BALMLayout* fLS; 45a101e99aSIngo Weinhold XTab* fLeft; 46a101e99aSIngo Weinhold XTab* fRight; 47a101e99aSIngo Weinhold 48a101e99aSIngo Weinhold private: 49a101e99aSIngo Weinhold Column* fPrevious; 50a101e99aSIngo Weinhold Column* fNext; 51a101e99aSIngo Weinhold Constraint* fPreviousGlue; 52a101e99aSIngo Weinhold Constraint* fNextGlue; 53a101e99aSIngo Weinhold BList* fConstraints; 54a101e99aSIngo Weinhold 55a101e99aSIngo Weinhold public: 56a101e99aSIngo Weinhold friend class BALMLayout; 57a101e99aSIngo Weinhold 58a101e99aSIngo Weinhold }; 59a101e99aSIngo Weinhold 60a101e99aSIngo Weinhold } // namespace BALM 61a101e99aSIngo Weinhold 62a101e99aSIngo Weinhold using BALM::Column; 63a101e99aSIngo Weinhold 64a101e99aSIngo Weinhold #endif // COLUMN_H 65