bin/pc: Mark non-returning function as void
[haiku.git] / docs / user / interface / GridLayout.dox
blobb09e4950d3b0ba353fa3fde5017520e9575870c8
1 /*
2  * Copyright 2010 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *              Alex Wilson, yourpalal2@gmail.com
7  *
8  * Corresponds to:
9  *              headers/os/interface/GridLayout.h       rev 38207
10  *              src/kits/interface/GridLayout.cpp       rev 38207
11  */
14 /*!
15         \file GridLayout.h
16         \ingroup layout
17         \ingroup libbe
18         \brief Provides the BGridLayout class.
22 /*!
23         \class BGridLayout
24         \ingroup layout
25         \ingroup libbe
26         \brief The BGridLayout class a BLayout subclass that arranges the items it
27                 holds in a grid.
29         Each item in a BGridLayout receives a rectangular area which can span more
30         than a single row or column. The indexing of columns and rows is zero based,
31         starting in the top-left.
33         \warning This class is not yet finalized, if you use it in your software
34                  assume that it will break some time in the future.
36         \since Haiku R1
40 /*!
41         \fn BGridLayout::BGridLayout(float horizontal = 0.0f, float vertical = 0.0f)
42         \brief Create a BGridLayout with \a horizontal space between columns and
43                \a vertical space between rows.
45         \since Haiku R1
49 /*!
50         \fn BGridLayout::BGridLayout(BMessage* from)
51         \brief Archive constructor.
53         \param from The message to build the BGridLayout from.
55         \since Haiku R1
59 /*!
60         \fn BGridLayout::~BGridLayout()
61         \brief Destructor method.
63         Standard Destructor.
65         \since Haiku R1
69 /*!
70         \fn int32 BGridLayout::CountColumns() const
71         \brief Returns the number of active columns in this layout.
73         \returns The number of active columns in the layout.
75         \since Haiku R1
79 /*!
80         \fn int32 BGridLayout::CountRows() const
81         \brief Returns the number of active rows in this layout.
83         \returns the number of active rows in the layout.
85         \since Haiku R1
89 /*!
90         \fn float BGridLayout::HorizontalSpacing() const
91         \brief Returns the spacing between columns for this layout.
93         \returns The spacing between columns for the layout.
95         \since Haiku R1
99 /*!
100         \fn float BGridLayout::VerticalSpacing() const
101         \brief Returns the spacing between rows for this layout.
103         \returns The spacing between rows for the layout.
105         \since Haiku R1
110         \fn void BGridLayout::SetHorizontalSpacing(float spacing);
111         \brief Set the spacing between columns for this layout.
113         \param spacing The number of pixels of spacing to set.
115         \since Haiku R1
120         \fn void BGridLayout::SetVerticalSpacing(float spacing)
121         \brief Set the spacing between rows for this layout.
123         \param spacing The number of pixels of spacing to set.
125         \since Haiku R1
130         \fn     void BGridLayout::SetSpacing(float horizontal, float vertical)
131         \brief Set the spacing between columns and rows for this layout.
133         \param horizontal The number of \a horizontal pixels of spacing to set.
134         \param vertical The number of \a vertical pixels of spacing to set.
136         \since Haiku R1
141         \fn float BGridLayout::ColumnWeight(int32 column) const
142         \brief Returns the weight for the specified \a column.
144         \returns The \a column weight as a float.
146         \since Haiku R1
151         \fn void BGridLayout::SetColumnWeight(int32 column, float weight)
152         \brief Set the weight for \a column to \a weight.
154         \param column The column to set.
155         \param weight The weight to set.
157         \since Haiku R1
162         \fn float BGridLayout::MinColumnWidth(int32 column) const
163         \brief Returns the minimum width for \a column.
165         \param column The column to get the minimum width of.
167         \returns The minimum width for \a column as a float.
169         \since Haiku R1
174         \fn void BGridLayout::SetMinColumnWidth(int32 column, float width)
175         \brief Sets the minimum width for \a column to \a width.
177         \param column The \a column to set the minimum width of.
178         \param width The \a width to set.
180         \since Haiku R1
185         \fn float BGridLayout::MaxColumnWidth(int32 column) const
186         \brief Returns the maximum width for \a column.
188         \param column The column to get the maximum width of.
190         \returns The maximum width for \a column as a float.
192         \since Haiku R1
197         \fn void BGridLayout::SetMaxColumnWidth(int32 column, float width)
198         \brief Sets the maximum width for \a column to \a width.
200         \param column The column to set the maximum width of.
201         \param width The \a width to set.
203         \since Haiku R1
208         \fn float BGridLayout::RowWeight(int32 row) const
209         \brief Returns the weight of the specified \a row.
211         \returns The weight of the \a row.
213         \since Haiku R1
218         \fn void BGridLayout::SetRowWeight(int32 row, float weight)
219         \brief Set the weight of \a row to \a weight.
221         \param row The \a row number.
222         \param weight The \a weight to set.
224         \since Haiku R1
229         \fn float BGridLayout::MinRowHeight(int row) const
230         \brief Returns the minimum height for \a row.
232         \since Haiku R1
237         \fn void BGridLayout::SetMinRowHeight(int32 row, float height)
238         \brief Sets the minimum height for \a row to \a width.
240         \since Haiku R1
245         \fn float BGridLayout::MaxRowHeight(int32 row) const
246         \brief Returns the maximum height for \a row.
248         \since Haiku R1
253         \fn void BGridLayout::SetMaxRowHeight(int32 row, float height)
254         \brief Sets the maximum height for \a row to \a width.
256         \since Haiku R1
261         \fn BLayoutItem* BGridLayout::AddView(BView* child)
262         \brief Adds \a child to this layout in the first empty cell available, or
263                 in a new column in the first row if there are no emtpy cells.
265         \since Haiku R1
270         \fn BLayoutItem* BGridLayout::AddView(int32 index, BView* child);
271         \brief BGridLayout::AddView(BView*)
273         \since Haiku R1
278         \fn BLayoutItem* BGridLayout::AddView(BView* child, int32 column, int32 row,
279                         int32 columnCount = 1, int32 rowCount = 1);
280         \brief Adds \a child to this layout at \a column and \a row. \a child may
281                also occupy additional cells if \a columnCount or \a rowCount are
282                greater than \c 1.
284         Fails and returns NULL if the requested area is occupied, or if internal
285         memory allocations fail.
287         \since Haiku R1
292         \fn BLayoutItem* BGridLayout::AddItem(BLayoutItem* item)
293         \brief Adds \a item to this layout in the first empty cell available, or
294                in a new column in the first row if there are no emtpy cells.
296         \since Haiku R1
301         \fn BLayoutItem* BGridLayout::AddItem(int32 index, BLayoutItem* item);
302         \brief BGridLayout::AddItem(BLayoutItem*)
307         \fn BLayoutItem* BGridLayout::AddItem(BLayoutItem* item, int32 column,
308                 int32 row, int32 columnCount = 1, int32 rowCount = 1);
309         \brief Adds \a item to this layout at \a column and \a row. \a item may
310                also occupy additional cells if \a columnCount or \a rowCount are
311                greater than 1.
313         Fails and returns \c NULL if the requested area is occupied, or if internal
314         memory allocations fail.
316         \since Haiku R1