BLayoutBuilder::Base subclass for building BGroupLayouts. More...
Inherits BLayoutBuilder::Base< ParentBuilder >.
Public Types | |
typedef Grid< ThisBuilder > | GridBuilder |
Shorthand for builders returned by this builder's AddGrid() methods. More... | |
typedef Group< ThisBuilder > | GroupBuilder |
Shorthand for builders returned by this builder's AddGroup() methods. More... | |
typedef Split< ThisBuilder > | SplitBuilder |
Shorthand for builders returned by this builder's AddSplit() methods. More... | |
typedef Group< ParentBuilder > | ThisBuilder |
Shorthand representing the type of this . More... | |
Public Member Functions | |
ThisBuilder & | SetInsets (float left, float top, float right, float bottom) |
Call the BTwoDimensionalLayout::SetInsets() method on the BGroupLayout this builder represents. More... | |
Constructors | |
Group (orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) | |
Creates a new BGroupView and targets it. More... | |
Group (BWindow *window, orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) | |
Creates a new BGroupLayout, and attaches it to a BWindow. More... | |
Group (BGroupLayout *layout) | |
Creates a builder targeting a BGroupLayout. More... | |
Group (BGroupView *view) | |
Creates a builder targeting a BGroupView. More... | |
Accessors | |
BGroupLayout * | Layout () const |
Get the BGroupLayout this builder represents. More... | |
BView * | View () const |
Get the BView this builder's BGroupLayout is attached to. More... | |
ThisBuilder & | GetLayout (BGroupLayout **_layout) |
Get the BGroupLayout this builder represents. More... | |
ThisBuilder & | GetView (BView **_view) |
Get the BView this builder's BGroupLayout is attached to. More... | |
operator BGroupLayout * () | |
Cast this builder into the BGroupLayout it represents. More... | |
Adding BViews and BLayoutItems | |
ThisBuilder & | Add (BView *view) |
Add a BView to the BGroupLayout this builder represents. More... | |
ThisBuilder & | Add (BView *view, float weight) |
Add BView to the BGroupLayout this builder represents. More... | |
ThisBuilder & | Add (BLayoutItem *item) |
Add a BLayoutItem to the BGroupLayout this builder represents. More... | |
ThisBuilder & | Add (BLayoutItem *item, float weight) |
Add a BLayoutItem the BGroupLayout this builder represents. 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 | |
GroupBuilder | AddGroup (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Construct and add a viewless BGroupLayout, then return a GroupBuilder representing the newly added layout. More... | |
GroupBuilder | AddGroup (BGroupView *groupView, float weight=1.0f) |
Add BGroupView and return a builder representing the newly added BGroupView. More... | |
GroupBuilder | AddGroup (BGroupLayout *groupLayout, float weight=1.0f) |
Add a BGroupLayout and return a builder representing the newly added BGroupLayout. More... | |
GridBuilder | AddGrid (float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Create and add a viewless BGridLayout, then return a builder representing the newly created BGridLayout. More... | |
GridBuilder | AddGrid (BGridLayout *gridLayout, float weight=1.0f) |
Add a BGridLayout, then return a builder the newly added BGridLayout. More... | |
GridBuilder | AddGrid (BGridView *gridView, float weight=1.0f) |
Add a BGridView, then return a builder the newly added BGridView. More... | |
SplitBuilder | AddSplit (orientation orientation, float spacing=B_USE_DEFAULT_SPACING, float weight=1.0f) |
Create and add a new BSplitView with a weight of weight , then return a SplitBuilder representing the new BSplitView. More... | |
SplitBuilder | AddSplit (BSplitView *splitView, float weight=1.0f) |
Add a BSplitView to the BGroupLayout this builder represents and return a SplitBuilder representing the BSplitView. More... | |
Adding BSpaceLayoutItems | |
Some convenience methods for adding special BSpaceLayoutItems. | |
ThisBuilder & | AddGlue (float weight=1.0f) |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateGlue() to the BGroupLayout this builder represents. More... | |
ThisBuilder & | AddStrut (float size) |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateHorizontalStrut() or BSpaceLayoutItem::CreateVerticalStrut() to the BGroupLayout this builder represents. More... | |
![]() | |
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... | |
BLayoutBuilder::Base subclass for building BGroupLayouts.
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. |
Referenced by BLayoutBuilder::Group< ParentBuilder >::Group().
|
inline |
Creates a new BGroupLayout, and attaches it to a BWindow.
B_PANEL_BACKGROUND_COLOR
. window | Thew 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(), BLayoutBuilder::Group< ParentBuilder >::Group(), BView::HasDefaultColors(), BLayout::Owner(), BWindow::SetLayout(), 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 BView to the BGroupLayout this builder represents.
view | The BView to be added. |
References BGroupLayout::AddView().
|
inline |
Add BView to the BGroupLayout this builder represents.
view | The BView to be added. |
weight | The weight to give view. |
References BGroupLayout::AddView().
|
inline |
Add a BLayoutItem to the BGroupLayout this builder represents.
item | The BLayoutItem to be added. |
References BGroupLayout::AddItem().
|
inline |
Add a BLayoutItem the BGroupLayout this builder represents.
item | The BLayoutItem to be added. |
weight | The weight to give item. |
References BGroupLayout::AddItem().
|
inline |
Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateGlue() to the BGroupLayout this builder represents.
weight | The weight of the BSpaceLayoutItem in the BGroupLayout this builder represents |
References BGroupLayout::AddItem().
|
inline |
Create and add a viewless BGridLayout, then return a builder representing the newly created BGridLayout.
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 BGroupLayout::AddItem().
|
inline |
Add a BGridLayout, then return a builder the newly added BGridLayout.
gridLayout | The BGridLayout to be added and used to construct the returned GridBuilder. |
weight | The weight for groupLayout in the BGroupLayout this builder represents. |
References BGroupLayout::AddItem().
|
inline |
Add a BGridView, then return a builder the newly added BGridView.
gridView | The BGridView to be added and used to construct the returned GridBuilder. |
weight | The weight for groupLayout in the BGroupLayout this builder represents. |
References BGroupLayout::AddItem().
|
inline |
Construct and add a viewless BGroupLayout, then return a GroupBuilder representing the newly added 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 the BGroupLayout this builder represents. |
References BGroupLayout::AddItem(), BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add BGroupView and return a builder representing the newly added BGroupView.
groupView | The BGroupView to be added. |
weight | The weight for groupView in the BGroupLayout this builder represents. |
References BGroupLayout::AddItem(), BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Add a BGroupLayout and return a builder representing the newly added BGroupLayout.
groupLayout | The BGroupLayout to be added. |
weight | The weight for groupLayout in the BGroupLayout this builder represents. |
References BGroupLayout::AddItem(), BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
inline |
Create and add a new BSplitView with a weight of weight
, then 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 BGroupLayout::AddView().
|
inline |
Add a BSplitView to the BGroupLayout this builder represents and return a SplitBuilder representing the BSplitView.
splitView | The BSplitView to be added. |
weight | The weight of the BSplitView in the BGroupLayout this builder represents. |
References BGroupLayout::AddView(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
|
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 BGroupLayout::AddItem(), B_HORIZONTAL, and BGroupLayout::Orientation().
|
inline |
Get the BGroupLayout this builder represents.
[out] | _layout | The BGroupLayout this builder represents. |
|
inline |
Get the BView this builder's BGroupLayout is attached to.
[out] | _view | The BView this builder's BGroupLayout is attached to. |
References BLayout::Owner().
|
inline |
Get the BGroupLayout this builder represents.
Referenced by BLayoutBuilder::Group< ParentBuilder >::AddGroup(), and BLayoutBuilder::Group< ParentBuilder >::operator BGroupLayout *().
|
inline |
Cast this builder into the BGroupLayout it represents.
References BView::AddChild(), BGroupLayout::AddItem(), BMenu::AddItem(), BGroupLayout::AddView(), BView::AdoptSystemColors(), BMenuField::CreateLabelLayoutItem(), BTextControl::CreateLabelLayoutItem(), BMenuField::CreateMenuBarLayoutItem(), BTextControl::CreateTextViewLayoutItem(), BView::HasDefaultColors(), BLayoutBuilder::Group< ParentBuilder >::Layout(), modifiers(), BLayout::Owner(), BMenuItem::SetEnabled(), BAbstractLayout::SetExplicitAlignment(), BLayoutItem::SetExplicitAlignment(), BAbstractLayout::SetExplicitMaxSize(), BAbstractLayout::SetExplicitMinSize(), BAbstractLayout::SetExplicitPreferredSize(), BTwoDimensionalLayout::SetInsets(), BWindow::SetLayout(), BView::SetLayout(), BLayoutBuilder::Base< ParentBuilder >::SetParent(), BGroupLayout::SetSpacing(), and BView::SetViewColor().
|
inline |
Call the BTwoDimensionalLayout::SetInsets() method on the BGroupLayout this builder represents.
References BAbstractLayout::SetExplicitAlignment(), BAbstractLayout::SetExplicitMaxSize(), BAbstractLayout::SetExplicitMinSize(), BAbstractLayout::SetExplicitPreferredSize(), and BTwoDimensionalLayout::SetInsets().
|
inline |
Get the BView this builder's BGroupLayout is attached to.
References BLayout::Owner().