BLayoutBuilder::Base subclass for building BGroupLayouts. More...
Inherits BLayoutBuilder::Base< ParentBuilder >.
Public Types | |
typedef Cards< ThisBuilder > | CardBuilder |
Shorthand for builders returned by this builder's AddCards() methods. | |
typedef Grid< ThisBuilder > | GridBuilder |
Shorthand for builders returned by this builder's AddGrid() methods. | |
typedef Group< ThisBuilder > | GroupBuilder |
Shorthand for builders returned by this builder's AddGroup() methods. | |
typedef Split< ThisBuilder > | SplitBuilder |
Shorthand for builders returned by this builder's AddSplit() methods. | |
typedef Group< ParentBuilder > | ThisBuilder |
Shorthand representing the type of this . | |
Public Member Functions | |
Constructors | |
Group (orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) | |
Creates a new BGroupView and targets it. | |
Group (BWindow *window, orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) | |
Creates a new BGroupLayout, and attaches it to a BWindow. | |
Group (BView *view, orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) | |
Creates a builder targeting an existing view. | |
Group (BGroupLayout *layout) | |
Creates a builder targeting a BGroupLayout. | |
Group (BGroupView *view) | |
Creates a builder targeting a BGroupView. | |
Accessors | |
BGroupLayout * | Layout () const |
Get a pointer to the layout this builder represents. | |
BView * | View () const |
Get a pointer to the BView this builder's layout is attached to. | |
ThisBuilder & | GetLayout (BGroupLayout **_layout) |
Get the layout this builder represents. | |
ThisBuilder & | GetView (BView **_view) |
Get a pointer to the BView this builder's layout is attached to. | |
operator BGroupLayout * () | |
Cast this builder into the layout object it represents. | |
Adding BViews and BLayoutItems | |
ThisBuilder & | Add (BView *view) |
Add a BView to the BGroupLayout this builder represents. | |
ThisBuilder & | Add (BView *view, float weight) |
Add BView to the BGroupLayout this builder represents. | |
ThisBuilder & | Add (BLayoutItem *item) |
Add a BLayoutItem to the BGroupLayout this builder represents. | |
ThisBuilder & | Add (BLayoutItem *item, float weight) |
Add a BLayoutItem the BGroupLayout this builder represents. | |
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 | |
GroupBuilder | AddGroup (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Add a new viewless BGroupLayout as a child to the layout that this builder represents and return a GroupBuilder representing the new layout. | |
GroupBuilder | AddGroup (BGroupView *groupView, float weight=1.0f) |
Add an existing BGroupView as a child to the layout that this builder represents and return a GroupBuilder representing the layout of the added groupView. | |
GroupBuilder | AddGroup (BGroupLayout *groupLayout, float weight=1.0f) |
Add an existing BGroupLayout as a child to the layout that this builder represents and return a GroupBuilder to the added layout. | |
GridBuilder | AddGrid (float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Add a new viewless BGridLayout as a child to the layout that this builder represents and return a GridBuilder representing the new layout. | |
GridBuilder | AddGrid (BGridLayout *gridLayout, float weight=1.0f) |
Add an existing BGridLayout as a child to the layout that this builder represents and return a GridBuilder to the added layout. | |
GridBuilder | AddGrid (BGridView *gridView, float weight=1.0f) |
Add an existing BGridView as a child to the layout this builder represents and return a GridBuilder representing the layout of the added gridView. | |
SplitBuilder | AddSplit (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Add a new BSplitView as a child to the layout that this builder represents and return a SplitBuilder representing the new BSplitView. | |
SplitBuilder | AddSplit (BSplitView *splitView, float weight=1.0f) |
Add an existing BSplitView as a child to the layout this builder represents and return a SplitBuilder representing the layout of the added splitView. | |
CardBuilder | AddCards (float weight=1.0f) |
Add a new viewless BCardLayout as a child to the layout that this builder represents and return a CardBuilder representing the new layout. | |
CardBuilder | AddCards (BCardLayout *cardLayout, float weight=1.0f) |
Add an existing BCardLayout as a child to the layout that this builder represents and return a CardBuilder representing the added layout. | |
CardBuilder | AddCards (BCardView *cardView, float weight=1.0f) |
Add an existing BCardView as a child to the layout that this builder represents and return a CardBuilder representing the layout of the added BCardView. | |
Adding BSpaceLayoutItems | |
Some convenience methods for adding special BSpaceLayoutItems. | |
ThisBuilder & | AddGlue (float weight=1.0f) |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateGlue() to the builder's layout. | |
ThisBuilder & | AddStrut (float size) |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateHorizontalStrut() or BSpaceLayoutItem::CreateVerticalStrut() to the BGroupLayout this builder represents. | |
Insets | |
ThisBuilder & | SetInsets (float left, float top, float right, float bottom) |
ThisBuilder & | SetInsets (float horizontal, float vertical) |
ThisBuilder & | SetInsets (float insets) |
Explicit Sizes and Alignment | |
ThisBuilder & | SetExplicitMinSize (BSize size) |
Set the explicit minimum size of the underlying layout. | |
ThisBuilder & | SetExplicitMaxSize (BSize size) |
Set the explicit maximum size of the underlying layout. | |
ThisBuilder & | SetExplicitPreferredSize (BSize size) |
Set the explicit preferred size of the underlying layout. | |
ThisBuilder & | SetExplicitAlignment (BAlignment alignment) |
Set the explicit alignment of the underlying layout. | |
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. | |
BLayoutBuilder::Base subclass for building BGroupLayouts.
BLayoutBuilder::Group< ParentBuilder >::CardBuilder |
Shorthand for builders returned by this builder's AddCards() methods.
BLayoutBuilder::Group< ParentBuilder >::GridBuilder |
Shorthand for builders returned by this builder's AddGrid() methods.
BLayoutBuilder::Group< ParentBuilder >::GroupBuilder |
Shorthand for builders returned by this builder's AddGroup() methods.
BLayoutBuilder::Group< ParentBuilder >::SplitBuilder |
Shorthand for builders returned by this builder's AddSplit() methods.
BLayoutBuilder::Group< ParentBuilder >::ThisBuilder |
Shorthand representing the type of this
.
|
inline |
Creates a new BGroupView and targets it.
Methods called on this builder will be directed to the new BGroupView's BGroupLayout.
orientation | The orientation for the new BGroupView. |
spacing | The spacing for the new BGroupView. |
|
inline |
Creates a new BGroupLayout, and attaches it to a BWindow.
B_PANEL_BACKGROUND_COLOR
. window | The BWindow* to attach the newly created BGroupLayout to. |
orientation | The orientation for the new BGroupLayout. |
spacing | The spacing for the new BGroupLayout. |
References BView::AdoptSystemColors(), BLayout::Owner(), and BWindow::SetLayout().
|
inline |
Creates a builder targeting an existing view.
view | The BView* to attach the newly created BGroupLayout to. |
orientation | The orientation for the new BGroupLayout. |
spacing | The spacing for the new BGroupLayout. |
References BView::AdoptSystemColors(), BView::HasDefaultColors(), and BView::SetLayout().
|
inline |
Creates a builder targeting a BGroupLayout.
Methods called on this builder will be directed to layout.
layout | The BGroupLayout to target with this builder. |
|
inline |
Creates a builder targeting a BGroupView.
Methods called on this builder will be directed to view->GroupLayout()
.
view | The BGroupView this builder will target. |
|
inline |
Add a BLayoutItem to the BGroupLayout this builder represents.
item | The BLayoutItem to be added. |
|
inline |
Add a BLayoutItem the BGroupLayout this builder represents.
item | The BLayoutItem to be added. |
weight | The weight to give item. |
|
inline |
Add a BView to the BGroupLayout this builder represents.
view | The BView to be added. |
|
inline |
Add BView to the BGroupLayout this builder represents.
view | The BView to be added. |
weight | The weight to give view. |
|
inline |
Add an existing BCardLayout as a child to the layout that this builder represents and return a CardBuilder representing the added layout.
cardLayout | The existing layout to add to the current group layout. |
weight | The weight of this new layout within the current group layout. |
References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().
|
inline |
Add an existing BCardView as a child to the layout that this builder represents and return a CardBuilder representing the layout of the added BCardView.
cardView | The existing BCardView to add to the current group layout. |
weight | The weight of this new layout within the current group layout. |
References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().
|
inline |
Add a new viewless BCardLayout as a child to the layout that this builder represents and return a CardBuilder representing the new layout.
weight | The weight of this new layout within the current group layout. |
References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Cards< ParentBuilder >::View().
|
inline |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateGlue() to the builder's layout.
weight | The weight of the BSpaceLayoutItem in the BGroupLayout this builder represents |
References BSpaceLayoutItem::CreateGlue().
|
inline |
Add an existing BGridLayout as a child to the layout that this builder represents and return a GridBuilder to the added layout.
gridLayout | The BGridLayout to be added. |
weight | The weight for gridLayout in the BGroupLayout this builder represents. |
References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add an existing BGridView as a child to the layout this builder represents and return a GridBuilder representing the layout of the added gridView.
gridView | The BGridView to be added. |
weight | The weight for gridView in this BGroupLayout. |
References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add a new viewless BGridLayout as a child to the layout that this builder represents and return a GridBuilder representing the new layout.
horizontalSpacing | The horizontal spacing for the new BGridLayout. |
verticalSpacing | The vertical spacing for the new BGridLayout. |
weight | The weight for the new BGroupLayout in the BGroupLayout this builder represents. |
References BLayoutBuilder::Grid< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add an existing BGroupLayout as a child to the layout that this builder represents and return a GroupBuilder to the added layout.
groupLayout | The BGroupLayout to be added. |
weight | The weight for groupLayout in this group layout. |
References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add an existing BGroupView as a child to the layout that this builder represents and return a GroupBuilder representing the layout of the added groupView.
groupView | The BGroupView to be added. |
weight | The weight for groupView in this group layout. |
References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add a new viewless BGroupLayout as a child to the layout that this builder represents and return a GroupBuilder representing the new layout.
orientation | The orientation to use for the new BGroupLayout. |
spacing | The spacing to use for the new BGroupLayout. |
weight | The weight for the new BGroupLayout in this group layout. |
References BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add an existing BSplitView as a child to the layout this builder represents and return a SplitBuilder representing the layout of the added splitView.
splitView | The BSplitView to be added. |
weight | The weight of the BSplitView in the BGroupLayout this builder represents. |
References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Split< ParentBuilder >::View().
|
inline |
Add a new BSplitView as a child to the layout that this builder represents and return a SplitBuilder representing the new BSplitView.
orientation | The orientation of the new BSplitView. |
spacing | The spacing of the new BSplitView. |
weight | The weight, in this BGroupLayout for the new BSplitView. |
References BLayoutBuilder::Base< ParentBuilder >::SetParent(), and BLayoutBuilder::Split< ParentBuilder >::View().
|
inline |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateHorizontalStrut() or BSpaceLayoutItem::CreateVerticalStrut() to the BGroupLayout this builder represents.
size | The width or height of the strut to be created (depending on the orientation of the BGroupLayout this builder represents). |
References B_HORIZONTAL, BSpaceLayoutItem::CreateHorizontalStrut(), and BSpaceLayoutItem::CreateVerticalStrut().
|
inline |
Get the layout this builder represents.
[out] | _layout | The layout this builder represents. |
|
inline |
|
inline |
Get a pointer to the layout this builder represents.
Referenced by BLayoutBuilder::Grid< ParentBuilder >::AddGroup(), BLayoutBuilder::Cards< ParentBuilder >::AddGroup(), BLayoutBuilder::Group< ParentBuilder >::AddGroup(), and BLayoutBuilder::Split< ParentBuilder >::AddGroup().
|
inline |
Cast this builder into the layout object it represents.
|
inline |
Set the explicit alignment of the underlying layout.
References BLayoutBuilder::Group< ParentBuilder >::SetExplicitAlignment().
Referenced by BLayoutBuilder::Group< ParentBuilder >::SetExplicitAlignment().
|
inline |
Set the explicit maximum size of the underlying layout.
References BLayoutBuilder::Group< ParentBuilder >::SetExplicitMaxSize().
Referenced by BLayoutBuilder::Group< ParentBuilder >::SetExplicitMaxSize().
|
inline |
Set the explicit minimum size of the underlying layout.
References BLayoutBuilder::Group< ParentBuilder >::SetExplicitMinSize().
Referenced by BLayoutBuilder::Group< ParentBuilder >::SetExplicitMinSize().
|
inline |
Set the explicit preferred size of the underlying layout.
References BLayoutBuilder::Group< ParentBuilder >::SetExplicitPreferredSize().
Referenced by BLayoutBuilder::Group< ParentBuilder >::SetExplicitPreferredSize().
|
inline |
Set the insets for this layout.
This is a convenience method to easily set similar insets.
horizontal | The insets to the left and right of the layout. |
vertical | The insets at the top and bottom of the layout. |
References BLayoutBuilder::Group< ParentBuilder >::SetInsets().
|
inline |
Set the insets for this layout.
This is a convenience method that to easily set all the insets of the layout to the same value.
insets | The inset to be applied to left, top, right and bottom of this layout. |
References BLayoutBuilder::Group< ParentBuilder >::SetInsets().
|
inline |
Set the insets for this layout.
Set the spacing around the edges of this layout. If you pass B_USE_DEFAULT_SPACING
for a certain parameter, that parameter will be replaced with the value returned by BControlLook::DefaultItemSpacing().
References BLayoutBuilder::Group< ParentBuilder >::SetInsets().
Referenced by BLayoutBuilder::Group< ParentBuilder >::SetInsets().
|
inline |
Get a pointer to the BView this builder's layout is attached to.