#include <layout.h>
Definition at line 69 of file layout.h.
Public Member Functions | |
| LayoutArray () | |
| ~LayoutArray () | |
| LayoutCell & | at (int x, int y, int w=1, int h=1) |
| Returns a reference on the cell at given position. | |
| LayoutCell & | place (gcn::Widget *, int x, int y, int w=1, int h=1) |
| Places a widget in a given cell. | |
| void | setColWidth (int n, int w) |
| Sets the minimum width of a column. | |
| void | setRowHeight (int n, int h) |
| Sets the minimum height of a row. | |
| void | matchColWidth (int n1, int n2) |
| Sets the widths of two columns to the maximum of their widths. | |
| void | extend (int x, int y, int w, int h) |
| Spawns a cell over several columns/rows. | |
| void | reflow (int nX, int nY, int nW, int nH) |
| Computes and sets the positions of all the widgets. | |
Private Member Functions | |
| LayoutArray (LayoutArray const &) | |
| LayoutArray & | operator= (LayoutArray const &) |
| void | align (int &pos, int &size, int dim, LayoutCell const &cell, short *sizes) const |
| Gets the position and size of a widget along a given axis. | |
| void | resizeGrid (int w, int h) |
| Ensures the private vectors are large enough. | |
| std::vector< short > | getSizes (int dim, int upp) const |
| Gets the column/row sizes along a given axis. | |
| int | getSize (int dim) const |
| Gets the total size along a given axis. | |
Private Attributes | |
| std::vector< short > | mSizes [2] |
| std::vector< std::vector < LayoutCell * > > | mCells |
| char | mSpacing |
Friends | |
| class | LayoutCell |
| LayoutArray::LayoutArray | ( | ) |
Definition at line 90 of file layout.cpp.
| LayoutArray::~LayoutArray | ( | ) |
Definition at line 94 of file layout.cpp.
| LayoutArray::LayoutArray | ( | LayoutArray const & | ) | [private] |
| LayoutCell & LayoutArray::at | ( | int | x, | |
| int | y, | |||
| int | w = 1, |
|||
| int | h = 1 | |||
| ) |
| LayoutCell & LayoutArray::place | ( | gcn::Widget * | widget, | |
| int | x, | |||
| int | y, | |||
| int | w = 1, |
|||
| int | h = 1 | |||
| ) |
Places a widget in a given cell.
| w | number of columns the widget spawns. | |
| h | number of rows the widget spawns. |
Definition at line 171 of file layout.cpp.
| void LayoutArray::setColWidth | ( | int | n, | |
| int | w | |||
| ) |
| void LayoutArray::setRowHeight | ( | int | n, | |
| int | h | |||
| ) |
| void LayoutArray::matchColWidth | ( | int | n1, | |
| int | n2 | |||
| ) |
Sets the widths of two columns to the maximum of their widths.
Definition at line 155 of file layout.cpp.
| void LayoutArray::extend | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) |
| void LayoutArray::reflow | ( | int | nX, | |
| int | nY, | |||
| int | nW, | |||
| int | nH | |||
| ) |
Computes and sets the positions of all the widgets.
| nW | width of the array, used to resize the AUTO_ columns. | |
| nH | height of the array, used to resize the AUTO_ rows. |
Definition at line 283 of file layout.cpp.
| LayoutArray& LayoutArray::operator= | ( | LayoutArray const & | ) | [private] |
| void LayoutArray::align | ( | int & | pos, | |
| int & | size, | |||
| int | dim, | |||
| LayoutCell const & | cell, | |||
| short * | sizes | |||
| ) | const [private] |
Gets the position and size of a widget along a given axis.
Definition at line 190 of file layout.cpp.
| void LayoutArray::resizeGrid | ( | int | w, | |
| int | h | |||
| ) | [private] |
| std::vector< short > LayoutArray::getSizes | ( | int | dim, | |
| int | upp | |||
| ) | const [private] |
Gets the column/row sizes along a given axis.
| upp | target size for the array. Ignored if AUTO_DEF. |
Definition at line 214 of file layout.cpp.
| int LayoutArray::getSize | ( | int | dim | ) | const [private] |
friend class LayoutCell [friend] |
std::vector< short > LayoutArray::mSizes[2] [private] |
std::vector< std::vector < LayoutCell * > > LayoutArray::mCells [private] |
char LayoutArray::mSpacing [private] |
1.5.5