HaikuBook: add remaining layout class documentation

This is the final contribution to #15368

* Tried to share more documentation in the various BLayoutBuilder classes
* Add missing GridView, GroupView, SpaceLayoutItem
* Also added AbstractLayoutItem, but hide the actual documentation behind
  an `INTERNAL` conditional block. This block identifier can be used to
  document parts of the API, to then hide them during a regular Doxygen run.
* Do some cleanup on other layout classes; add missing members, etc.
* The actual generated BLayoutBuilder::* html is a mess. I should investigate
  this at a later time. Especially the copied members seem to mix type
  definitions with member documentation. It is odd. Not unlikely to be a
  Doxygen bug.
* The general documentation for the layout system could use an overhaul as
  well, but this is for later.

Change-Id: I6db9ef105b4ae6de0f1ebb917f86f8b1c0d4ea2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2491
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Niels Sascha Reedijk
2020-04-18 18:24:51 +00:00
committed by waddlesplash
parent 891edac940
commit 6758018a21
16 changed files with 1219 additions and 452 deletions
+13 -4
View File
@@ -1,9 +1,9 @@
/*
* Copyright 2019 Haiku, Inc. All rights reserved.
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Name, email@email.com
* Niels Sascha Reedijk, niels.reedijk@gmail.com
*
* Corresponds to:
* headers/os/interface/AbstractLayoutItem.h hrev43514
@@ -11,10 +11,17 @@
*/
// The AbstractLayoutItem.h and its BAbstractLayoutItem is considered entirely
// internal, and as such should not appear in the documentation.
//! \cond INTERNAL
/*!
\file AbstractLayoutItem.h
\ingroup layout
\brief Undocumented file.
\brief Provides the BAbstractLayoutItem class.
\since Haiku R1
*/
@@ -24,7 +31,7 @@
\class BAbstractLayoutItem
\ingroup layout
\ingroup libbe
\brief Undocumented class.
\brief Internal base class for various layouts.
\since Haiku R1
*/
@@ -283,3 +290,5 @@
\since Haiku R1
*/
//! \endcond INTERNAL
+1 -1
View File
@@ -66,7 +66,7 @@
\brief Constructs a BCardLayout \a from an archive message.
This method is usually not called directly, if you want to build a
check box from an archived message you should call Instantiate() instead
card layout from an archived message you should call Instantiate() instead
because it can handle errors properly.
\param from The \ref BMessage that contains the card layout.
+5 -1
View File
@@ -65,7 +65,11 @@
/*!
\fn BCardView::BCardView(BMessage *from)
\brief Unarchive a card view.
\brief Constructs a BCardView \a from an archive message.
This method is usually not called directly, if you want to build a
card view from an archived message you should call Instantiate() instead
because it can handle errors properly.
\param from The \ref BMessage that contains the card view.
+23 -1
View File
@@ -107,7 +107,7 @@
/*!
\fn void BGridLayout::SetHorizontalSpacing(float spacing);
\fn void BGridLayout::SetHorizontalSpacing(float spacing)
\brief Set the spacing between columns for this layout.
\param spacing The number of pixels of spacing to set.
@@ -257,6 +257,20 @@
*/
/*!
\fn BLayoutItem* BGridLayout::ItemAt(int32 column, int32 row) const
\brief Get a pointer to the item at the requested cell in the grid.
\param column The column, starting with \c 0 for the leftmost column. Note
that the value should be 0 or higher.
\param row The row, starting with \c 0 for the topmost row. Note that the
value should be 0 or higher.
\return A pointer to the layout item at these coordinates, or \c NULL if
there is no item.
*/
/*!
\fn BLayoutItem* BGridLayout::AddView(BView* child)
\brief Adds \a child to this layout in the first empty cell available, or
@@ -315,3 +329,11 @@
\since Haiku R1
*/
/*!
\fn static BArchivable* BGridLayout::Instantiate(BMessage *from)
\brief Instantiate the layout from the message \a from.
\since Haiku R1
*/
+44 -47
View File
@@ -1,9 +1,9 @@
/*
* Copyright 2019 Haiku, Inc. All rights reserved.
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Name, email@email.com
* Niels Sascha Reedijk, niels.reedijk@gmail.com
*
* Corresponds to:
* headers/os/interface/GridView.h hrev43514
@@ -14,7 +14,7 @@
/*!
\file GridView.h
\ingroup layout
\brief Undocumented file.
\brief Provides the BGridView class.
\since Haiku R1
*/
@@ -24,36 +24,44 @@
\class BGridView
\ingroup layout
\ingroup libbe
\brief Undocumented class.
\brief Container view for a collection of views organized in a grid.
This class is a convencience class, that creates a BView with a BGridView
set up by default.
You place views in the grid in a table-like structure, that consists of
rows and columns. It is not required to put views in every cell in the
table. By default, the view has the default system grey background.
\see BGridLayout for more information on how and when to use this
type of container.
\since Haiku R1
*/
/*!
\fn BGridView::BGridView(float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING)
\brief Undocumented public method
\fn BGridView::BGridView(float horizontal, float vertical)
\brief Creates a new grid view.
\param horizontal Undocumented
\param vertical Undocumented
\return Undocumented
\retval <value> Undocumented
\param horizontal The horizontal padding between the columns that contain
views.
\param vertical The vertical padding between the rows that contain views.
\since Haiku R1
*/
/*!
\fn BGridView::BGridView(const char *name, float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING)
\brief Undocumented public method
\fn BGridView::BGridView(const char *name, float horizontal,
float vertical)
\brief Creates a new grid view with a \a name.
\param name Undocumented
\param horizontal Undocumented
\param vertical Undocumented
\return Undocumented
\retval <value> Undocumented
\param name The name for the view.
\param horizontal The horizontal padding between the columns that contain
views.
\param vertical The vertical padding between the rows that contain views.
\since Haiku R1
*/
@@ -61,33 +69,32 @@
/*!
\fn BGridView::BGridView(BMessage *from)
\brief Undocumented public method
\brief Constructs a BGridView \a from an archive message.
\param from Undocumented
This method is usually not called directly, if you want to build a
grid view from an archived message you should call Instantiate() instead
because it can handle errors properly.
\return Undocumented
\retval <value> Undocumented
\param from The \ref BMessage that contains the grid view.
\since Haiku R1
*/
/*!
\fn virtual virtual BGridView::~BGridView()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\fn virtual BGridView::~BGridView()
\brief Destructor.
\since Haiku R1
*/
/*!
\fn virtual virtual void BGridView::SetLayout(BLayout *layout)
\brief Undocumented public method
\fn virtual void BGridView::SetLayout(BLayout *layout)
\brief Adopt a given grid \a layout.
\param layout Undocumented
\param layout The layout to set to. This must be a BGridLayout, or a
derivative. Any other layout types will be ignored.
\since Haiku R1
*/
@@ -95,37 +102,27 @@
/*!
\fn BGridLayout* BGridView::GridLayout() const
\brief Undocumented public method
\brief Get a pointer to the underlying BGridLayout.
\return Undocumented
\retval <value> Undocumented
\return A pointer to the underlying grid layout.
\since Haiku R1
*/
/*!
\fn virtual virtual status_t BGridView::Perform(perform_code d, void *arg)
\brief Undocumented public method
\fn virtual status_t BGridView::Perform(perform_code d, void *arg)
\brief Perform some action. (Internal Method)
\param d Undocumented
\param arg Undocumented
\return Undocumented
\retval <value> Undocumented
Reimplemented from BView::Perform()
\since Haiku R1
*/
/*!
\fn static static BArchivable* BGridView::Instantiate(BMessage *from)
\brief Undocumented public method
\param from Undocumented
\return Undocumented
\retval <value> Undocumented
\fn static BArchivable* BGridView::Instantiate(BMessage *from)
\brief Instantiate the view from the message \a from.
\since Haiku R1
*/
+8
View File
@@ -213,3 +213,11 @@
\since Haiku R1
*/
/*!
\fn static BArchivable* BGroupLayout::Instantiate(BMessage *from)
\brief Instantiate the layout from the message \a from.
\since Haiku R1
*/
+39 -48
View File
@@ -1,9 +1,9 @@
/*
* Copyright 2019 Haiku, Inc. All rights reserved.
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Name, email@email.com
* Niels Sascha Reedijk, niels.reedijk@gmail.com
*
* Corresponds to:
* headers/os/interface/GroupView.h hrev45833
@@ -14,7 +14,7 @@
/*!
\file GroupView.h
\ingroup interface
\brief Undocumented file.
\brief Provides the BGroupView class.
\since Haiku R1
*/
@@ -24,36 +24,38 @@
\class BGroupView
\ingroup interface
\ingroup libbe
\brief Undocumented class.
\brief Container view for a collection of views organized in a horizontal
or vertical row.
The group has a horizontal or a vertical orientation. By default, the view
has the default system grey background.
\see BGroupLayout for more information on how and when to use this
type of container.
\since Haiku R1
*/
/*!
\fn BGroupView::BGroupView(orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING)
\brief Undocumented public method
\fn BGroupView::BGroupView(orientation orientation, float spacing)
\brief Creates a new group view.
\param orientation Undocumented
\param spacing Undocumented
\return Undocumented
\retval <value> Undocumented
\param orientation Set to B_HORIZONTAL or B_VERTICAL.
\param spacing The space between the elements in the group.
\since Haiku R1
*/
/*!
\fn BGroupView::BGroupView(const char *name, orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING)
\brief Undocumented public method
\fn BGroupView::BGroupView(const char *name, orientation orientation,
float spacing)
\brief Creates a new group view with a \a name.
\param name Undocumented
\param orientation Undocumented
\param spacing Undocumented
\return Undocumented
\retval <value> Undocumented
\param name The name for the view.
\param orientation Set to B_HORIZONTAL or B_VERTICAL.
\param spacing The space between the elements in the group.
\since Haiku R1
*/
@@ -61,33 +63,32 @@
/*!
\fn BGroupView::BGroupView(BMessage *from)
\brief Undocumented public method
\brief Constructs a BGroupView \a from an archive message.
\param from Undocumented
This method is usually not called directly, if you want to build a
group view from an archived message you should call Instantiate() instead
because it can handle errors properly.
\return Undocumented
\retval <value> Undocumented
\param from The \ref BMessage that contains the grid view.
\since Haiku R1
*/
/*!
\fn virtual virtual BGroupView::~BGroupView()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\fn virtual BGroupView::~BGroupView()
\brief Destructor.
\since Haiku R1
*/
/*!
\fn virtual virtual void BGroupView::SetLayout(BLayout *layout)
\brief Undocumented public method
\fn virtual void BGroupView::SetLayout(BLayout *layout)
\brief Adopt a given group \a layout.
\param layout Undocumented
\param layout The layout to set to. This must be a BGroupLayout, or a
derivative. Any other layout types will be ignored.
\since Haiku R1
*/
@@ -95,37 +96,27 @@
/*!
\fn BGroupLayout* BGroupView::GroupLayout() const
\brief Undocumented public method
\brief Get a pointer to the underlying BGroupLayout.
\return Undocumented
\retval <value> Undocumented
\return A pointer to the underlying group layout.
\since Haiku R1
*/
/*!
\fn virtual virtual status_t BGroupView::Perform(perform_code d, void *arg)
\brief Undocumented public method
\fn virtual status_t BGroupView::Perform(perform_code d, void *arg)
\brief Perform some action. (Internal Method)
\param d Undocumented
\param arg Undocumented
\return Undocumented
\retval <value> Undocumented
Reimplemented from BView::Perform()
\since Haiku R1
*/
/*!
\fn static static BArchivable* BGroupView::Instantiate(BMessage *from)
\brief Undocumented public method
\param from Undocumented
\return Undocumented
\retval <value> Undocumented
\fn static BArchivable* BGroupView::Instantiate(BMessage *from)
\brief Instantiate the view from the message \a from.
\since Haiku R1
*/
+47 -86
View File
@@ -32,42 +32,31 @@
/*!
\typedef BLayoutBuilder::Cards<ParentBuilder>::ThisBuilder
\brief Shorthand representing the type of \c this.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
*/
/*!
\typedef BLayoutBuilder::Cards<ThisBuilder>::GroupBuilder
\brief Shorthand for builders returned by this builder's AddGroup() methods.
\since Haiku R1
\typedef BLayoutBuilder::Cards<ParentBuilder>::GroupBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GroupBuilder
*/
/*!
\typedef BLayoutBuilder::Cards<ThisBuilder>::GridBuilder
\brief Shorthand for builders returned by this builder's AddGrid() methods.
\since Haiku R1
\typedef BLayoutBuilder::Cards<ParentBuilder>::GridBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GridBuilder
*/
/*!
\typedef BLayoutBuilder::Cards<ThisBuilder>::SplitBuilder
\brief Shorthand for builders returned by this builder's AddSplit() methods.
\since Haiku R1
\typedef BLayoutBuilder::Cards<ParentBuilder>::SplitBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::SplitBuilder
*/
/*!
\typedef BLayoutBuilder::Cards<ThisBuilder>::CardBuilder
\brief Shorthand for builders returned by this builder's AddCards()
methods.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ThisBuilder>::CardBuilder
*/
@@ -114,7 +103,7 @@
/*!
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BCardLayout* layout)
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BCardView* view)
\brief Creates a builder targeting an existing BCardView.
\since Haiku R1
@@ -134,54 +123,32 @@
/*!
\fn BCardLayout* BLayoutBuilder::Cards<ParentBuilder>::Layout() const
\brief Get a pointer to the underlying BCardLayout
\returns A pointer to the underlying BCardLayout
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::Layout()
*/
/*!
\fn BView* BLayoutBuilder::Cards<ParentBuilder>::View() const
\brief Get a pointer to the underlying BView.
\returns A pointer to the underlying BView
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::View()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::GetLayout(
BCardLayout** _layout)
\brief Get a pointer to the underlying view.
\param[out] _layout Location to store the underlying BCardView reference.
\return The method returns a self reference, so that calls to the builder
may be chained.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetLayout()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::GetView(
BView** _view)
\brief Get a pointer to the underlying view.
\param[out] _view Location to store the underlying BView reference.
\return The method returns a self reference, so that calls to the builder
may be chained.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetView()
*/
/*!
\fn BLayoutBuilder::Cards<ParentBuilder>::operator BCardLayout*()
\brief Cast this builder into the BCardLayout it represents.
\brief Cast this builder into the layout object it represents.
\since Haiku R1
*/
@@ -243,8 +210,8 @@
/*!
\fn GroupBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGroup(
orientation orientation, float spacing)
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
representing the newly added layout.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\param orientation The orientation to use for the new BGroupLayout.
\param spacing The spacing to use for the new BGroupLayout.
@@ -258,12 +225,12 @@
/*!
\fn GroupBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGroup(
BGroupView* groupView)
\brief Add BGroupView and return a builder representing the newly added
BGroupView.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\param groupView The BGroupView to be added.
\returns A GroupBuilder representing \a groupView.
\returns A GroupBuilder representing the layout of the \a groupView.
\since Haiku R1
*/
@@ -272,12 +239,12 @@
/*!
\fn GroupBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout)
\brief Add a BGroupLayout and return a builder representing the newly added
BGroupLayout.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\param groupLayout The BGroupLayout to be added.
\returns A GroupBuilder representing \a groupLayout.
\returns A GroupBuilder representing the \a groupLayout.
\since Haiku R1
*/
@@ -286,8 +253,8 @@
/*!
\fn GridBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing)
\brief Create and add a viewless BGridLayout, then return a builder
representing the newly created BGridLayout.
\copydoc GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing, float weight)
\param horizontalSpacing The horizontal spacing for the new BGridLayout.
\param verticalSpacing The vertical spacing for the new BGridLayout.
@@ -301,7 +268,8 @@
/*!
\fn GridBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGrid(
BGridLayout* gridLayout)
\brief Add a BGridLayout, then return a builder the newly added BGridLayout.
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight)
\param gridLayout The BGridLayout to be added and used to construct the
returned GridBuilder.
@@ -315,12 +283,13 @@
/*!
\fn GridBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGrid(
BGridView* gridView)
\brief Add a BGridView, then return a builder the newly added BGridView.
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridView* gridView, float weight)
\param gridView The BGridView to be added and used to construct the
returned GridBuilder.
\returns A GridBuilder representing \a gridView.
\returns A GridBuilder representing the layout of the \a gridView.
\since Haiku R1
*/
@@ -329,8 +298,8 @@
/*!
\fn SplitBuilder BLayoutBuilder::Cards<ParentBuilder>::AddSplit(
orientation orientation, float spacing)
\brief Create and add a new BSplitView with a weight of \c weight, then
return a SplitBuilder representing the new BSplitView.
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\param orientation The orientation of the new BSplitView.
\param spacing The spacing of the new BSplitView.
@@ -344,12 +313,12 @@
/*!
\fn SplitBuilder BLayoutBuilder::Cards<ParentBuilder>::AddSplit(
BSplitView* splitView)
\brief Add a BSplitView to the BSplitView this builder represents and
return a SplitBuilder representing the BSplitView.
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight)
\param splitView The BSplitView to be added.
\returns A SplitBuilder representing the new BSplitView.
\returns A SplitBuilder representing the \a splitView.
\since Haiku R1
*/
@@ -357,8 +326,8 @@
/*!
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards()
\brief Add a new BCardLayout as a child of the BCardLayout this builder
represents and return a CardBuilder representing the new layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
float weight)
\returns A CardBuilder representing the new BCardLayout.
@@ -369,13 +338,13 @@
/*!
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards(
BCardLayout* cardLayout)
\brief Add a new BCardLayout as a child of the BCardLayout this builder
represents and return a CardBuilder representing the new layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\param cardLayout The existing layout that will be added to the underlying
BSplitView.
\returns A CardBuilder representing the new BCardLayout.
\returns A CardBuilder representing the \a cardLayout.
\since Haiku R1
*/
@@ -384,13 +353,13 @@
/*!
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards(
BCardView* cardView)
\brief Add a new BCardLayout as a child of the BCardLayout this builder
represents and return a CardBuilder representing the new layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\param cardView The existing view that will be added to the underlying
BSplitView.
\returns A CardBuilder representing the new BCardLayout.
\returns A CardBuilder representing the layout of t he \a cardView.
\since Haiku R1
*/
@@ -401,7 +370,7 @@
/*!
\name Setting Explicit Sizes
\name Explicit Sizes and Alignment
*/
@@ -411,36 +380,28 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitMinSize(
BSize size)
\brief Set the explicit minimum size of the underlying layout item.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitMinSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitMaxSize(
BSize size)
\brief Set the explicit maximum size of the underlying layout item.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitMaxSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitPreferredSize(
BSize size)
\brief Set the explicit preferred size of the underlying layout item.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitPreferredSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitAlignment(
BAlignment alignment)
\brief Set the explicit alignment of the underlying layout item.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitAlignment()
*/
+466 -3
View File
@@ -1,12 +1,12 @@
/*
* Copyright 2017 Haiku, Inc. All rights reserved.
* Copyright 2017, 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Adrien Destugues, [email protected]
*
* Corresponds to:
* headers/os/interface/LayoutBuilder.h rev 51359
* headers/os/interface/LayoutBuilder.h rev 49977
*/
@@ -22,6 +22,37 @@
columns and rows.
*/
/*!
\typedef BLayoutBuilder::Grid<ParentBuilder>::ThisBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
*/
/*!
\typedef BLayoutBuilder::Grid<ParentBuilder>::GroupBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GroupBuilder
*/
/*!
\typedef BLayoutBuilder::Grid<ParentBuilder>::GridBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GridBuilder
*/
/*!
\typedef BLayoutBuilder::Grid<ParentBuilder>::SplitBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::SplitBuilder
*/
/*!
\typedef BLayoutBuilder::Grid<ThisBuilder>::CardBuilder
\copydoc BLayoutBuilder::Group<ThisBuilder>::CardBuilder
*/
/*!
\name Constructors
*/
@@ -33,7 +64,7 @@
/*!
\fn BLayoutBuilder::Grid<ParentBuilder>::Grid(BWindow *window,
float horizontal, float vertical)
\brief Creates a new BGroupLayout, and attaches it to a BWindow.
\brief Creates a new BGridLayout, and attaches it to a BWindow.
\note The top BView* in \a window has its ViewColor set to
\c B_PANEL_BACKGROUND_COLOR.
@@ -45,6 +76,19 @@
*/
/*!
\fn BLayoutBuilder::Grid<ParentBuilder>::Grid(BView* view,
float horizontal, float vertical)
\brief Creates a builder targeting an existing \a view.
\param view The BView* to attach the newly created BGridLayout to.
\param horizontal The horizontal spacing for the new BGridLayout.
\param vertical The vertical spacing for the new BGroupLayout.
\since Haiku R1
*/
/*!
\fn BLayoutBuilder::Grid<ParentBuilder>::Grid(BGridLayout* layout)
\brief Creates a builder targeting an existing BGridLayout.
@@ -83,6 +127,53 @@
\since Haiku R1
*/
//! @}
/*!
\name Accessors
*/
//! @{
/*!
\fn BGridLayout* BLayoutBuilder::Grid<ParentBuilder>::Layout() const
\copydoc BLayoutBuilder::Group<ParentBuilder>::Layout()
*/
/*!
\fn BView* BLayoutBuilder::Grid<ParentBuilder>::View() const
\copydoc BLayoutBuilder::Group<ParentBuilder>::View()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::GetLayout(
BGridLayout** _layout)
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetLayout()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::GetView(
BView** _view)
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetView()
*/
/*!
\fn BLayoutBuilder::Grid<ParentBuilder>::operator BGridLayout*()
\brief Cast this builder into the layout object it represents.
\since Haiku R1
*/
//! @}
@@ -185,4 +276,376 @@
*/
//! @}
/*!
\name 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
\c this builder again until you call End().
*/
//! @{
/*!
\fn GroupBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGroup(
orientation orientation, float spacing, int32 column, int32 row,
int32 columnCount, int32 rowCount)
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\param orientation The orientation to use for the new BGroupLayout.
\param spacing The spacing to use for the new BGroupLayout.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the new BGroupLayout over.
\param rowCount The number of rows to span the new BGroupLayout over.
\returns A GroupBuilder representing the newly created BGroupLayout.
\since Haiku R1
*/
/*!
\fn GroupBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGroup(
BGroupView* groupView, int32 column, int32 row, int32 columnCount,
int32 rowCount = 1)
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\param groupView The BGroupView to be added.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a groupView over.
\param rowCount The number of rows to span the \a groupView over.
\returns A GroupBuilder representing the layout of the \a groupView.
\since Haiku R1
*/
/*!
\fn GroupBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, int32 column, int32 row,
int32 columnCount, int32 rowCount)
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\param groupLayout The BGroupLayout to be added.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a groupLayout over.
\param rowCount The number of rows to span the \a groupLayout over.
\returns A GroupBuilder representing the \a groupLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing, int32 column,
int32 row, int32 columnCount, int32 rowCount)
\copydoc GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing, float weight)
\param horizontalSpacing The horizontal spacing for the new BGridLayout.
\param verticalSpacing The vertical spacing for the new BGridLayout.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the new BGridLayout over.
\param rowCount The number of rows to span the new BGridLayout over.
\returns A GridBuilder representing the newly created BGridLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, int32 column, int32 row, int32 columnCount,
int32 rowCount)
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight)
\param gridLayout The BGridLayout to be added.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a gridLayout over.
\param rowCount The number of rows to span the \a gridLayout over.
\returns A GridBuilder representing \a gridLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Grid<ParentBuilder>::AddGrid(
BGridView* gridView, int32 column, int32 row, int32 columnCount,
int32 rowCount)
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridView* gridView, float weight)
\param gridView The BGridView to be added.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a gridView over.
\param rowCount The number of rows to span the \a gridView over.
\returns A GridBuilder representing the layout of the \a gridView.
\since Haiku R1
*/
/*!
\fn SplitBuilder BLayoutBuilder::Grid<ParentBuilder>::AddSplit(
orientation orientation, float spacing, int32 column, int32 row,
int32 columnCount, int32 rowCount)
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\param orientation The orientation of the new BSplitView.
\param spacing The spacing of the new BSplitView.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the new BSplitView over.
\param rowCount The number of rows to span the new BSplitView over.
\returns A SplitBuilder representing the new BSplitView.
\since Haiku R1
*/
/*!
\fn SplitBuilder BLayoutBuilder::Grid<ParentBuilder>::AddSplit(
BSplitView* splitView, int32 column, int32 row, int32 columnCount,
int32 rowCount)
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight)
\param splitView The BSplitView to be added.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a splitView over.
\param rowCount The number of rows to span the \a splitView over.
\returns A SplitBuilder representing the \a splitView.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Grid<ParentBuilder>::AddCards(
int32 column, int32 row, int32 columnCount, int32 rowCount)
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
float weight)
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the new layout over.
\param rowCount The number of rows to span the new layout over.
\returns A CardBuilder representing the new BCardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Grid<ParentBuilder>::AddCards(
BCardLayout* cardLayout, int32 column, int32 row, int32 columnCount,
int32 rowCount)
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\param cardLayout The existing layout to add to the current grid layout.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a cardLayout over.
\param rowCount The number of rows to span the \a cardLayout over.
\returns A CardBuilder representing the \a cardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Grid<ParentBuilder>::AddCards(
BCardView* cardView, int32 column, int32 row, int32 columnCount,
int32 rowCount)
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\param cardView The existing BCardView to add to the current grid layout.
\param column The column number (zero-index) to use.
\param row The row number (zero-index) to use.
\param columnCount The number of columns to span the \a cardView over.
\param rowCount The number of rows to span the \a cardView over.
\returns A CardBuilder representing the layout of t he \a cardView.
\since Haiku R1
*/
//! @}
/*!
\name Adding BSpaceLayoutItems
A convenience method to add glue to a cell.
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::AddGlue(
int32 column, int32 row, int32 columnCount, int32 rowCount)
\copybrief BLayoutBuilder::Group<ParentBuilder>::AddGlue(float weight)
\param column The column number (zero-index) for the glue.
\param row The row number (zero-index) for the glue.
\param columnCount The number of columns to span the glue item over.
\param rowCount The number of rows to span the glue item over.
\since Haiku R1
*/
//! @}
/*!
\name BGridLayout Properties
These methods expose some settings of the underlying grid layout.
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetHorizontalSpacing(
float spacing)
\copydoc BGridLayout::SetHorizontalSpacing(float spacing)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetVerticalSpacing(
float spacing)
\copydoc BGridLayout::SetVerticalSpacing(float spacing)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetSpacing(
float horizontal, float vertical)
\copydoc BGridLayout::SetSpacing(float horizontal, float vertical)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetColumnWeight(
int32 column, float weight)
\copydoc BGridLayout::SetColumnWeight(int32 column, float weight)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetRowWeight(
int32 row, float weight)
\copydoc BGridLayout::SetRowWeight(int32 row, float weight)
*/
//! @}
/*!
\name Insets
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetInsets(
float left, float top, float right, float bottom)
\copydoc BTwoDimensionalLayout::SetInsets(float, float, float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetInsets(
float horizontal, float vertical)
\copydoc BTwoDimensionalLayout::SetInsets(float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetInsets(
float insets)
\copydoc BTwoDimensionalLayout::SetInsets(float)
*/
//! @}
/*!
\name Explicit Sizes and Alignment
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetExplicitMinSize(
BSize size)
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitMinSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetExplicitMaxSize(
BSize size)
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitMaxSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetExplicitPreferredSize(
BSize size)
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitPreferredSize()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Grid<ParentBuilder>::SetExplicitAlignment(
BAlignment alignment)
\copydoc BLayoutBuilder::Group<ParentBuilder>::SetExplicitAlignment()
*/
//! @}
+194 -55
View File
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Haiku, Inc. All rights reserved.
* Copyright 2011, 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, [email protected]
* Ingo Weinhold, [email protected]
* Niels Sascha Reedijk, [email protected]
*
* Corresponds to:
* headers/os/interface/GroupLayoutBuilder.h rev 42274
* src/kits/interface/GroupLayoutBuilder.cpp rev 42274
* headers/os/interface/LayoutBuilder.h rev 49977
*/
@@ -22,6 +22,14 @@
*/
/*!
\typedef BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
\brief Shorthand representing the type of \c this.
\since Haiku R1
*/
/*!
\typedef BLayoutBuilder::Group<ParentBuilder>::GroupBuilder
\brief Shorthand for builders returned by this builder's AddGroup() methods.
@@ -47,8 +55,9 @@
/*!
\typedef BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
\brief Shorthand representing the type of \c this.
\typedef BLayoutBuilder::Group<ThisBuilder>::CardBuilder
\brief Shorthand for builders returned by this builder's AddCards()
methods.
\since Haiku R1
*/
@@ -69,7 +78,20 @@
\note The top BView* in \a window has its ViewColor set to
\c B_PANEL_BACKGROUND_COLOR.
\param window Thew BWindow* to attach the newly created BGroupLayout to.
\param window The BWindow* to attach the newly created BGroupLayout to.
\param orientation The orientation for the new BGroupLayout.
\param spacing The spacing for the new BGroupLayout.
\since Haiku R1
*/
/*!
\fn BLayoutBuilder::Group<ParentBuilder>::Group(BView* view,
orientation orientation, float spacing)
\brief Creates a builder targeting an existing \a view.
\param view The BView* to attach the newly created BGroupLayout to.
\param orientation The orientation for the new BGroupLayout.
\param spacing The spacing for the new BGroupLayout.
@@ -198,13 +220,13 @@
/*!
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
representing the newly added layout.
\brief Add a new viewless BGroupLayout as a child to the layout that this
builder represents and return a GroupBuilder representing the new
layout.
\param orientation The orientation to use for the new BGroupLayout.
\param spacing The spacing to use for the new BGroupLayout.
\param weight The weight for the new BGroupLayout in the BGroupLayout this
builder represents.
\param weight The weight for the new BGroupLayout in this group layout.
\returns A GroupBuilder representing the newly created BGroupLayout.
@@ -215,14 +237,14 @@
/*!
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\brief Add BGroupView and return a builder representing the newly added
BGroupView.
\brief Add an existing BGroupView as a child to the layout that this
builder represents and return a GroupBuilder representing the layout of
the added \a groupView.
\param groupView The BGroupView to be added.
\param weight The weight for \a groupView in the BGroupLayout this builder
represents.
\param weight The weight for \a groupView in this group layout.
\returns A GroupBuilder representing \a groupView.
\returns A GroupBuilder representing the layout of the \a groupView.
\since Haiku R1
*/
@@ -231,25 +253,24 @@
/*!
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\brief Add a BGroupLayout and return a builder representing the newly added
BGroupLayout.
\brief Add an existing BGroupLayout as a child to the layout that this
builder represents and return a GroupBuilder to the added layout.
\param groupLayout The BGroupLayout to be added.
\param weight The weight for \a groupLayout in the BGroupLayout this builder
represents.
\param weight The weight for \a groupLayout in this group layout.
\returns A GroupBuilder representing \a groupLayout.
\returns A GroupBuilder representing the \a groupLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
float horizontalSpacing = 0.0f, float verticalSpacing = 0.0f,
float weight = 1.0f)
\brief Create and add a viewless BGridLayout, then return a builder
representing the newly created BGridLayout.
\fn GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing, float weight)
\brief Add a new viewless BGridLayout as a child to the layout that this
builder represents and return a GridBuilder representing the new
layout.
\param horizontalSpacing The horizontal spacing for the new BGridLayout.
\param verticalSpacing The vertical spacing for the new BGridLayout.
@@ -264,15 +285,15 @@
/*!
\fn GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight = 1.0f)
\brief Add a BGridLayout, then return a builder the newly added BGridLayout.
BGridLayout* gridLayout, float weight)
\brief Add an existing BGridLayout as a child to the layout that this
builder represents and return a GridBuilder to the added layout.
\param gridLayout The BGridLayout to be added and used to construct the
returned GridBuilder.
\param gridLayout The BGridLayout to be added.
\param weight The weight for \a gridLayout in the BGroupLayout this builder
represents.
\returns a GridBuilder representing \a gridLayout.
\returns A GridBuilder representing \a gridLayout.
\since Haiku R1
*/
@@ -280,15 +301,15 @@
/*!
\fn GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridView* gridView, float weight = 1.0f)
\brief Add a BGridView, then return a builder the newly added BGridView.
BGridView* gridView, float weight)
\brief Add an existing BGridView as a child to the layout this builder
represents and return a GridBuilder representing the layout of the
added \a gridView.
\param gridView The BGridView to be added and used to construct the
returned GridBuilder.
\param weight The weight for \a gridView in the BGroupLayout this builder
represents.
\param gridView The BGridView to be added.
\param weight The weight for \a gridView in this BGroupLayout.
\returns a GridBuilder representing \a gridView.
\returns A GridBuilder representing the layout of the \a gridView.
\since Haiku R1
*/
@@ -297,14 +318,14 @@
/*!
\fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\brief Create and add a new BSplitView with a weight of \c weight, then
return a SplitBuilder representing the new BSplitView.
\brief Add a new BSplitView as a child to the layout that this builder
represents and return a SplitBuilder representing the new BSplitView.
\param orientation The orientation of the new BSplitView.
\param spacing The spacing of the new BSplitView.
\param weight The weight, in this BGroupLayout for the new BSplitView.
\returns a SplitBuilder representing the new BSplitView.
\returns A SplitBuilder representing the new BSplitView.
\since Haiku R1
*/
@@ -313,13 +334,62 @@
/*!
\fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight = 1.0f)
\brief Add a BSplitView to the BGroupLayout this builder represents and
return a SplitBuilder representing the BSplitView.
\brief Add an existing BSplitView as a child to the layout this builder
represents and return a SplitBuilder representing the layout of the
added \a splitView.
\param splitView The BSplitView to be added.
\param weight The weight of the BSplitView in the BGroupLayout this builder
represents.
\returns A SplitBuilder representing the \a splitView.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
float weight)
\brief Add a new viewless BCardLayout as a child to the layout that this
builder represents and return a CardBuilder representing the new layout.
\param weight The weight of this new layout within the current group layout.
\returns A CardBuilder representing the new BCardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\brief Add an existing BCardLayout as a child to the layout that this builder
represents and return a CardBuilder representing the added layout.
\param cardLayout The existing layout to add to the current group layout.
\param weight The weight of this new layout within the current group
layout.
\returns A CardBuilder representing the \a cardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\brief 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.
\param cardView The existing BCardView to add to the current group layout.
\param weight The weight of this new layout within the current group layout.
\returns A CardBuilder representing the layout of the \a cardView.
\since Haiku R1
*/
@@ -339,9 +409,9 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::AddGlue(
float weight = 1.0f)
float weight)
\brief Add a BSpaceLayoutItem created by BSpaceLayoutItem::CreateGlue()
to the BGroupLayout this builder represents.
to the builder's layout.
\param weight The weight of the BSpaceLayoutItem in the BGroupLayout this
builder represents
@@ -368,15 +438,84 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetInsets(float left,
float top, float right, float bottom)
\brief Call the BTwoDimensionalLayout::SetInsets() method on the
BGroupLayout this builder represents.
\name Insets
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetInsets(
float left, float top, float right, float bottom)
\copydoc BTwoDimensionalLayout::SetInsets(float, float, float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetInsets(
float horizontal, float vertical)
\copydoc BTwoDimensionalLayout::SetInsets(float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetInsets(
float insets)
\copydoc BTwoDimensionalLayout::SetInsets(float)
*/
//! @}
/*!
\name Explicit Sizes and Alignment
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetExplicitMinSize(
BSize size)
\brief Set the explicit minimum size of the underlying layout.
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetExplicitMaxSize(
BSize size)
\brief Set the explicit maximum size of the underlying layout.
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetExplicitPreferredSize(
BSize size)
\brief Set the explicit preferred size of the underlying layout.
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::SetExplicitAlignment(
BAlignment alignment)
\brief Set the explicit alignment of the underlying layout.
\since Haiku R1
*/
//! @}
/*!
\name Accessors
*/
@@ -387,7 +526,7 @@
/*!
\fn BGroupLayout* BLayoutBuilder::Group<ParentBuilder>::Layout() const
\brief Get the BGroupLayout this builder represents.
\brief Get a pointer to the layout this builder represents.
\since Haiku R1
*/
@@ -395,7 +534,7 @@
/*!
\fn BView* BLayoutBuilder::Group<ParentBuilder>::View() const
\brief Get the BView this builder's BGroupLayout is attached to.
\brief Get a pointer to the BView this builder's layout is attached to.
\since Haiku R1
*/
@@ -404,9 +543,9 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::GetLayout(
BGroupLayout** _layout)
\brief Get the BGroupLayout this builder represents.
\brief Get the layout this builder represents.
\param[out] _layout The BGroupLayout this builder represents.
\param[out] _layout The layout this builder represents.
\since Haiku R1
*/
@@ -415,9 +554,9 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::GetView(
BView** _view)
\brief Get the BView this builder's BGroupLayout is attached to.
\brief Get a pointer to the BView this builder's layout is attached to.
\param[out] _view The BView this builder's BGroupLayout is attached to.
\param[out] _view The BView this builder's layout is attached to.
\since Haiku R1
*/
@@ -425,7 +564,7 @@
/*!
\fn BLayoutBuilder::Group<ParentBuilder>::operator BGroupLayout*()
\brief Cast this builder into the BGroupLayout it represents.
\brief Cast this builder into the layout object it represents.
\since Haiku R1
*/
+42 -62
View File
@@ -29,42 +29,31 @@
/*!
\typedef BLayoutBuilder::Split<ParentBuilder>::ThisBuilder
\brief Shorthand representing the type of \c this.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ThisBuilder>::GroupBuilder
\brief Shorthand for builders returned by this builder's AddGroup() methods.
\since Haiku R1
\typedef BLayoutBuilder::Split<ParentBuilder>::GroupBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GroupBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ThisBuilder>::GridBuilder
\brief Shorthand for builders returned by this builder's AddGrid() methods.
\since Haiku R1
\typedef BLayoutBuilder::Split<ParentBuilder>::GridBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GridBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ThisBuilder>::SplitBuilder
\brief Shorthand for builders returned by this builder's AddSplit() methods.
\since Haiku R1
\typedef BLayoutBuilder::Split<ParentBuilder>::SplitBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::SplitBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ThisBuilder>::CardBuilder
\brief Shorthand for builders returned by this builder's AddCards()
methods.
\since Haiku R1
\copydoc BLayoutBuilder::Group<ThisBuilder>::CardBuilder
*/
@@ -111,40 +100,29 @@
/*!
\fn BSplitView* BLayoutBuilder::Split<ParentBuilder>::View() const
\brief Get a borrowed pointer to the underlying BSplitView
\returns A borrowed pointer to the underlying BSplitView
\copydoc BLayoutBuilder::Group<ParentBuilder>::View()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::GetView(
BView** _view)
\brief Get a borrowed pointer to the underlying view.
\param[out] _view Location to store the underlying BSplitView as a BView
reference.
\return The method returns a self reference, so that calls to the builder
may be chained.
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetView()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::GetSplitView(
BSplitView** _view)
\brief Get a borrowed pointer to the underlying view.
\brief Get a pointer to the SplitBView this builder is attached to.
\param[out] _view Location to store the underlying BSplitView reference.
\return The method returns a self reference, so that calls to the builder
may be chained.
\param[out] _view The BSplitView this builder' is attached to.
*/
/*!
\fn BLayoutBuilder::Split<ParentBuilder>::operator BSplitView*()
\brief Cast this builder into the BSplitView it represents.
\brief Cast this builder into the layout object it represents.
\since Haiku R1
*/
@@ -249,8 +227,8 @@
/*!
\fn GroupBuilder BLayoutBuilder::Split<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
representing the newly added layout.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\param orientation The orientation to use for the new BGroupLayout.
\param spacing The spacing to use for the new BGroupLayout.
@@ -266,14 +244,14 @@
/*!
\fn GroupBuilder BLayoutBuilder::Split<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\brief Add BGroupView and return a builder representing the newly added
BGroupView.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\param groupView The BGroupView to be added.
\param weight The weight for \a groupView in the BGroupLayout this builder
represents.
\returns A GroupBuilder representing \a groupView.
\returns A GroupBuilder representing the layout of the \a groupView.
\since Haiku R1
*/
@@ -282,14 +260,14 @@
/*!
\fn GroupBuilder BLayoutBuilder::Split<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\brief Add a BGroupLayout and return a builder representing the newly added
BGroupLayout.
\copybrief GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\param groupLayout The BGroupLayout to be added.
\param weight The weight for \a groupLayout in the BGroupLayout this builder
represents.
\returns A GroupBuilder representing \a groupLayout.
\returns A GroupBuilder representing the \a groupLayout.
\since Haiku R1
*/
@@ -299,8 +277,8 @@
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
float horizontalSpacing = 0.0f, float verticalSpacing = 0.0f,
float weight = 1.0f)
\brief Create and add a viewless BGridLayout, then return a builder
representing the newly created BGridLayout.
\copydoc GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
float horizontalSpacing, float verticalSpacing, float weight)
\param horizontalSpacing The horizontal spacing for the new BGridLayout.
\param verticalSpacing The vertical spacing for the new BGridLayout.
@@ -316,14 +294,15 @@
/*!
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight = 1.0f)
\brief Add a BGridLayout, then return a builder the newly added BGridLayout.
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight)
\param gridLayout The BGridLayout to be added and used to construct the
returned GridBuilder.
\param weight The weight for \a gridLayout in the BSplitView this builder
represents.
\returns A GridBuilder representing \a gridLayout.
\returns A GridBuilder representing the \a gridLayout.
\since Haiku R1
*/
@@ -332,14 +311,15 @@
/*!
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
BGridView* gridView, float weight = 1.0f)
\brief Add a BGridView, then return a builder the newly added BGridView.
\copybrief GridBuilder BLayoutBuilder::Group<ParentBuilder>::AddGrid(
BGridView* gridView, float weight)
\param gridView The BGridView to be added and used to construct the
returned GridBuilder.
\param weight The weight for \a gridView in the BSplitView this builder
represents.
\returns A GridBuilder representing \a gridView.
\returns A GridBuilder representing the layout of the \a gridView.
\since Haiku R1
*/
@@ -348,8 +328,8 @@
/*!
\fn SplitBuilder BLayoutBuilder::Split<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\brief Create and add a new BSplitView with a weight of \c weight, then
return a SplitBuilder representing the new BSplitView.
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\param orientation The orientation of the new BSplitView.
\param spacing The spacing of the new BSplitView.
@@ -364,14 +344,14 @@
/*!
\fn SplitBuilder BLayoutBuilder::Split<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight = 1.0f)
\brief Add a BSplitView to the BSplitView this builder represents and
return a SplitBuilder representing the BSplitView.
\copybrief SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight)
\param splitView The BSplitView to be added.
\param weight The weight of the BSplitView in the BSplitView this builder
represents.
\returns A SplitBuilder representing the new BSplitView.
\returns A SplitBuilder representing the \a splitView.
\since Haiku R1
*/
@@ -380,8 +360,8 @@
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
float weight)
\brief Add a new BCardLayout to the BSplitView this builder represents and
return a CardBuilder representing the new layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
float weight)
\param weight The weight of the BCardLayout in the BSplitView this builder
represents.
@@ -395,15 +375,15 @@
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\brief Add an existing BCardLayout to the BSplitView this builder
represents and return a CardBuilder representing this layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\param cardLayout The existing layout that will be added to the underlying
BSplitView.
\param weight The weight of the BCardLayout in the BSplitView this builder
represents.
\returns A CardBuilder representing the new BCardLayout.
\returns A CardBuilder representing the \a cardLayout.
\since Haiku R1
*/
@@ -412,15 +392,15 @@
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\brief Add an existing BCardView to the BSplitView this builder
represents and return a CardBuilder representing this layout.
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\param cardView The existing view that will be added to the underlying
BSplitView.
\param weight The weight of the BCardLayout in the BSplitView this builder
represents.
\returns A CardBuilder representing the new BCardLayout.
\returns A CardBuilder representing the layout of t he \a cardView.
\since Haiku R1
*/
+14 -3
View File
@@ -1,13 +1,12 @@
/*
* Copyright 2010 Haiku, Inc. All rights reserved.
* Copyright 2010, 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* headers/os/interface/LayoutBuilder.h rev 38207
* src/kits/interface/LayoutBuilder.cpp rev 38207
* headers/os/interface/LayoutBuilder.h rev 49977
*/
@@ -122,3 +121,15 @@ BLayoutBuilder::Group<>(B_HORIZONTAL)
\since Haiku R1
*/
//! \cond INTERNAL
/*!
\var ParentBuilder* BLayoutBuilder::Base< ParentBuilder >::fParent
\brief Internal pointer to the parent of the builder.
*/
//! \endcond
+31 -2
View File
@@ -6,8 +6,8 @@
* Alex Wilson, [email protected]
*
* Corresponds to:
* headers/os/interface/LayoutItem.h rev 38207
* src/kits/interface/LayoutItem.cpp rev 38207
* headers/os/interface/LayoutItem.h rev 49040
* src/kits/interface/LayoutItem.cpp rev 49040
*/
@@ -55,6 +55,21 @@
*/
/*!
\fn bool BLayoutItem::RemoveSelf()
\brief Remove this layout item from the BLayout it is a part of.
This method works analoguous to BView::RemoveSelf(), that is it removes
itself from the parent layout and returns whether or not this was
succesful.
\return \c true if the item was removed from the layout, or \c false if
item was not part of a layout, or removal was succesful.
\since Haiku R1
*/
/*!
\fn BLayout::~BLayout()
\brief Destructor method.
@@ -188,6 +203,20 @@
*/
/*!
\fn void BLayoutItem::SetExplicitSize(BSize size)
\brief Set the explicity size to \a size.
This method is a convenience method that sets the minimum size, maximum
size and preferred size to \a size, as to force this layout item to have
a specific size.
\param size The specific (non-zero) size for this layout item.
\since Haiku R1
*/
/*!
\fn void BLayoutItem::SetExplicitAlignment(BAlignment alignment) = 0
\brief Set this item's explicit alignment, to be used in Alignment().
+107 -133
View File
@@ -1,9 +1,9 @@
/*
* Copyright 2019 Haiku, Inc. All rights reserved.
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Name, email@email.com
* Niels Sascha Reedijk, niels.reedijk@gmail.com
*
* Corresponds to:
* headers/os/interface/SpaceLayoutItem.h hrev43514
@@ -14,7 +14,7 @@
/*!
\file SpaceLayoutItem.h
\ingroup layout
\brief Undocumented file.
\brief Provides the BSpaceLayoutItem class.
\since Haiku R1
*/
@@ -24,23 +24,52 @@
\class BSpaceLayoutItem
\ingroup layout
\ingroup libbe
\brief Undocumented class.
\brief An empty layout item that expands into empty space based on its size
configuration.
This class is a specialized layout item, that is used to distribute space
within one of the layouts. The layout item can be manually configured, but
there are also two default varieties.
The first variety is the \b glue variety. Glue is an element that expands
to the maximum space that is available. Let's say, you have a horizontal
BGroupLayout. You want a button on the left, and a button on the right,
with empty space in the middle. The middle element can be a glue element.
The glue will push the right button all the way to the end of the available
space. If the host view gets larger, the glue will expand. You can use the
static method BSpaceLayoutItem::CreateGlue() to easily create a glue
element.
Another variety is the \b strut. A is a layout item with no minimum size,
and a maximum size. This means that the item might be smaller than the
maximum size, but it will never be larger than the maximum size. You can
use the static methods BSpaceLayoutItem::CreateVerticalStrut() and
BSpaceLayoutItem::CreateHorizontalStrut() to create a strut item.
The default constructor allows you to create a layout item with custom
minimum sizes, maximum sizes, preferred sizes and alignments.
\see Where applicable, the layout builder classes have convenience methods
to add glue or struts. See
BLayoutBuilder::Group<ParentBuilder>::AddGlue() or
BLayoutBuilder::Group<ParentBuilder>::AddStrut().
\since Haiku R1
*/
/*!
\fn BSpaceLayoutItem::BSpaceLayoutItem(BSize minSize, BSize maxSize, BSize preferredSize, BAlignment alignment)
\brief Undocumented public method
\fn BSpaceLayoutItem::BSpaceLayoutItem(BSize minSize, BSize maxSize,
BSize preferredSize, BAlignment alignment)
\brief Create a space layout item with specific properties.
\param minSize Undocumented
\param maxSize Undocumented
\param preferredSize Undocumented
\param alignment Undocumented
See the CreateGlue(), CreateVerticalStrut() and CreateHorizontalStruct
static methods to create common space items.
\return Undocumented
\retval <value> Undocumented
\param minSize The minimum size for this item.
\param maxSize The maximum size for this item.
\param preferredSize The preferred size for this item.
\param alignment The alignment of this item.
\since Haiku R1
*/
@@ -48,187 +77,134 @@
/*!
\fn BSpaceLayoutItem::BSpaceLayoutItem(BMessage *archive)
\brief Undocumented public method
\brief Constructs a BSpaceLayoutItem from an \a archive message.
\param archive Undocumented
This method is usually not called directly, if you want to build a
space layout item from an archived message you should call Instantiate()
instead because it can handle errors properly.
\return Undocumented
\retval <value> Undocumented
\param archive The \ref BMessage that contains the space layout item.
\since Haiku R1
*/
/*!
\fn virtual virtual BSpaceLayoutItem::~BSpaceLayoutItem()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\fn virtual BSpaceLayoutItem::~BSpaceLayoutItem()
\brief Destructor.
\since Haiku R1
*/
/*!
\fn virtual virtual BSize BSpaceLayoutItem::MinSize()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
\fn virtual BSize BSpaceLayoutItem::MinSize()
\copydoc BLayoutItem::MinSize()
*/
/*!
\fn virtual virtual BSize BSpaceLayoutItem::MaxSize()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
\fn virtual BSize BSpaceLayoutItem::MaxSize()
\copydoc BLayoutItem::MaxSize()
*/
/*!
\fn virtual virtual BSize BSpaceLayoutItem::PreferredSize()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
\fn virtual BSize BSpaceLayoutItem::PreferredSize()
\copydoc BLayoutItem::PreferredSize()
*/
/*!
\fn virtual virtual BAlignment BSpaceLayoutItem::Alignment()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
\fn virtual BAlignment BSpaceLayoutItem::Alignment()
\copydoc BLayoutItem::Alignment()
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetExplicitMinSize(BSize size)
\brief Undocumented public method
\param size Undocumented
\since Haiku R1
\fn virtual void BSpaceLayoutItem::SetExplicitMinSize(BSize size)
\copydoc BLayoutItem::SetExplicitMinSize()
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetExplicitMaxSize(BSize size)
\brief Undocumented public method
\param size Undocumented
\since Haiku R1
\fn virtual void BSpaceLayoutItem::SetExplicitMaxSize(BSize size)
\copydoc BLayoutItem::SetExplicitMaxSize()
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetExplicitPreferredSize(BSize size)
\brief Undocumented public method
\param size Undocumented
\since Haiku R1
\fn virtual void BSpaceLayoutItem::SetExplicitPreferredSize(
BSize size)
\copydoc BLayoutItem::SetExplicitPreferredSize()
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetExplicitAlignment(BAlignment alignment)
\brief Undocumented public method
\param alignment Undocumented
\since Haiku R1
\fn virtual void BSpaceLayoutItem::SetExplicitAlignment(
BAlignment alignment)
\copydoc BLayoutItem::SetExplicitAlignment()
*/
/*!
\fn virtual virtual bool BSpaceLayoutItem::IsVisible()
\brief Undocumented public method
\brief Return the current local visibility of this item.
\return Undocumented
\retval <value> Undocumented
The visibility is set explicitly through SetVisible(). By default, the
layout item is visible.
\since Haiku R1
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetVisible(bool visible)
\brief Undocumented public method
\fn virtual void BSpaceLayoutItem::SetVisible(bool visible)
\brief Set the visibility of this space layout item.
\param visible Undocumented
\param visible The desired visibility of the layout item.
\since Haiku R1
*/
/*!
\fn virtual virtual BRect BSpaceLayoutItem::Frame()
\brief Undocumented public method
\fn virtual BRect BSpaceLayoutItem::Frame()
\copydoc BLayoutItem::Frame()
*/
\return Undocumented
\retval <value> Undocumented
/*!
\fn virtual void BSpaceLayoutItem::SetFrame(BRect frame)
\copydoc BLayoutItem::SetFrame()
*/
/*!
\fn static BSpaceLayoutItem* BSpaceLayoutItem::CreateGlue()
\brief Create a layout item that acts like glue.
This type of space layout item has no minimum size, and expands to the
maximum available space in all directions.
\return Creates a new BSpaceLayoutItem and returns ownership to the caller.
\since Haiku R1
*/
/*!
\fn virtual virtual void BSpaceLayoutItem::SetFrame(BRect frame)
\brief Undocumented public method
\fn static BSpaceLayoutItem* BSpaceLayoutItem::CreateHorizontalStrut(
float width)
\brief Create a layout item that horizontally expands to a maximum
\a width.
\param frame Undocumented
The item has no minimum size, meaning that if the total available width is
smaller than the maximum \a width, the strut will use the available space.
\since Haiku R1
*/
\param width The maximum width.
/*!
\fn virtual virtual status_t BSpaceLayoutItem::Archive(BMessage *into, bool deep=true) const
\brief Undocumented public method
\param into Undocumented
\param deep Undocumented
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
*/
/*!
\fn static static BSpaceLayoutItem* BSpaceLayoutItem::CreateGlue()
\brief Undocumented public method
\return Undocumented
\retval <value> Undocumented
\since Haiku R1
*/
/*!
\fn static static BSpaceLayoutItem* BSpaceLayoutItem::CreateHorizontalStrut(float width)
\brief Undocumented public method
\param width Undocumented
\return Undocumented
\retval <value> Undocumented
\return Creates a new BSpaceLayoutItem and returns ownership to the caller.
\since Haiku R1
*/
@@ -236,25 +212,23 @@
/*!
\fn static static BSpaceLayoutItem* BSpaceLayoutItem::CreateVerticalStrut(float height)
\brief Undocumented public method
\brief Create a layout item that vertically expands to a maximum
\a height.
\param height Undocumented
The item has no minimum size, meaning that if the total available height is
smaller than the maximum \a width, the strut will use the available space.
\return Undocumented
\retval <value> Undocumented
\param height The maximum height.
\return Creates a new BSpaceLayoutItem and returns ownership to the caller.
\since Haiku R1
*/
/*!
\fn static static BArchivable* BSpaceLayoutItem::Instantiate(BMessage *from)
\brief Undocumented public method
\param from Undocumented
\return Undocumented
\retval <value> Undocumented
\fn static BArchivable* BSpaceLayoutItem::Instantiate(BMessage *from)
\brief Instantiate the item from the message \a from.
\since Haiku R1
*/
+4
View File
@@ -92,6 +92,10 @@
\fn BSplitView::BSplitView(BMessage *from)
\brief Unarchive a split view.
This method is usually not called directly, if you want to build a
split view from an archived message you should call Instantiate() instead
because it can handle errors properly.
\param from The \ref BMessage that contains the split view.
\since Haiku R1
+181 -6
View File
@@ -4,10 +4,11 @@
*
* Authors:
* Alex Wilson, [email protected]
* Niels Sascha Reedijk, [email protected]
*
* Corresponds to:
* headers/os/interface/TwoDimensionalLayout.h rev 38207
* src/kits/interface/TwoDimensionalLayout.cpp rev 38207
* headers/os/interface/TwoDimensionalLayout.h rev 45833
* src/kits/interface/TwoDimensionalLayout.cpp rev 49507
*/
@@ -48,6 +49,24 @@
*/
/*!
\var BTwoDimensionalLayout::ColumnRowConstraints::weight
\brief The weight of the given column or row.
*/
/*!
\var BTwoDimensionalLayout::ColumnRowConstraints::min
\brief The minimum size of the given column or row.
*/
/*!
\var BTwoDimensionalLayout::ColumnRowConstraints::max
\brief The maximum size of the given column or row.
*/
/*!
\struct BTwoDimensionalLayout::Dimensions
\brief Used by BTwoDimensionalLayout derived classes to communicate the
@@ -58,6 +77,48 @@
*/
/*!
\var BTwoDimensionalLayout::Dimensions::x
\brief The column of the layout item.
*/
/*!
\var BTwoDimensionalLayout::Dimensions::y
\brief The row of the layout item.
*/
/*!
\var BTwoDimensionalLayout::Dimensions::width
\brief The number of columns the layout item spans.
*/
/*!
\var BTwoDimensionalLayout::Dimensions::height
\brief The number of rows the layout item spans.
*/
/*!
\fn BTwoDimensionalLayout::BTwoDimensionalLayout()
\brief Create an empty layout.
*/
/*!
\fn BTwoDimensionalLayout::BTwoDimensionalLayout(BMessage* from)
\brief Unarchive constructor.
*/
/*!
\fn virtual BTwoDimensionalLayout::~BTwoDimensionalLayout()
\brief Destructor.
*/
/*!
\fn void BTwoDimensionalLayout::AlignLayoutWith(
BTwoDimensionalLayout* other, orientation orientation)
@@ -85,13 +146,38 @@
/*!
\fn void BTwoDimensionalLayout::SetInsets(float left, float top,
float right, float bottom)
\brief Set the insets for this BTwoDimensionalLayout (in pixels).
\brief Set the insets for this layout.
Set the spacing around the edges of this BTwoDimensionalLayout. If you
pass \c B_USE_DEFAULT_SPACING for a certain parameter, that parameter will
Set the spacing around the edges of this layout. If you pass
\c B_USE_DEFAULT_SPACING for a certain parameter, that parameter will
be replaced with the value returned by BControlLook::DefaultItemSpacing().
\see BTwoDimensionalLayout::GetInsets();
\since Haiku R1
*/
/*!
\fn void BTwoDimensionalLayout::SetInsets(float horizontal, float vertical)
\brief Set the insets for this layout.
This is a convenience method to easily set similar insets.
\param horizontal The insets to the \em left and \em right of the layout.
\param vertical The insets at the \em top and \em bottom of the layout.
\since Haiku R1
*/
/*!
\fn void BTwoDimensionalLayout::SetInsets(float insets)
\brief 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.
\param insets The inset to be applied to \em left, \em top, \em right and
\em bottom of this layout.
\since Haiku R1
*/
@@ -201,3 +287,92 @@
//! @}
/*!
\name Protected helper methods for inset calculation.
*/
//! @{
/*!
\fn BSize BTwoDimensionalLayout::AddInsets(BSize size)
\brief Add the \a size to all the insets for this layout.
\since Haiku R1
*/
/*!
\fn void BTwoDimensionalLayout::AddInsets(float* minHeight,
float* maxHeight, float* preferredHeight)
\brief Add to the insets, and store the modified values.
\param[out] minHeight The value to add to the minimum height for this
layout. The new minimum height is stored at the variable of this
pointer.
\param[out] maxHeight The value to add to the maximum height for this
layout. The new maximum height is stored at the variable of this
pointer.
\param[out] preferredHeight the value to add to the preferred height for
this layout. The new preferred heifght is stored at the variable of
this pointer.
\since Haiku R1
*/
/*!
\fn BSize BTwoDimensionalLayout::SubtractInsets(BSize size)
\brief Substract the \a size from all the insets for this layout.
\since Haiku R1
*/
//! @}
/*!
\name Current settings for spacing
*/
//! @{
/*!
\var float BTwoDimensionalLayout::fLeftInset
\brief The current left inset for this layout.
*/
/*!
\var float BTwoDimensionalLayout::fRightInset
\brief The current right inset for this layout.
*/
/*!
\var float BTwoDimensionalLayout::fTopInset
\brief The current top inset for this layout.
*/
/*!
\var float BTwoDimensionalLayout::fBottomInset
\brief The current bottom inset for this layout.
*/
/*!
\var float BTwoDimensionalLayout::fHSpacing
\brief the current horizontal spacing between columns for this layout.
*/
/*!
\var float BTwoDimensionalLayout::fVSpacing
\brief The current vertical spacing between rows for this layout.
*/
//! @}