- Implement all Add* function of the BLayout class properly. If the Add* functions of the BLayout class are called add the item to the right upper corner of the previous area. That is at least better than ignore this functions.
- Add more convenience AddViewTo{Right, Left, Top, Bottom} functions to add a item to the sides of an existing area.
- Need to add the Jamfile hack again to include the ViewLayoutItem.h header. I thing about to add the ALMLayout.* files to the interface dir when its a little bit more matured. Then the problem will be solved. Till I made a decision or somebody tell me its a bad idea to add the ALMLayout to the official interface stuff or the ViewLayoutItem.h should be in a shared header dir I will keep this hack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38793 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -38,28 +38,11 @@ public:
|
||||
Column* AddColumn();
|
||||
Column* AddColumn(XTab* left, XTab* right);
|
||||
|
||||
Area* AddArea(XTab* left, YTab* top, XTab* right,
|
||||
YTab* bottom, BView* content);
|
||||
Area* AddArea(Row* row, Column* column,
|
||||
BView* content);
|
||||
Area* AreaOf(BView* control);
|
||||
|
||||
XTab* Left() const;
|
||||
XTab* Right() const;
|
||||
YTab* Top() const;
|
||||
YTab* Bottom() const;
|
||||
|
||||
virtual BSize BaseMinSize();
|
||||
virtual BSize BaseMaxSize();
|
||||
virtual BSize BasePreferredSize();
|
||||
virtual BAlignment BaseAlignment();
|
||||
|
||||
virtual void InvalidateLayout(bool children = false);
|
||||
|
||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||
virtual void DerivedLayoutItems();
|
||||
|
||||
char* PerformancePath() const;
|
||||
void SetPerformancePath(char* path);
|
||||
|
||||
@@ -71,7 +54,60 @@ public:
|
||||
void SetSpacing(float spacing);
|
||||
float Spacing();
|
||||
|
||||
virtual BLayoutItem* AddView(BView* child);
|
||||
virtual BLayoutItem* AddView(int32 index, BView* child);
|
||||
virtual Area* AddView(BView* view, XTab* left, YTab* top,
|
||||
XTab* right, YTab* bottom);
|
||||
virtual Area* AddView(BView* view, Row* row, Column* column);
|
||||
virtual Area* AddViewToRight(BView* view, Area* leftArea,
|
||||
XTab* right = NULL, YTab* top = NULL,
|
||||
YTab* bottom = NULL);
|
||||
virtual Area* AddViewToLeft(BView* view, Area* rightArea,
|
||||
XTab* left = NULL, YTab* top = NULL,
|
||||
YTab* bottom = NULL);
|
||||
virtual Area* AddViewToTop(BView* view, Area* bottomArea,
|
||||
YTab* top = NULL, XTab* left = NULL,
|
||||
XTab* right = NULL);
|
||||
virtual Area* AddViewToBottom(BView* view, Area* topArea,
|
||||
YTab* bottom = NULL, XTab* left = NULL,
|
||||
XTab* right = NULL);
|
||||
|
||||
virtual bool AddItem(BLayoutItem* item);
|
||||
virtual bool AddItem(int32 index, BLayoutItem* item);
|
||||
virtual Area* AddItem(BLayoutItem* item, XTab* left,
|
||||
YTab* top, XTab* right, YTab* bottom);
|
||||
virtual Area* AddItem(BLayoutItem* item, Row* row,
|
||||
Column* column);
|
||||
virtual Area* AddItemToRight(BLayoutItem* item,
|
||||
Area* leftArea, XTab* right = NULL,
|
||||
YTab* top = NULL, YTab* bottom = NULL);
|
||||
virtual Area* AddItemToLeft(BLayoutItem* item,
|
||||
Area* rightArea, XTab* left = NULL,
|
||||
YTab* top = NULL, YTab* bottom = NULL);
|
||||
virtual Area* AddItemToTop(BLayoutItem* item,
|
||||
Area* bottomArea, YTab* top = NULL,
|
||||
XTab* left = NULL, XTab* right = NULL);
|
||||
virtual Area* AddItemToBottom(BLayoutItem* item,
|
||||
Area* topArea, YTab* bottom = NULL,
|
||||
XTab* left = NULL, XTab* right = NULL);
|
||||
|
||||
virtual Area* AreaOf(BView* control);
|
||||
|
||||
virtual BSize BaseMinSize();
|
||||
virtual BSize BaseMaxSize();
|
||||
virtual BSize BasePreferredSize();
|
||||
virtual BAlignment BaseAlignment();
|
||||
|
||||
virtual void InvalidateLayout(bool children = false);
|
||||
|
||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||
virtual void DerivedLayoutItems();
|
||||
|
||||
private:
|
||||
/*! Add a view without initialize the Area. */
|
||||
BLayoutItem* _CreateLayoutItem(BView* view);
|
||||
|
||||
void _SolveLayout();
|
||||
|
||||
Area* _AreaForItem(BLayoutItem* item) const;
|
||||
|
||||
@@ -81,9 +81,8 @@ private:
|
||||
Area(BLayoutItem* item);
|
||||
|
||||
void _Init(LinearSpec* ls, XTab* left, YTab* top,
|
||||
XTab* right, YTab* bottom, BView* content);
|
||||
void _Init(LinearSpec* ls, Row* row, Column* column,
|
||||
BView* content);
|
||||
XTab* right, YTab* bottom);
|
||||
void _Init(LinearSpec* ls, Row* row, Column* column);
|
||||
|
||||
void _DoLayout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user