Public Member Functions | List of all members
BSplitLayoutBuilder Class Reference

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

Public Member Functions

 BSplitLayoutBuilder (BSplitView *view)
 Create a new layout builder that operates on an existing view. More...
 
 BSplitLayoutBuilder (orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING)
 Create a new layout builder with an underlying BSplitView. More...
 
BSplitLayoutBuilderAdd (BLayoutItem *item)
 Add a BLayoutItem to the underlying BSplitView. More...
 
BSplitLayoutBuilderAdd (BLayoutItem *item, float weight)
 Add a BLayoutItem to the underlying BSplitView. More...
 
BSplitLayoutBuilderAdd (BView *view)
 Add a view to the underlying BSplitView. More...
 
BSplitLayoutBuilderAdd (BView *view, float weight)
 Add a view to the underlying BSplitView. More...
 
BSplitLayoutBuilderGetSplitView (BSplitView **view)
 Get a reference to the underlying BSplitView. More...
 
 operator BSplitView * ()
 Cast the builder to the underlying BSplitView. More...
 
BSplitLayoutBuilderSetCollapsible (bool collapsible)
 Set the collapsability of the most recently added item. More...
 
BSplitLayoutBuilderSetInsets (float left, float top, float right, float bottom)
 Set the insets of the underlying BSplitView. More...
 
BSplitViewSplitView () const
 Get a reference to the underlying BSplitView. More...
 

Detailed Description

Deprecated helper class that helps building a BSplitView.

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

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

◆ BSplitLayoutBuilder() [1/2]

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

Create a new layout builder with an underlying BSplitView.

Parameters
orientationThe orientation of the split view.
spacingThe spacing of items within the split view.
Since
Haiku R1

◆ BSplitLayoutBuilder() [2/2]

BSplitLayoutBuilder::BSplitLayoutBuilder ( BSplitView view)

Create a new layout builder that operates on an existing view.

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

Member Function Documentation

◆ Add() [1/4]

BSplitLayoutBuilder & BSplitLayoutBuilder::Add ( BLayoutItem item)

Add a BLayoutItem to the underlying BSplitView.

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]

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

Add a BLayoutItem to the underlying BSplitView.

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

◆ Add() [3/4]

BSplitLayoutBuilder & BSplitLayoutBuilder::Add ( BView view)

Add a view to the underlying BSplitView.

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]

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

Add a view to the underlying BSplitView.

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

◆ GetSplitView()

BSplitLayoutBuilder & BSplitLayoutBuilder::GetSplitView ( BSplitView **  view)

Get a reference to the underlying BSplitView.

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

◆ operator BSplitView *()

BSplitLayoutBuilder::operator BSplitView * ( )

Cast the builder to the underlying BSplitView.

Convenience method for the SplitView() method.

Since
Haiku R1

◆ SetCollapsible()

BSplitLayoutBuilder & BSplitLayoutBuilder::SetCollapsible ( bool  collapsible)

Set the collapsability of the most recently added item.

Parameters
collapsibletrue if the item is collapsible, false otherwise.
Returns
The method returns a self reference, so that calls to the builder may be chained.
Since
Haiku R1

◆ SetInsets()

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

Set the insets of the underlying BSplitView.

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

◆ SplitView()

BSplitView * BSplitLayoutBuilder::SplitView ( ) const

Get a reference to the underlying BSplitView.

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