Public Types | List of all members
BLayoutBuilder::Cards< ParentBuilder > Class Template Reference

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

Inherits BLayoutBuilder::Base< ParentBuilder >.

Public Types

typedef Cards< ThisBuilderCardBuilder
 Shorthand for builders returned by this builder's AddCards() methods. More...
 
typedef Grid< ThisBuilderGridBuilder
 Shorthand for builders returned by this builder's AddGrid() methods. More...
 
typedef Group< ThisBuilderGroupBuilder
 Shorthand for builders returned by this builder's AddGroup() methods. More...
 
typedef Split< ThisBuilderSplitBuilder
 Shorthand for builders returned by this builder's AddSplit() methods. More...
 
typedef Cards< ParentBuilder > ThisBuilder
 Shorthand representing the type of this. More...
 

Public Member Functions

Constructors
 Cards ()
 Creates a builder for BCardLayout. More...
 
 Cards (BWindow *window)
 Creates a new builder for BCardLayout, and attaches it to a window. More...
 
 Cards (BView *view)
 Creates a new builder for BCardLayout, and attaches it to a view. More...
 
 Cards (BCardLayout *layout)
 Creates a builder targeting an existing BCardLayout. More...
 
 Cards (BCardView *view)
 Creates a builder targeting an existing BCardView. More...
 
Accessors
BCardLayoutLayout () const
 Get a pointer to the layout this builder represents. More...
 
BViewView () const
 Get a pointer to the BView this builder's layout is attached to. More...
 
ThisBuilderGetLayout (BCardLayout **_layout)
 Get the layout this builder represents. More...
 
ThisBuilderGetView (BView **_view)
 Get a pointer to the BView this builder's layout is attached to. More...
 
 operator BCardLayout * ()
 Cast this builder into the layout object it represents. More...
 
Adding BViews and BLayoutItems
ThisBuilderAdd (BView *view)
 Add a view to the underlying BCardLayout. More...
 
ThisBuilderAdd (BLayoutItem *item)
 Add a item to the underlying BCardLayout. More...
 
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)
 
GroupBuilder AddGroup (BGroupView *groupView)
 
GroupBuilder AddGroup (BGroupLayout *groupLayout)
 
GridBuilder AddGrid (float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING)
 Shorthand for builders returned by this builder's AddGrid() methods. BLayoutBuilder::Group<ParentBuilder>::AddGrid( More...
 
GridBuilder AddGrid (BGridLayout *gridLayout)
 
GridBuilder AddGrid (BGridView *gridView)
 
SplitBuilder AddSplit (orientation orientation, float spacing=B_USE_DEFAULT_SPACING)
 
SplitBuilder AddSplit (BSplitView *splitView)
 
CardBuilder AddCards ()
 
CardBuilder AddCards (BCardLayout *cardLayout)
 
CardBuilder AddCards (BCardView *cardView)
 
Explicit Sizes and Alignment
ThisBuilderSetExplicitMinSize (BSize size)
 Set the explicit minimum size of the underlying layout. More...
 
ThisBuilderSetExplicitMaxSize (BSize size)
 Set the explicit maximum size of the underlying layout. More...
 
ThisBuilderSetExplicitPreferredSize (BSize size)
 Set the explicit preferred size of the underlying layout. More...
 
ThisBuilderSetExplicitAlignment (BAlignment alignment)
 Set the explicit alignment of the underlying layout. More...
 
Visible Item
ThisBuilderSetVisibleItem (int32 index)
 Set the current visible item to the item at index. More...
 
- Public Member Functions inherited from BLayoutBuilder::Base< ParentBuilder >
ParentBuilder & End ()
 Returns this builder's parent. More...
 
void SetParent (ParentBuilder *parent)
 Internal method for use by BLayoutBuilder::Base subclasses, this is essential to the builder stack semantics. More...
 

Detailed Description

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

BLayoutBuilder::Base subclass for building BCardLayouts.

Since
Haiku R1

The BCardLayout class is a simple BLayout subclass that arranges the items as a stack of cards with only one card being on top and visible to the user.

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

Member Typedef Documentation

◆ CardBuilder

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

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

Since
Haiku R1

◆ GridBuilder

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

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

Since
Haiku R1

◆ GroupBuilder

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

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

Since
Haiku R1

◆ SplitBuilder

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

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

Since
Haiku R1

