BLayoutBuilder::Base subclass for building BGroupLayouts. More...
Public Types | |
| 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 | |
| ParentBuilder & | End () |
| Returns this builder's parent. | |
| ThisBuilder & | SetInsets (float left, float top, float right, float bottom) |
| Call the BTwoDimensionalLayout::SetInsets() method on the BGroupLayout this builder represents. | |
| void | SetParent (ParentBuilder *parent) |
Constructors | |
| Group (BGroupLayout *layout) | |
| Creates a builder targeting a BGroupLayout. | |
| Group (BGroupView *view) | |
| Creates a builder targeting a BGroupView. | |
Accessors | |
| BGroupLayout * | Layout () const |
| Get the BGroupLayout this builder represents. | |
| BView * | View () const |
| Get the BView this builder's BGroupLayout is attached to. | |
| ThisBuilder & | GetLayout (BGroupLayout **_layout) |
| Get the BGroupLayout this builder represents. | |
| ThisBuilder & | GetView (BView **_view) |
| Get the BView this builder's BGroupLayout is attached to. | |
| operator BGroupLayout * () | |
| Cast this builder into the BGroupLayout 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 (BGroupView *groupView, float weight=1.0f) |
| Add BGroupView and return a builder representing the newly added BGroupView. | |
| GroupBuilder | AddGroup (BGroupLayout *groupLayout, float weight=1.0f) |
| Add a BGroupLayout and return a builder representing the newly added BGroupLayout. | |
| 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. | |
| GridBuilder | AddGrid (BGridLayout *gridLayout, float weight=1.0f) |
| Add a BGridLayout, then return a builder the newly added BGridLayout. | |
| GridBuilder | AddGrid (BGridView *gridView, float weight=1.0f) |
| Add a BGridView, then return a builder the newly added BGridView. | |
| SplitBuilder | AddSplit (BSplitView *splitView, float weight=1.0f) |
| Add a BSplitView to the BGroupLayout this builder represents and return a SplitBuilder representing the BSplitView. | |
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. | |
| ThisBuilder & | AddStrut (float size) |
| Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateHorizontalStrut() or BSpaceLayoutItem::CreateVerticalStrut() to the BGroupLayout this builder represents. | |
BLayoutBuilder::Base subclass for building BGroupLayouts.
| BLayoutBuilder::Group< ParentBuilder >::Group | ( | BGroupLayout * | layout | ) | [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. |
| BLayoutBuilder::Group< ParentBuilder >::Group | ( | BGroupView * | view | ) | [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. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::Add | ( | BView * | view | ) | [inline] |
Add a BView to the BGroupLayout this builder represents.
| view | The BView to be added. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::Add | ( | BView * | view, |
| float | weight | ||
| ) | [inline] |
Add BView to the BGroupLayout this builder represents.
| view | The BView to be added. |
| weight | The weight to give view. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::Add | ( | BLayoutItem * | item | ) | [inline] |
Add a BLayoutItem to the BGroupLayout this builder represents.
| item | The BLayoutItem to be added. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::Add | ( | BLayoutItem * | item, |
| float | weight | ||
| ) | [inline] |
Add a BLayoutItem the BGroupLayout this builder represents.
| item | The BLayoutItem to be added. |
| weight | The weight to give item. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::AddGlue | ( | float | weight = 1.0f | ) | [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 |
| Group< ParentBuilder >::GridBuilder BLayoutBuilder::Group< ParentBuilder >::AddGrid | ( | float | horizontalSpacing = B_USE_DEFAULT_SPACING, |
| float | verticalSpacing = B_USE_DEFAULT_SPACING, |
||
| float | weight = 1.0f |
||
| ) | [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. |
| Group< ParentBuilder >::GridBuilder BLayoutBuilder::Group< ParentBuilder >::AddGrid | ( | BGridLayout * | gridLayout, |
| float | weight = 1.0f |
||
| ) | [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. |
| Group< ParentBuilder >::GridBuilder BLayoutBuilder::Group< ParentBuilder >::AddGrid | ( | BGridView * | gridView, |
| float | weight = 1.0f |
||
| ) | [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. |
| Group< ParentBuilder >::GroupBuilder BLayoutBuilder::Group< ParentBuilder >::AddGroup | ( | BGroupView * | groupView, |
| float | weight = 1.0f |
||
| ) | [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 BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
| Group< ParentBuilder >::GroupBuilder BLayoutBuilder::Group< ParentBuilder >::AddGroup | ( | BGroupLayout * | groupLayout, |
| float | weight = 1.0f |
||
| ) | [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 BLayoutBuilder::Group< ParentBuilder >::Layout(), and BLayoutBuilder::Base< ParentBuilder >::SetParent().
| Group< ParentBuilder >::SplitBuilder BLayoutBuilder::Group< ParentBuilder >::AddSplit | ( | BSplitView * | splitView, |
| float | weight = 1.0f |
||
| ) | [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. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::AddStrut | ( | float | size | ) | [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.
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::GetLayout | ( | BGroupLayout ** | _layout | ) | [inline] |
Get the BGroupLayout this builder represents.
| [out] | _layout | The BGroupLayout this builder represents. |
| Group< ParentBuilder >::ThisBuilder & BLayoutBuilder::Group< ParentBuilder >::GetView | ( | BView ** | _view | ) | [inline] |
Get the BView this builder's BGroupLayout is attached to.
| [out] | _view | The BView this builder's BGroupLayout is attached to. |
| void BLayoutBuilder::Base< ParentBuilder >::SetParent | ( | ParentBuilder * | parent | ) | [inline, inherited] |
Internal method for use by BLayoutBuilder::Base subclasses, this is essential to the builder stack semantics
Referenced by BLayoutBuilder::Group< ParentBuilder >::AddGroup().