2006-08-26 20:21:15 +04:00
|
|
|
/*
|
2009-08-27 15:12:41 +04:00
|
|
|
* Copyright 2006, Haiku, Inc. All rights reserved.
|
2006-08-26 20:21:15 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _GRID_LAYOUT_BUILDER_H
|
|
|
|
#define _GRID_LAYOUT_BUILDER_H
|
|
|
|
|
|
|
|
#include <GridView.h>
|
|
|
|
|
|
|
|
class BGridLayoutBuilder {
|
|
|
|
public:
|
2010-09-03 02:58:24 +04:00
|
|
|
BGridLayoutBuilder(float horizontal
|
|
|
|
= B_USE_DEFAULT_SPACING,
|
|
|
|
float vertical = B_USE_DEFAULT_SPACING);
|
2006-08-26 20:21:15 +04:00
|
|
|
BGridLayoutBuilder(BGridLayout* layout);
|
|
|
|
BGridLayoutBuilder(BGridView* view);
|
|
|
|
|
|
|
|
BGridLayout* GridLayout() const;
|
|
|
|
BGridLayoutBuilder& GetGridLayout(BGridLayout** _layout);
|
2010-08-17 22:43:41 +04:00
|
|
|
BView* View() const;
|
|
|
|
BGridLayoutBuilder& GetView(BView** _view);
|
2006-08-26 20:21:15 +04:00
|
|
|
|
|
|
|
BGridLayoutBuilder& Add(BView* view, int32 column, int32 row,
|
|
|
|
int32 columnCount = 1, int32 rowCount = 1);
|
|
|
|
BGridLayoutBuilder& Add(BLayoutItem* item, int32 column, int32 row,
|
|
|
|
int32 columnCount = 1, int32 rowCount = 1);
|
|
|
|
|
|
|
|
BGridLayoutBuilder& SetColumnWeight(int32 column, float weight);
|
|
|
|
BGridLayoutBuilder& SetRowWeight(int32 row, float weight);
|
|
|
|
|
2007-01-31 23:30:20 +03:00
|
|
|
BGridLayoutBuilder& SetInsets(float left, float top, float right,
|
|
|
|
float bottom);
|
|
|
|
|
2006-08-26 20:21:15 +04:00
|
|
|
operator BGridLayout*();
|
|
|
|
|
|
|
|
private:
|
|
|
|
BGridLayout* fLayout;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _GRID_LAYOUT_BUILDER_H
|