dba1e7423b
The goal of this documentation is to help people that find code that uses these classes, understand that the code is outdated and to refer them to the newer template-based layout builder classes. Change-Id: I4ba632be989686749181bdbc4e7f8a29adf01a5e Reviewed-on: https://review.haiku-os.org/c/haiku/+/2353 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
206 lines
5.0 KiB
Plaintext
206 lines
5.0 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/GridLayoutBuilder.h hrev38512
|
|
* src/kits/interface/GridLayoutBuilder.cpp hrev45833
|
|
*/
|
|
|
|
|
|
/*!
|
|
\file GridLayoutBuilder.h
|
|
\ingroup libbe
|
|
\brief Provides \b deprecated GridLayoutBuilder class.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\class BGridLayoutBuilder
|
|
\ingroup layout
|
|
\ingroup libbe
|
|
\brief \b Deprecated helper class that helps building a \ref BGridLayout.
|
|
|
|
The modern builder can be found in \ref BLayoutBuilder::Grid<>.
|
|
|
|
\warning This class is deprecated and should not be used in new projects.
|
|
It may be removed in newer releases.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder::BGridLayoutBuilder(float horizontal=B_USE_DEFAULT_SPACING, float vertical=B_USE_DEFAULT_SPACING)
|
|
\brief Create a new layout builder with a new underlying \ref BGridLayout.
|
|
|
|
\param horizontal Horizontal spacing.
|
|
\param vertical Vertical Spacing
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder::BGridLayoutBuilder(BGridLayout *layout)
|
|
\brief Create a new layout builder that operates on a \a layout.
|
|
|
|
\param layout The existing layout you want the builder to alter.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder::BGridLayoutBuilder(BGridView *view)
|
|
\brief Create a new layout builder that operates on a \a view.
|
|
|
|
\param view The existing grid view you want the builder to alter.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayout* BGridLayoutBuilder::GridLayout() const
|
|
\brief Get a reference to the underlying \ref BGridLayout.
|
|
|
|
\return A borrowed pointer to the current underlaying layout.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::GetGridLayout(BGridLayout **_layout)
|
|
\brief Get a reference to the underlying \ref BGridLayout.
|
|
|
|
\param[out] _layout The variable to store a borrowed pointer to the
|
|
underlying layout.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BView* BGridLayoutBuilder::View() const
|
|
\brief Get a reference to the owning \ref BView.
|
|
|
|
Returns the same BView* as BLayout::Owner(), this method is inherited from
|
|
BLayoutItem.
|
|
|
|
\return A borrowed pointer to the owning \ref BView.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::GetView(BView **_view)
|
|
\brief Get a reference to the owning \ref BView.
|
|
|
|
\param[out] _view The variable to store the borrowed pointer to the owning
|
|
\ref BView.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::Add(BView *view, int32 column, int32 row, int32 columnCount=1, int32 rowCount=1)
|
|
\brief Add a \a view to the underlying \ref BGridLayout.
|
|
|
|
\param view The BView to add.
|
|
\param column The column number (zero-based) to use.
|
|
\param row The row number (zero-based) to use.
|
|
\param columnCount The number of columns to span over.
|
|
\param rowCount The number of rows to span over.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::Add(BLayoutItem *item, int32 column, int32 row, int32 columnCount=1, int32 rowCount=1)
|
|
\brief Add a \ref BLayoutItem to the underlying \ref BGridLayout.
|
|
|
|
\param item The \ref BLayoutItem to add.
|
|
\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 over.
|
|
\param rowCount The number of rows to span over.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::SetColumnWeight(int32 column, float weight)
|
|
\brief Set the weight for \a column to \a weight.
|
|
|
|
\param column The column to set.
|
|
\param weight The weight to set.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::SetRowWeight(int32 row, float weight)
|
|
\brief Set the weight of \a row to \a weight.
|
|
|
|
\param row The \a row number.
|
|
\param weight The \a weight to set.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder& BGridLayoutBuilder::SetInsets(float left, float top, float right, float bottom)
|
|
\brief Set the insets for the layout.
|
|
|
|
\param left The left inset as a \c float.
|
|
\param top The top inset as a \c float.
|
|
\param right The right inset as a \c float.
|
|
\param bottom The bottom inset as a \c float.
|
|
|
|
\return The method returns a self reference, so that calls to the builder
|
|
may be chained.
|
|
|
|
\since Haiku R1
|
|
*/
|
|
|
|
|
|
/*!
|
|
\fn BGridLayoutBuilder::operator BGridLayout *()
|
|
\brief Casts the builder to the underlying \ref BGridLayout.
|
|
|
|
Convenience method for the \ref GridLayout() method.
|
|
|
|
\since Haiku R1
|
|
*/
|