◆ ThisBuilder

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

Shorthand representing the type of this.

Since
Haiku R1

Constructor & Destructor Documentation

◆ Cards() [1/5]

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::Cards ( )
inline

Creates a builder for BCardLayout.

Since
Haiku R1

◆ Cards() [2/5]

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::Cards ( BWindow window)
inline

Creates a new builder for BCardLayout, and attaches it to a window.

Since
Haiku R1

References BLayout::Owner(), BWindow::SetLayout(), and BView::SetViewColor().

◆ Cards() [3/5]

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::Cards ( BView view)
inline

Creates a new builder for BCardLayout, and attaches it to a view.

Since
Haiku R1

References BView::SetLayout(), and BView::SetViewColor().

◆ Cards() [4/5]

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::Cards ( BCardLayout layout)
inline

Creates a builder targeting an existing BCardLayout.

Since
Haiku R1

◆ Cards() [5/5]

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::Cards ( BCardView view)
inline

Creates a builder targeting an existing BCardView.

Since
Haiku R1

Member Function Documentation

◆ Add() [1/2]

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

Add a item to the underlying BCardLayout.

The layout item will be added as a card at the end of the stack.

Parameters
itemThe BLayoutItem to be added. The underlying BCardLayout will take ownership of the object.
Since
Haiku R1

◆ Add() [2/2]

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

Add a view to the underlying BCardLayout.

The layout item will be added as a card at the end of the stack.

Parameters
viewThe BView to be added. The underlying BCardLayout will take ownership of the object.
Since
Haiku R1

◆ AddCards() [1/3]

template<typename ParentBuilder >
Cards< ParentBuilder >::CardBuilder BLayoutBuilder::Cards< ParentBuilder >::AddCards ( )
inline

Shorthand for builders returned by this builder's AddCards() methods. BLayoutBuilder::Group<ParentBuilder>::AddCards( float weight)

Returns
A CardBuilder representing the new BCardLayout.
Since
Haiku R1

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

◆ AddCards() [2/3]

template<typename ParentBuilder >
Cards< ParentBuilder >::CardBuilder BLayoutBuilder::Cards< ParentBuilder >::AddCards ( BCardLayout cardLayout)
inline

Shorthand for builders returned by this builder's AddCards() methods. BLayoutBuilder::Group<ParentBuilder>::AddCards( BCardLayout* cardLayout, float weight)

Parameters
cardLayoutThe existing layout that will be added to the underlying BSplitView.
Returns
A CardBuilder representing the cardLayout.
Since
Haiku R1

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

◆ AddCards() [3/3]

template<typename ParentBuilder >
Cards< ParentBuilder >::CardBuilder BLayoutBuilder::Cards< ParentBuilder >::AddCards ( BCardView cardView)
inline

Shorthand for builders returned by this builder's AddCards() methods. BLayoutBuilder::Group<ParentBuilder>::AddCards( BCardView* cardView, float weight)

Parameters
cardViewThe existing view that will be added to the underlying BSplitView.
Returns
A CardBuilder representing the layout of t he cardView.
Since
Haiku R1

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

◆ AddGrid() [1/3]

template<typename ParentBuilder >
Cards< ParentBuilder >::GridBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGrid ( BGridLayout gridLayout)
inline

Shorthand for builders returned by this builder's AddGrid() methods. BLayoutBuilder::Group<ParentBuilder>::AddGrid( BGridLayout* gridLayout, float weight)

Parameters
gridLayoutThe BGridLayout to be added and used to construct the returned GridBuilder.
Returns
A GridBuilder representing gridLayout.
Since
Haiku R1

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

◆ AddGrid() [2/3]

template<typename ParentBuilder >
Cards< ParentBuilder >::GridBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGrid ( BGridView gridView)
inline

Shorthand for builders returned by this builder's AddGrid() methods. BLayoutBuilder::Group<ParentBuilder>::AddGrid( BGridView* gridView, float weight)

Parameters
gridViewThe BGridView to be added and used to construct the returned GridBuilder.
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 >
Cards< ParentBuilder >::GridBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGrid ( float  horizontalSpacing = B_USE_DEFAULT_SPACING,
float  verticalSpacing = B_USE_DEFAULT_SPACING 
)
inline

