Public Member Functions | List of all members
BGroupLayoutBuilder Class Reference

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

Public Member Functions

 BGroupLayoutBuilder (BGroupLayout *layout)
 Create a new layout builder that operates on layout. More...
 
 BGroupLayoutBuilder (BGroupView *view)
 Create a new layout builder that operates on view. More...
 
 BGroupLayoutBuilder (orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING)
 Create a new layout builder with a new underlying BGroupLayout. More...
 
BGroupLayoutBuilderAdd (BLayoutItem *item)
 Add a BLayoutItem to the underlying BGroupLayout. More...
 
BGroupLayoutBuilderAdd (BLayoutItem *item, float weight)
 Add a BLayoutItem to the underlying BGroupLayout. More...
 
BGroupLayoutBuilderAdd (BView *view)
 Add a view to the underlying BGroupLayout. More...
 
BGroupLayoutBuilderAdd (BView *view, float weight)
 Add a view to the underlying BGroupLayout. More...
 
BGroupLayoutBuilderAddGlue (float weight=1.0f)
 Set the glue for the top level group. More...
 
BGroupLayoutBuilderAddGroup (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f)
 Add a subgroup to this layout, and return a reference to a builder that works on that subgroup. More...
 
BGroupLayoutBuilderAddStrut (float size)
 Add a strut to the current group. More...
 
BGroupLayoutBuilderEnd ()
 Get a reference to a builder of the parent of the current subgroup. More...
 
BGroupLayoutBuilderGetTopLayout (BGroupLayout **_layout)
 Get a reference to the highest underlying BGroupLayout. More...
 
BGroupLayoutBuilderGetTopView (BView **_view)
 Get a reference to the owning BView. More...
 
 operator BGroupLayout * ()
 Cast the builder to the underlying BGroupLayout. More...
 
BGroupLayoutRootLayout () const
 Get a reference to the closest underlying BGroupLayout. More...
 
BGroupLayoutBuilderSetInsets (float left, float top, float right, float bottom)
 Set the insets of the top level group. More...
 
BGroupLayoutTopLayout () const
 Get a reference to the highest underlying BGroupLayout. More...
 
BViewTopView () const
 Get a reference to the owning BView. More...
 

Detailed Description

Deprecated helper class that helps building a BGroupLayout.

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

This builder supports nested group layouts. See AddGroup() and End().

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

◆ BGroupLayoutBuilder() [1/3]

BGroupLayoutBuilder::BGroupLayoutBuilder ( orientation  orientation = B_HORIZONTAL,
float  spacing = B_USE_DEFAULT_SPACING 
)

Create a new layout builder with a new underlying BGroupLayout.

Parameters
orientationThe orientation of the group.
spacingThe spacing between items.
Since
Haiku R1

◆ BGroupLayoutBuilder() [2/3]

BGroupLayoutBuilder::BGroupLayoutBuilder ( BGroupLayout layout)

Create a new layout builder that operates on layout.

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

◆ BGroupLayoutBuilder() [3/3]

BGroupLayoutBuilder::BGroupLayoutBuilder ( BGroupView view)

Create a new layout builder that operates on view.

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

Member Function Documentation

◆ Add() [1/4]

BGroupLayoutBuilder & BGroupLayoutBuilder::Add ( BLayoutItem item)

Add a BLayoutItem to the underlying BGroupLayout.

Parameters
itemThe BLayoutItem to add.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ Add() [2/4]

BGroupLayoutBuilder & BGroupLayoutBuilder::Add ( BLayoutItem item,
float  weight 
)

Add a BLayoutItem to the underlying BGroupLayout.

Parameters
itemThe BLayoutItem to add.
weightThe weight of this view within the group.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ Add() [3/4]

BGroupLayoutBuilder & BGroupLayoutBuilder::Add ( BView view)

Add a view to the underlying BGroupLayout.

Parameters
viewThe BView to add.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ Add() [4/4]

BGroupLayoutBuilder & BGroupLayoutBuilder::Add ( BView view,
float  weight 
)

Add a view to the underlying BGroupLayout.

Parameters
viewThe BView to add.
weightThe weight of this view within the group.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ AddGlue()

BGroupLayoutBuilder & BGroupLayoutBuilder::AddGlue ( float  weight = 1.0f)

Set the glue for the top level group.

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

◆ AddGroup()

BGroupLayoutBuilder & BGroupLayoutBuilder::AddGroup ( orientation  orientation,
float  spacing = B_USE_DEFAULT_SPACING,
float  weight = 1.0f 
)

Add a subgroup to this layout, and return a reference to a builder that works on that subgroup.

Parameters
orientationThe orientation of the subgroup.
spacingThe spacing between elements of the subgroup.
weightThe weight of the subgroup in the current group.
Returns
The method returns a reference to a builder that works on the newly added group. See End().
Since
Haiku R1

◆ AddStrut()

BGroupLayoutBuilder & BGroupLayoutBuilder::AddStrut ( float  size)

Add a strut to the current group.

Parameters
sizeThe size of the strut.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ End()

BGroupLayoutBuilder & BGroupLayoutBuilder::End ( )

Get a reference to a builder of the parent of the current subgroup.

When you are currently in a subgroup, you may use this method to go back to the higher level layout.

Returns
The method returns a reference to a builder that works on the parent of the current subgroup. If you use this method on a toplevel group, the returned reference will be unchanged from the level that you are currently working on.
Since
Haiku R1

◆ GetTopLayout()

BGroupLayoutBuilder & BGroupLayoutBuilder::GetTopLayout ( BGroupLayout **  _layout)

Get a reference to the highest underlying BGroupLayout.

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

◆ GetTopView()

BGroupLayoutBuilder & BGroupLayoutBuilder::GetTopView ( 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

◆ operator BGroupLayout *()

BGroupLayoutBuilder::operator BGroupLayout * ( )

Cast the builder to the underlying BGroupLayout.

Convenience method for the RootLayout() method.

Since
Haiku R1

◆ RootLayout()

BGroupLayout * BGroupLayoutBuilder::RootLayout ( ) const

Get a reference to the closest underlying BGroupLayout.

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

◆ SetInsets()

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

Set the insets of the top level group.

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

◆ TopLayout()

BGroupLayout * BGroupLayoutBuilder::TopLayout ( ) const

Get a reference to the highest underlying BGroupLayout.

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

◆ TopView()

BView * BGroupLayoutBuilder::TopView ( ) 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