haiku/docs/user/interface/LayoutBuilder.Split.dox
Niels Sascha Reedijk 6758018a21 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 <waddlesplash@gmail.com>
2020-04-18 18:24:51 +00:00

486 lines
11 KiB
Plaintext

/*
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Niels Sascha Reedijk, niels.reedijk@gmail.com
*
* Corresponds to:
* headers/os/interface/LayoutBuilder.h rev 49977
*/
/*!
\class BLayoutBuilder::Split<>
\ingroup layout
\ingroup libbe
\brief BLayoutBuilder::Base subclass for building BSplitViews.
\since Haiku R1
A BSplitView consists of elements, for which in between there are dividers
that the user can manipulate to alter the division of space between each of
the element.s
For a detailed view on the properties, see the \link BSplitView class
description\endlink.
*/
/*!
\typedef BLayoutBuilder::Split<ParentBuilder>::ThisBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::ThisBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ParentBuilder>::GroupBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GroupBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ParentBuilder>::GridBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::GridBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ParentBuilder>::SplitBuilder
\copydoc BLayoutBuilder::Group<ParentBuilder>::SplitBuilder
*/
/*!
\typedef BLayoutBuilder::Split<ThisBuilder>::CardBuilder
\copydoc BLayoutBuilder::Group<ThisBuilder>::CardBuilder
*/
/*!
\name Constructors
*/
//! @{
/*!
\fn BLayoutBuilder::Split<ParentBuilder>::Split(orientation orientation,
float spacing)
\brief Creates a builder for a new BSplitView.
\param orientation The orientation for the new BSplitView.
\param spacing The spacing for the new BSplitView.
\since Haiku R1
*/
/*!
\fn BLayoutBuilder::Split<ParentBuilder>::Split(BSplitView *view)
\brief Creates a builder for an existing BSplitView
\param view The existing view to operate on.
\since Haiku R1
*/
//! @}
/*!
\name Accessors
*/
//! @{
/*!
\fn BSplitView* BLayoutBuilder::Split<ParentBuilder>::View() const
\copydoc BLayoutBuilder::Group<ParentBuilder>::View()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::GetView(
BView** _view)
\copydoc BLayoutBuilder::Group<ParentBuilder>::GetView()
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::GetSplitView(
BSplitView** _view)
\brief Get a pointer to the SplitBView this builder is attached to.
\param[out] _view The BSplitView this builder' is attached to.
*/
/*!
\fn BLayoutBuilder::Split<ParentBuilder>::operator BSplitView*()
\brief Cast this builder into the layout object it represents.
\since Haiku R1
*/
//! @}
/*!
\name Adding BViews and BLayoutItems
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::Add(BView* view)
\brief Add a \a view to the underlying BSplitView.
The \a view will be added to the right or the bottom of the existing
elements.
\param view The BView to be added. The underlying BSplitView will take
ownership of the object.
\see BSplitView::Add(BView*)
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::Add(BView* view,
float weight)
\brief Add a \a view with a \a weight to the underlying BSplitView.
The \a view will be added to the right or the bottom of the existing
elements.
\param view The BView to be added. The underlying BSplitView will take
ownership of the object.
\param weight The weight of the view.
\see BSplitView::Add(BView*, float)
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::Add(
BLayoutItem* item)
\brief Add a \a item to the underlying BSplitView.
The layout item will be added to the right or the bottom of the existing
elements.
\param item The BLayoutItem to be added. The underlying BSplitView will
take ownership of the object.
\see BSplitView::Add(BLayoutItem*)
\since Haiku R1
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::Add(
BLayoutItem* item, float weight)
\brief Add an \a item with a \a weight to the underlying BSplitView.
The layout item will be added to the right or the bottom of the existing
elements.
\param item The BLayoutItem to be added. The underlying BSplitView will
take ownership of the object.
\param weight The weight of the item.
\see BSplitView::Add(BLayoutItem*, float)
\since Haiku R1
*/
//! @}
/*!
\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::Split<ParentBuilder>::AddGroup(
orientation orientation, float spacing, float weight)
\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 weight The weight for the new BGroupLayout in the BGroupLayout this
builder represents.
\returns A GroupBuilder representing the newly created BGroupLayout.
\since Haiku R1
*/
/*!
\fn GroupBuilder BLayoutBuilder::Split<ParentBuilder>::AddGroup(BGroupView*
groupView, float weight)
\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 the layout of the \a groupView.
\since Haiku R1
*/
/*!
\fn GroupBuilder BLayoutBuilder::Split<ParentBuilder>::AddGroup(
BGroupLayout* groupLayout, float weight)
\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 the \a groupLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
float horizontalSpacing = 0.0f, float verticalSpacing = 0.0f,
float weight = 1.0f)
\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 weight The weight for the new BGridLayout in the BSplitView this
builder represents.
\returns A GridBuilder representing the newly created BGridLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
BGridLayout* gridLayout, float weight = 1.0f)
\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 the \a gridLayout.
\since Haiku R1
*/
/*!
\fn GridBuilder BLayoutBuilder::Split<ParentBuilder>::AddGrid(
BGridView* gridView, float weight = 1.0f)
\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 the layout of the \a gridView.
\since Haiku R1
*/
/*!
\fn SplitBuilder BLayoutBuilder::Split<ParentBuilder>::AddSplit(
orientation orientation, float spacing, float weight)
\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 weight The weight, in this BSplitView for the new BSplitView.
\returns A SplitBuilder representing the new BSplitView.
\since Haiku R1
*/
/*!
\fn SplitBuilder BLayoutBuilder::Split<ParentBuilder>::AddSplit(
BSplitView* splitView, float weight = 1.0f)
\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 \a splitView.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
float weight)
\copybrief CardBuilder BLayoutBuilder::Group<ParentBuilder>::AddCards(
float weight)
\param weight The weight of the BCardLayout in the BSplitView this builder
represents.
\returns A CardBuilder representing the new BCardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
BCardLayout* cardLayout, float weight)
\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 \a cardLayout.
\since Haiku R1
*/
/*!
\fn CardBuilder BLayoutBuilder::Split<ParentBuilder>::AddCards(
BCardView* cardView, float weight)
\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 layout of t he \a cardView.
\since Haiku R1
*/
//! @}
/*!
\name Collapsability of elements
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetCollapsible(
bool collapsible)
\copydoc BSplitView::SetCollapsible(bool)
\see BSplitView::SetCollapsible(bool)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetCollapsible(
int32 index, bool collapsible)
\copydoc BSplitView::SetCollapsible(int32, bool)
\see BSplitView::SetCollapsible(int32, bool)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetCollapsible(
int32 first, int32 last, bool collapsible)
\copydoc BSplitView::SetCollapsible(int32, int32, bool)
\see BSplitView::SetCollapsible(int32, int32, bool)
*/
//! @}
/*!
\name Insets
*/
//! @{
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetInsets(
float left, float top, float right, float bottom)
\copydoc BSplitView::SetInsets(float, float, float, float)
\see BSplitView::SetInsets(float, float, float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetInsets(
float horizontal, float vertical)
\copydoc BSplitView::SetInsets(float, float)
\see BSplitView::SetInsets(float, float)
*/
/*!
\fn ThisBuilder& BLayoutBuilder::Split<ParentBuilder>::SetInsets(
float insets)
\copydoc BSplitView::SetInsets(float)
\see BSplitView::SetInsets(float)
*/
//! @}