Shorthand for builders returned by this builder's AddGrid() methods. BLayoutBuilder::Group<ParentBuilder>::AddGrid(

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.
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 >
Cards< ParentBuilder >::GroupBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGroup ( BGroupLayout groupLayout)
inline

Shorthand for builders returned by this builder's AddGroup() methods. BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView* groupView, float weight)

Parameters
groupLayoutThe BGroupLayout to be added.
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 >
Cards< ParentBuilder >::GroupBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGroup ( BGroupView groupView)
inline

Shorthand for builders returned by this builder's AddGroup() methods. BLayoutBuilder::Group<ParentBuilder>::AddGroup( BGroupLayout* groupLayout, float weight)

Parameters
groupViewThe BGroupView to be added.
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 >
Cards< ParentBuilder >::GroupBuilder BLayoutBuilder::Cards< ParentBuilder >::AddGroup ( orientation  orientation,
float  spacing = B_USE_DEFAULT_SPACING 
)
inline

Shorthand for builders returned by this builder's AddGroup() methods. 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.
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 >
Cards< ParentBuilder >::SplitBuilder BLayoutBuilder::Cards< ParentBuilder >::AddSplit ( BSplitView splitView)
inline

Shorthand for builders returned by this builder's AddSplit() methods. BLayoutBuilder::Group<ParentBuilder>::AddSplit( BSplitView* splitView, float weight)

Parameters
splitViewThe BSplitView to be added.
Returns
A SplitBuilder representing the splitView.
Since
Haiku R1

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

◆ AddSplit() [2/2]

template<typename ParentBuilder >
Cards< ParentBuilder >::SplitBuilder BLayoutBuilder::Cards< ParentBuilder >::AddSplit ( orientation  orientation,
float  spacing = B_USE_DEFAULT_SPACING 
)
inline

Shorthand for builders returned by this builder's AddSplit() methods. BLayoutBuilder::Group<ParentBuilder>::AddSplit( orientation orientation, float spacing, float weight)

Parameters
orientationThe orientation of the new BSplitView.
spacingThe spacing of the new BSplitView.
Returns
A SplitBuilder representing the new BSplitView.
Since
Haiku R1

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

◆ GetLayout()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::GetLayout ( BCardLayout **  _layout)
inline

Get the layout this builder represents.

Parameters
[out]_layoutThe layout this builder represents.
Since
Haiku R1

◆ GetView()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< 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

◆ Layout()

template<typename ParentBuilder >
BCardLayout * BLayoutBuilder::Cards< ParentBuilder >::Layout ( ) const
inline

Get a pointer to the layout this builder represents.

Since
Haiku R1

◆ operator BCardLayout *()

template<typename ParentBuilder >
BLayoutBuilder::Cards< ParentBuilder >::operator BCardLayout * ( )
inline

Cast this builder into the layout object it represents.

Since
Haiku R1

◆ SetExplicitAlignment()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::SetExplicitAlignment ( BAlignment  alignment)
inline

Set the explicit alignment of the underlying layout.

Since
Haiku R1

References BLayoutBuilder::Cards< ParentBuilder >::SetExplicitAlignment().

Referenced by BLayoutBuilder::Cards< ParentBuilder >::SetExplicitAlignment().

◆ SetExplicitMaxSize()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMaxSize ( BSize  size)
inline

Set the explicit maximum size of the underlying layout.

Since
Haiku R1

References BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMaxSize().

Referenced by BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMaxSize().

◆ SetExplicitMinSize()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMinSize ( BSize  size)
inline

Set the explicit minimum size of the underlying layout.

Since
Haiku R1

References BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMinSize().

Referenced by BLayoutBuilder::Cards< ParentBuilder >::SetExplicitMinSize().

◆ SetExplicitPreferredSize()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::SetExplicitPreferredSize ( BSize  size)
inline

Set the explicit preferred size of the underlying layout.

Since
Haiku R1

References BLayoutBuilder::Cards< ParentBuilder >::SetExplicitPreferredSize().

Referenced by BLayoutBuilder::Cards< ParentBuilder >::SetExplicitPreferredSize().

◆ SetVisibleItem()

template<typename ParentBuilder >
Cards< ParentBuilder >::ThisBuilder & BLayoutBuilder::Cards< ParentBuilder >::SetVisibleItem ( int32  index)
inline

◆ View()

template<typename ParentBuilder >
BView * BLayoutBuilder::Cards< ParentBuilder >::View ( ) const
inline