All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Types | List of all members
BLayoutBuilder::Split< ParentBuilder > Class Template Reference

BLayoutBuilder::Base subclass for building BSplitViews. More...

Inherits BLayoutBuilder::Base< ParentBuilder >.

Public Types

typedef Cards< ThisBuilderCardBuilder
 
typedef Grid< ThisBuilderGridBuilder
 
typedef Group< ThisBuilderGroupBuilder
 
typedef Split< ThisBuilderSplitBuilder
 
typedef Split< ParentBuilder > ThisBuilder
 

Public Member Functions

Constructors
 Split (orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING)
 Creates a builder for a new BSplitView.
 
 Split (BSplitView *view)
 Creates a builder for an existing BSplitView.
 
Accessors
BSplitViewView () const
 
ThisBuilderGetView (BView **_view)
 
ThisBuilderGetSplitView (BSplitView **_view)
 Get a pointer to the SplitBView this builder is attached to.
 
 operator BSplitView * ()
 Cast this builder into the layout object it represents.
 
Adding BViews and BLayoutItems
ThisBuilderAdd (BView *view)
 Add a view to the underlying BSplitView.
 
ThisBuilderAdd (BView *view, float weight)
 Add a view with a weight to the underlying BSplitView.
 
ThisBuilderAdd (BLayoutItem *item)
 Add a item to the underlying BSplitView.
 
ThisBuilderAdd (BLayoutItem *item, float weight)
 Add an item with a weight to the underlying BSplitView.
 
Adding BLayouts and their BView Pairs

A set of methods that add a BLayout or BView subclass and return a BLayoutBuilder::Base subclass representing the newly added object. These methods push a new builder on top of the stack, you will not be using this builder again until you call End().

GroupBuilder AddGroup (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f)
 
GroupBuilder AddGroup (BGroupView *groupView, float weight=1.0f)
 
GroupBuilder AddGroup (BGroupLayout *groupLayout, float weight=1.0f)
 
GridBuilder AddGrid (float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING, float weight=1.0f)
 
GridBuilder AddGrid (BGridView *gridView, float weight=1.0f)
 
GridBuilder AddGrid (BGridLayout *gridLayout, float weight=1.0f)
 
SplitBuilder AddSplit (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f)
 
SplitBuilder AddSplit (BSplitView *splitView, float weight=1.0f)
 
CardBuilder AddCards (float weight=1.0f)
 
CardBuilder AddCards (BCardLayout *cardLayout, float weight=1.0f)
 
CardBuilder AddCards (BCardView *cardView, float weight=1.0f)
 
Collapsability of elements
ThisBuilderSetCollapsible (bool collapsible)
 
ThisBuilderSetCollapsible (int32 index, bool collapsible)
 
ThisBuilderSetCollapsible (int32 first, int32 last, bool collapsible)
 
Insets
ThisBuilderSetInsets (float left, float top, float right, float bottom)
 
ThisBuilderSetInsets (float horizontal, float vertical)
 
ThisBuilderSetInsets (float insets)
 
- Public Member Functions inherited from BLayoutBuilder::Base< ParentBuilder >
ParentBuilder & End ()
 Returns this builder's parent.
 
void SetParent (ParentBuilder *parent)
 Internal method for use by BLayoutBuilder::Base subclasses, this is essential to the builder stack semantics.
 

Detailed Description

template<typename ParentBuilder>
class BLayoutBuilder::Split< ParentBuilder >

BLayoutBuilder::Base subclass for building BSplitViews.

Since
Haiku R1

A BSplitView consists of elements, for which in between there are dividers that the user can manipulate to alter the division of space between each of the element.s

For a detailed view on the properties, see the class description.

Member Typedef Documentation

◆ CardBuilder

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::CardBuilder

Shorthand for builders returned by this builder's AddCards() methods.

Since
Haiku R1

◆ GridBuilder

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::GridBuilder

Shorthand for builders returned by this builder's AddGrid() methods.

