2008-02-25 04:54:05 +03:00
|
|
|
/*
|
2010-09-22 03:31:50 +04:00
|
|
|
* Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
|
2008-02-25 04:54:05 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2008-02-06 13:51:44 +03:00
|
|
|
#ifndef COLUMN_H
|
|
|
|
#define COLUMN_H
|
|
|
|
|
2010-09-23 01:53:32 +04:00
|
|
|
|
2010-09-21 02:47:13 +04:00
|
|
|
#include "Constraint.h"
|
|
|
|
#include "LinearSpec.h"
|
2010-10-06 00:15:55 +04:00
|
|
|
#include "Tab.h"
|
2010-09-21 02:47:13 +04:00
|
|
|
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
namespace BALM {
|
|
|
|
|
|
|
|
class BALMLayout;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a column defined by two x-tabs.
|
|
|
|
*/
|
|
|
|
class Column {
|
|
|
|
public:
|
2010-09-29 07:30:47 +04:00
|
|
|
~Column();
|
|
|
|
|
2010-09-21 02:47:13 +04:00
|
|
|
XTab* Left() const;
|
|
|
|
XTab* Right() const;
|
|
|
|
Column* Previous() const;
|
2010-09-29 07:30:47 +04:00
|
|
|
void SetPrevious(Column* value);
|
2010-09-21 02:47:13 +04:00
|
|
|
Column* Next() const;
|
2010-09-29 07:30:47 +04:00
|
|
|
void SetNext(Column* value);
|
|
|
|
|
|
|
|
void InsertBefore(Column* column);
|
|
|
|
void InsertAfter(Column* column);
|
2010-09-21 02:47:13 +04:00
|
|
|
Constraint* HasSameWidthAs(Column* column);
|
2010-09-29 07:30:47 +04:00
|
|
|
|
|
|
|
ConstraintList* Constraints() const;
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
protected:
|
2010-10-06 00:15:55 +04:00
|
|
|
Column(BALMLayout* layout);
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
protected:
|
2010-09-21 02:47:13 +04:00
|
|
|
LinearSpec* fLS;
|
|
|
|
XTab* fLeft;
|
|
|
|
XTab* fRight;
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
private:
|
2010-09-21 02:47:13 +04:00
|
|
|
Column* fPrevious;
|
|
|
|
Column* fNext;
|
|
|
|
Constraint* fPreviousGlue;
|
|
|
|
Constraint* fNextGlue;
|
2010-09-29 07:30:47 +04:00
|
|
|
ConstraintList fConstraints;
|
2008-02-06 13:51:44 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
friend class BALMLayout;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace BALM
|
|
|
|
|
|
|
|
using BALM::Column;
|
|
|
|
|
|
|
|
#endif // COLUMN_H
|