Public Member Functions | List of all members
BGridLayoutBuilder Class Reference

Deprecated helper class that helps building a BGridLayout. More...

Public Member Functions

 BGridLayoutBuilder (BGridLayout *layout)
 Create a new layout builder that operates on a layout. More...
 
 BGridLayoutBuilder (BGridView *view)
 Create a new layout builder that operates on a view. More...
 
 BGridLayoutBuilder (float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING)
 Create a new layout builder with a new underlying BGridLayout. More...
 
BGridLayoutBuilderAdd (BLayoutItem *item, int32 column, int32 row, int32 columnCount=1, int32 rowCount=1)
 Add a BLayoutItem to the underlying BGridLayout. More...
 
BGridLayoutBuilderAdd (BView *view, int32 column, int32 row, int32 columnCount=1, int32 rowCount=1)
 Add a view to the underlying BGridLayout. More...
 
BGridLayoutBuilderGetGridLayout (BGridLayout **_layout)
 Get a reference to the underlying BGridLayout. More...
 
BGridLayoutBuilderGetView (BView **_view)
 Get a reference to the owning BView. More...
 
BGridLayoutGridLayout () const
 Get a reference to the underlying BGridLayout. More...
 
 operator BGridLayout * ()
 Casts the builder to the underlying BGridLayout. More...
 
BGridLayoutBuilderSetColumnWeight (int32 column, float weight)
 Set the weight for column to weight. More...
 
BGridLayoutBuilderSetInsets (float left, float top, float right, float bottom)
 Set the insets for the layout. More...
 
BGridLayoutBuilderSetRowWeight (int32 row, float weight)
 Set the weight of row to weight. More...
 
BViewView () const
 Get a reference to the owning BView. More...
 

Detailed Description

Deprecated helper class that helps building a BGridLayout.

The modern builder can be found in BLayoutBuilder::Grid<>.

Warning
This class is deprecated and should not be used in new projects. It may be removed in newer releases.
Since
Haiku R1

Constructor & Destructor Documentation

◆ BGridLayoutBuilder() [1/3]

BGridLayoutBuilder::BGridLayoutBuilder ( float  horizontal = B_USE_DEFAULT_SPACING,
float  vertical = B_USE_DEFAULT_SPACING 
)

Create a new layout builder with a new underlying BGridLayout.

Parameters
horizontalHorizontal spacing.
verticalVertical Spacing
Since
Haiku R1

◆ BGridLayoutBuilder() [2/3]

BGridLayoutBuilder::BGridLayoutBuilder ( BGridLayout layout)

Create a new layout builder that operates on a layout.

Parameters
layoutThe existing layout you want the builder to alter.
Since
Haiku R1

◆ BGridLayoutBuilder() [3/3]

BGridLayoutBuilder::BGridLayoutBuilder ( BGridView view)

Create a new layout builder that operates on a view.

Parameters
viewThe existing grid view you want the builder to alter.
Since
Haiku R1

Member Function Documentation

◆ Add() [1/2]

BGridLayoutBuilder & BGridLayoutBuilder::Add ( BLayoutItem item,
int32  column,
int32  row,
int32  columnCount = 1,
int32  rowCount = 1 
)

Add a BLayoutItem to the underlying BGridLayout.

Parameters
itemThe BLayoutItem to add.
columnThe column number (zero-index) to use.
rowThe row number (zero-index) to use.
columnCountThe number of columns to span over.
rowCountThe number of rows to span over.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ Add() [2/2]

BGridLayoutBuilder & BGridLayoutBuilder::Add ( BView view,
int32  column,
int32  row,
int32  columnCount = 1,
int32  rowCount = 1 
)

Add a view to the underlying BGridLayout.

Parameters
viewThe BView to add.
columnThe column number (zero-based) to use.
rowThe row number (zero-based) to use.
columnCountThe number of columns to span over.
rowCountThe number of rows to span over.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ GetGridLayout()

BGridLayoutBuilder & BGridLayoutBuilder::GetGridLayout ( BGridLayout **  _layout)

Get a reference to the underlying BGridLayout.

Parameters
[out]_layoutThe variable to store a borrowed pointer to the underlying layout.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ GetView()

BGridLayoutBuilder & BGridLayoutBuilder::GetView ( BView **  _view)

Get a reference to the owning BView.

Parameters
[out]_viewThe variable to store the borrowed pointer to the owning BView.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ GridLayout()

BGridLayout * BGridLayoutBuilder::GridLayout ( ) const

Get a reference to the underlying BGridLayout.

Returns
A borrowed pointer to the current underlaying layout.
Since
Haiku R1

◆ operator BGridLayout *()

BGridLayoutBuilder::operator BGridLayout * ( )

Casts the builder to the underlying BGridLayout.

Convenience method for the GridLayout() method.

Since
Haiku R1

◆ SetColumnWeight()

BGridLayoutBuilder & BGridLayoutBuilder::SetColumnWeight ( int32  column,
float  weight 
)

Set the weight for column to weight.

Parameters
columnThe column to set.
weightThe weight to set.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ SetInsets()

BGridLayoutBuilder & BGridLayoutBuilder::SetInsets ( float  left,
float  top,
float  right,
float  bottom 
)

Set the insets for the layout.

Parameters
leftThe left inset as a float.
topThe top inset as a float.
rightThe right inset as a float.
bottomThe bottom inset as a float.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ SetRowWeight()

BGridLayoutBuilder & BGridLayoutBuilder::SetRowWeight ( int32  row,
float  weight 
)

Set the weight of row to weight.

Parameters
rowThe row number.
weightThe weight to set.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ View()

BView * BGridLayoutBuilder::View ( ) const

Get a reference to the owning BView.

Returns the same BView* as BLayout::Owner(), this method is inherited from BLayoutItem.

Returns
A borrowed pointer to the owning BView.
Since
Haiku R1