Since
Haiku R1

◆ GroupBuilder

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::GroupBuilder

Shorthand for builders returned by this builder's AddGroup() methods.

Since
Haiku R1

◆ SplitBuilder

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::SplitBuilder

Shorthand for builders returned by this builder's AddSplit() methods.

Since
Haiku R1

◆ ThisBuilder

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::ThisBuilder

Shorthand representing the type of this.

Since
Haiku R1

Constructor & Destructor Documentation

◆ Split() [1/2]

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::Split ( orientation  orientation = B_HORIZONTAL,
float  spacing = B_USE_DEFAULT_SPACING 
)
inline

Creates a builder for a new BSplitView.

Parameters
orientationThe orientation for the new BSplitView.
spacingThe spacing for the new BSplitView.
Since
Haiku R1

◆ Split() [2/2]

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::Split ( BSplitView view)
inline

Creates a builder for an existing BSplitView.

Parameters
viewThe existing view to operate on.
Since
Haiku R1

Member Function Documentation

◆ Add() [1/4]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::Add ( BLayoutItem item)
inline

Add a item to the underlying BSplitView.

The layout item will be added to the right or the bottom of the existing elements.

Parameters
itemThe BLayoutItem to be added. The underlying BSplitView will take ownership of the object.
See also
BSplitView::Add(BLayoutItem*)
Since
Haiku R1

◆ Add() [2/4]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::Add ( BLayoutItem item,
float  weight 
)
inline

Add an item with a weight to the underlying BSplitView.

The layout item will be added to the right or the bottom of the existing elements.

Parameters
itemThe BLayoutItem to be added. The underlying BSplitView will take ownership of the object.
weightThe weight of the item.
See also
BSplitView::Add(BLayoutItem*, float)
Since
Haiku R1

◆ Add() [3/4]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::Add ( BView view)
inline

Add a view to the underlying BSplitView.

The view will be added to the right or the bottom of the existing elements.

Parameters
viewThe BView to be added. The underlying BSplitView will take ownership of the object.
See also
BSplitView::Add(BView*)
Since
Haiku R1

◆ Add() [4/4]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::Add ( BView view,
float  weight 
)
inline

Add a view with a weight to the underlying BSplitView.

The view will be added to the right or the bottom of the existing elements.

Parameters
viewThe BView to be added. The underlying BSplitView will take ownership of the object.
weightThe weight of the view.
See also
BSplitView::Add(BView*, float)
Since
Haiku R1

◆ AddCards() [1/3]

template<typename ParentBuilder >
Split< ParentBuilder >::CardBuilder BLayoutBuilder::Split< ParentBuilder >::AddCards ( BCardLayout cardLayout,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddCards( BCardLayout* cardLayout, float weight)

Parameters
cardLayoutThe existing layout that will be added to the underlying BSplitView.
weightThe weight of the BCardLayout in the BSplitView this builder represents.
Returns
A CardBuilder representing the cardLayout.
Since
Haiku R1

References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().

◆ AddCards() [2/3]

template<typename ParentBuilder >
Split< ParentBuilder >::CardBuilder BLayoutBuilder::Split< ParentBuilder >::AddCards ( BCardView cardView,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddCards( BCardView* cardView, float weight)

Parameters
cardViewThe existing view that will be added to the underlying BSplitView.
weightThe weight of the BCardLayout in the BSplitView this builder represents.
Returns
A CardBuilder representing the layout of t he cardView.
Since
Haiku R1

References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().

◆ AddCards() [3/3]

template<typename ParentBuilder >
Split< ParentBuilder >::CardBuilder BLayoutBuilder::Split< ParentBuilder >::AddCards ( float  weight = 1.0f)
inline

BLayoutBuilder::Group<ParentBuilder>::AddCards( float weight)

Parameters
weightThe weight of the BCardLayout in the BSplitView this builder represents.
Returns
A CardBuilder representing the new BCardLayout.
Since
Haiku R1

References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().

◆ AddGrid() [1/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GridBuilder BLayoutBuilder::Split< ParentBuilder >::AddGrid ( BGridLayout gridLayout,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGrid( BGridLayout* gridLayout, float weight)

Parameters
gridLayoutThe BGridLayout to be added and used to construct the returned GridBuilder.
weightThe weight for gridLayout in the BSplitView this builder represents.
Returns
A GridBuilder representing the gridLayout.
Since
Haiku R1

References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddGrid() [2/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GridBuilder BLayoutBuilder::Split< ParentBuilder >::AddGrid ( BGridView gridView,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGrid( BGridView* gridView, float weight)

Parameters
gridViewThe BGridView to be added and used to construct the returned GridBuilder.
weightThe weight for gridView in the BSplitView this builder represents.
Returns
A GridBuilder representing the layout of the gridView.
Since
Haiku R1

References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddGrid() [3/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GridBuilder BLayoutBuilder::Split< ParentBuilder >::AddGrid ( float  horizontalSpacing = B_USE_DEFAULT_SPACING,
float  verticalSpacing = B_USE_DEFAULT_SPACING,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGrid( float horizontalSpacing, float verticalSpacing, float weight)

Shorthand for builders returned by this builder's AddGrid() methods.

Since
Haiku R1 BLayoutBuilder::Group<ParentBuilder>::AddGrid( float horizontalSpacing, float verticalSpacing, float weight)
Parameters
horizontalSpacingThe horizontal spacing for the new BGridLayout.
verticalSpacingThe vertical spacing for the new BGridLayout.
weightThe weight for the new BGridLayout in the BSplitView this builder represents.
Returns
A GridBuilder representing the newly created BGridLayout.
Since
Haiku R1

References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddGroup() [1/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GroupBuilder BLayoutBuilder::Split< ParentBuilder >::AddGroup ( BGroupLayout groupLayout,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGroup( BGroupLayout* groupLayout, float weight)

Parameters
groupLayoutThe BGroupLayout to be added.
weightThe weight for groupLayout in the BGroupLayout this builder represents.
Returns
A GroupBuilder representing the groupLayout.
Since
Haiku R1

References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddGroup() [2/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GroupBuilder BLayoutBuilder::Split< ParentBuilder >::AddGroup ( BGroupView groupView,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView* groupView, float weight)

Parameters
groupViewThe BGroupView to be added.
weightThe weight for groupView in the BGroupLayout this builder represents.
Returns
A GroupBuilder representing the layout of the groupView.
Since
Haiku R1

References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddGroup() [3/3]

template<typename ParentBuilder >
Split< ParentBuilder >::GroupBuilder BLayoutBuilder::Split< ParentBuilder >::AddGroup ( orientation  orientation,
float  spacing = B_USE_DEFAULT_SPACING,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddGroup( orientation orientation, float spacing, float weight)

Parameters
orientationThe orientation to use for the new BGroupLayout.
spacingThe spacing to use for the new BGroupLayout.
weightThe weight for the new BGroupLayout in the BGroupLayout this builder represents.
Returns
A GroupBuilder representing the newly created BGroupLayout.
Since
Haiku R1

References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().

◆ AddSplit() [1/2]

template<typename ParentBuilder >
SplitBuilder BLayoutBuilder::Split< ParentBuilder >::AddSplit ( BSplitView splitView,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddSplit( BSplitView* splitView, float weight)

Parameters
splitViewThe BSplitView to be added.
weightThe weight of the BSplitView in the BSplitView this builder represents.
Returns
A SplitBuilder representing the splitView.
Since
Haiku R1

◆ AddSplit() [2/2]

template<typename ParentBuilder >
Split< ParentBuilder >::SplitBuilder BLayoutBuilder::Split< ParentBuilder >::AddSplit ( orientation  orientation,
float  spacing = B_USE_DEFAULT_SPACING,
float  weight = 1.0f 
)
inline

BLayoutBuilder::Group<ParentBuilder>::AddSplit( orientation orientation, float spacing, float weight)

Parameters
orientationThe orientation of the new BSplitView.
spacingThe spacing of the new BSplitView.
weightThe weight, in this BSplitView for the new BSplitView.
Returns
A SplitBuilder representing the new BSplitView.
Since
Haiku R1

References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Split< ParentBuilder >::View().

◆ GetSplitView()

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::GetSplitView ( BSplitView **  _view)
inline

Get a pointer to the SplitBView this builder is attached to.

Parameters
[out]_viewThe BSplitView this builder' is attached to.

◆ GetView()

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::GetView ( BView **  _view)
inline

Get a pointer to the BView this builder's layout is attached to.

Parameters
[out]_viewThe BView this builder's layout is attached to.
Since
Haiku R1

◆ operator BSplitView *()

template<typename ParentBuilder >
BLayoutBuilder::Split< ParentBuilder >::operator BSplitView *
inline

Cast this builder into the layout object it represents.

Since
Haiku R1

◆ SetCollapsible() [1/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetCollapsible ( bool  collapsible)
inline

Set the whether all the layout items in this view are collapsible.

Parameters
collapsibletrue if all items in this layout are collapsible, false if they are not.
Since
Haiku R1
See also
BSplitView::SetCollapsible(bool)

References BLayoutBuilder::Split< ParentBuilder >::SetCollapsible().

Referenced by BLayoutBuilder::Split< ParentBuilder >::SetCollapsible().

◆ SetCollapsible() [2/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetCollapsible ( int32  first,
int32  last,
bool  collapsible 
)
inline

Set whether the items from first to last are collapsible.

Parameters
firstThe index of the first item that you want the setting to apply to (zero-based).
lastThe index of the last item that you want the setting to apply to (zero-based).
collapsibletrue if the user may collaps the item, false if they may not.
Since
Haiku R1
See also
BSplitView::SetCollapsible(int32, int32, bool)

References BLayoutBuilder::Split< ParentBuilder >::SetCollapsible().

◆ SetCollapsible() [3/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetCollapsible ( int32  index,
bool  collapsible 
)
inline

Set whether the item at index is collapsible.

Parameters
indexThe index of the item (zero-based).
collapsibletrue if the user may collaps the item, false if they may not.
Since
Haiku R1
See also
BSplitView::SetCollapsible(int32, bool)

References BLayoutBuilder::Split< ParentBuilder >::SetCollapsible().

◆ SetInsets() [1/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetInsets ( float  horizontal,
float  vertical 
)
inline

Set the insets between the bounds of the view and the inner elements.

Parameters
horizontalThe left and right inset.
verticalThe top and bottom inset.
Since
Haiku R1
See also
BSplitView::SetInsets(float, float)

References BLayoutBuilder::Split< ParentBuilder >::SetInsets().

◆ SetInsets() [2/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetInsets ( float  insets)
inline

Set the insets between the bounds of the view and the inner elements.

Parameters
insetsThe value for the left, top, right and bottom inset.
Since
Haiku R1
See also
BSplitView::SetInsets(float)

References BLayoutBuilder::Split< ParentBuilder >::SetInsets().

◆ SetInsets() [3/3]

template<typename ParentBuilder >
Split< ParentBuilder >::ThisBuilder & BLayoutBuilder::Split< ParentBuilder >::SetInsets ( float  left,
float  top,
float  right,
float  bottom 
)
inline

Set the insets between the bounds of the view and the inner elements.

Parameters
leftThe left inset.
topThe top inset.
rightThe right inset.
bottomThe bottom inset.
Since
Haiku R1
See also
BSplitView::SetInsets(float, float, float, float)

References BLayoutBuilder::Split< ParentBuilder >::SetInsets().

Referenced by BLayoutBuilder::Split< ParentBuilder >::SetInsets().

◆ View()

template<typename ParentBuilder >
BSplitView * BLayoutBuilder::Split< ParentBuilder >::View
inline